#9 code cleanup
Merged 3 years ago by ovasik. Opened 3 years ago by thomas_kuehne.
thomas_kuehne/xmlto master  into  master

add strings.h import
Thomas Kuehne • 3 years ago  
Fix return type of main function
Thomas Kuehne • 3 years ago  
fix -Wimplicit-int for ifsense
Thomas Kuehne • 3 years ago  
update configure.ac to autoupdate-2.71
Thomas Kuehne • 3 years ago  
Don't hardcode paths to utilities
Thomas Kuehne • 3 years ago  
rename configure.in to configure.ac
Thomas Kuehne • 3 years ago  
configure.ac configure.in
file renamed
+3 -3
@@ -1,4 +1,4 @@ 

- AC_INIT(xmlto, 0.0.28)

+ AC_INIT([xmlto],[0.0.28])

  AC_CONFIG_SRCDIR(xmlto.spec.in)

  AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects 1.6])

  AC_CONFIG_HEADERS(config.h)
@@ -69,7 +69,7 @@ 

  

  AC_ARG_WITH(

          [backend],

-         AC_HELP_STRING(

+         AS_HELP_STRING(

                  [--with-backend=@<:@passivetex|fop|dblatex@:>@],

                  [The default processing backend @<:@default=DEFAULT@:>@]

          ),
@@ -127,7 +127,7 @@ 

  

  AC_ARG_WITH(

          [webbrowser],

-         AC_HELP_STRING(

+         AS_HELP_STRING(

                  [--with-webbrowser=@<:@w3m|lynx|links|any@:>@],

                  [The default processing backend @<:@default=w3m@:>@]

          ),

file modified
+5 -4
@@ -37,13 +37,14 @@ 

   */

  #include <string.h>

  #include <stdlib.h>

+ #include <strings.h>

  

  #define TRUE	1

  #define FALSE	0

  

  static char **selections;	/* selection tokens */

  static int nselections;		/* number of selections */

- static ifsense;			/* sense of last `if' or unless seen */

+ static int ifsense;		/* sense of last `if' or unless seen */

  static char *attribute;		/* last attribute scanned */

  

  struct stack_t {
@@ -237,9 +238,9 @@ 

  

  #include "config.h"

  

- int yywrap() {exit(0);};

+ int yywrap() {exit(0);}

  

- main(int argc, char *argv[])

+ int main(int argc, char *argv[])

  {

      int i;

  
@@ -265,7 +266,7 @@ 

  	    exit(1);

  	}

  

-     yylex();

+     return yylex();

  }

  

  /*

file modified
+7 -7
@@ -272,13 +272,13 @@ 

    USE_BACKEND=DEFAULT

  fi

  

- LINKS_PATH=@LINKS@

- W3M_PATH=@W3M@

- LYNX_PATH=@LYNX@

- GCP_PATH=@GCP@

- SED_PATH=@SED@

- GREP_PATH=@GREP@

- ZIP_PATH=@ZIP@

+ LINKS_PATH=$(command -v elinks || command -v links)

+ W3M_PATH=$(command -v w3m)

+ LYNX_PATH=$(command -v lynx)

+ GCP_PATH=$(command -v cp)

+ SED_PATH=$(command -v sed)

+ GREP_PATH=$(command -v grep)

+ ZIP_PATH=$(command -v zip)

  

  # Process any options

  ARGS=$(${GETOPT} \

infrastructure updates:
- rename configure.in to configure.ac
- update configure.ac to support autoupdate-2.71
- don't hardcode paths to utilities

fix compiler warning:
- -Wimplicit-int
- fix extra ‘;’ outside of a function
- return type defaults to ‘int’ [-Wimplicit-int]
- implicit declaration of function ‘strncasecmp’

Pull-Request has been merged by ovasik

3 years ago