dthelp: Resolve 106 compiler warnings.
authorPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 20:37:25 +0000 (21:37 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 20:37:25 +0000 (21:37 +0100)
19 files changed:
cde/lib/DtSvc/DtUtil2/XlationSvc.c
cde/programs/dthelp/parser/canon1/parser/parser.c
cde/programs/dthelp/parser/canon1/util/cont.h
cde/programs/dthelp/parser/canon1/util/context.c
cde/programs/dthelp/parser/canon1/util/conutil.c
cde/programs/dthelp/parser/pass1/build/eltree.c
cde/programs/dthelp/parser/pass1/eltdef/eltdef.c
cde/programs/dthelp/parser/pass1/eltdef/proto.h
cde/programs/dthelp/parser/pass1/helptag/help.c
cde/programs/dthelp/parser/pass1/helptag/special.h
cde/programs/dthelp/parser/pass1/parser/parser.c
cde/programs/dthelp/parser/pass1/parser/proto.h
cde/programs/dthelp/parser/pass1/util/cont.h
cde/programs/dthelp/parser/pass1/util/context.c
cde/programs/dthelp/parser/pass1/util/conutil.c
cde/programs/dthelp/parser/pass1/util/error.c
cde/programs/dthelp/parser/pass1/util/fclndir.c
cde/programs/dthelp/parser/pass1/util/wchar.c
cde/programs/dthelp/parser/pass2/util/conutil.c

index cbb6982d14ecd32b2d8a29ac174444a24b83b2a1..054f2b60f2dc7de4aba6ad69518f3601a347d306 100644 (file)
@@ -1587,7 +1587,7 @@ int  _DtXlateOpenDb(
     SetDebugModeState(dbRec);
 
     if (dbRec->debugMode) 
-       fprintf(stderr,"_DtXlateOpenDb: opened: %s; new db: %p\n",path,dbRec);
+       fprintf(stderr,"_DtXlateOpenDb: opened: %s; new db: %p\n",path, (void *)dbRec);
 
     *ret_db = dbRec;
     free(path);
@@ -1635,7 +1635,7 @@ int  _DtXlateOpenAndMergeDbs(
        
     if ( (*io_db) && (*io_db)->debugMode) 
        fprintf(stderr,"_DtXlateOpenAndMergeDb: "
-                      "target file: %s; existing db: %p\n",databaseName,*io_db);
+                      "target file: %s; existing db: %p\n",databaseName, (void *) *io_db);
 
     /* a db has been opened, let's merge with it */
 
@@ -1655,7 +1655,7 @@ int  _DtXlateOpenAndMergeDbs(
 
     if ((*io_db)->debugMode) 
        fprintf(stderr,"_DtXlateOpenAndMergeDb: "
-                      "opened: %s; merged db: %p\n",path,*io_db);
+                      "opened: %s; merged db: %p\n",path, (void *) *io_db);
 
     free(path);
     return 0;      /* RETURN */
@@ -1709,7 +1709,7 @@ int  _DtXlateMergeDbs(
     if (   ((*io_mergeIntoDb) && (*io_mergeIntoDb)->debugMode) 
         || (*io_dbToMerge)->debugMode) 
        fprintf(stderr,"_DtXlateMergeDbs: "
-                  "mergeIntoDb: %p; dbToMerge: %p\n",*io_mergeIntoDb,*io_dbToMerge);
+                  "mergeIntoDb: %p; dbToMerge: %p\n", (void *) *io_mergeIntoDb, (void *) *io_dbToMerge);
 
     /* if db_mergeIntoDb has not yet been opened */
     if(   NULL == *io_mergeIntoDb
@@ -1731,7 +1731,7 @@ int  _DtXlateMergeDbs(
     SetDebugModeState(*io_mergeIntoDb);
 
     if ((*io_mergeIntoDb)->debugMode) 
-       fprintf(stderr,"merged db: %p\n",*io_mergeIntoDb);
+       fprintf(stderr,"merged db: %p\n", (void *) *io_mergeIntoDb);
 
     return 0;
 }       /*$END$*/
@@ -1836,7 +1836,7 @@ int _DtXlateCloseDb(
  
      XrmDestroyDatabase(dbRec->xrmDb);
 
-     if (dbRec->debugMode) fprintf(stderr,"_DtXlateCloseDb: %p\n",dbRec);
+     if (dbRec->debugMode) fprintf(stderr,"_DtXlateCloseDb: %p\n", (void *) dbRec);
 
      /* zero out object mem and free it */
      DeleteDbMem(io_db);
@@ -2209,7 +2209,7 @@ int _DtXlateGetXlateEnv(
       /* then convert the std value to a integer */
       strcpy(version,names.release);
       strcat(version,names.version);
-      ret = _DtXlateOpToStdValue(db,names.sysname,NULL,
+      ret = _DtXlateOpToStdValue(db,names.sysname,0,
                    _DtXLATE_OPER_VERSION,version,&stdVer,NULL);
       if (ret == 0)
       {
index 8cecb2cee6e47ab7855221e0c3450c9b3855d8f7..f4d42008913f77c45b2109e78cd0e26a09f01a32 100644 (file)
@@ -38,7 +38,7 @@
 static void scanloop(LOGICAL prolog);
 
 /* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
 {
@@ -79,6 +79,7 @@ if (! (m_sysent[m_sysecnt] = m_openfirst()))
 scanloop(FALSE);
 /* At EOF */
 m_done() ;
+return EXIT_SUCCESS;
 }
 
 static void scanloop(LOGICAL prolog)
@@ -89,7 +90,7 @@ static char sopt[] =
 static char name[] = "m_name = '%s'\n" ;
 static char literal[] = "m_literal = '%s'\n" ;
 
-#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(___uxp__) || defined(__osf__)
+#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(___uxp__) || defined(__osf__) || defined(linux)
 char buffer[M_LITLEN + 80] ;
 #else
 #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d))
index 1699bc87d7867b29957ef1255f15b61dbb665d0b..c58cb9c1b3e5b5c9c44827b17ac772d95e2625b8 100644 (file)
@@ -127,7 +127,7 @@ int m_lower(
 #endif
   ) ;
 
-void main(
+int main(
 #if defined(M_PROTO)
   int argc, char **argv
 #endif
index ea8dd6f38794b10934654cd2c18f7d7df4c05911..d4c6ade4dc8b7490036988af22a79fa00d798650 100644 (file)
@@ -169,7 +169,7 @@ delim.h.
 #include "cont.h"
 
 /* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
 {
index 947cab5fb7e63ae5c8021614b13f268b301505c8..e4b562a821f964d6735e01e5c82510ebf2039b49 100644 (file)
@@ -51,7 +51,7 @@ void dumpdlmptr(M_NOPAR)
       if (n) fputs(",\n", delim);
       fprintf(delim, "  %s", dlmptr[n]);
       }
-    fprintf(delim, endif);
+    fprintf(delim, "%s", endif);
     }
 
 /* Output the generated data structures */
@@ -83,8 +83,8 @@ void dumptree(sparse)
       else fprintf(context, "0");
       if (i < ccount - 1) fprintf(context, ",\n  ");
       }
-    fprintf(delim, endif);
-    fprintf(context, endif);
+    fprintf(delim, "%s", endif);
+    fprintf(context, "%s", endif);
     nextcon(sparse);
     }
 
@@ -599,8 +599,8 @@ void nextcon(sparse)
         if (i > 0) fprintf(context, ",\n");
         fprintf(context, "  %d", firstinrow);
         }
-      fprintf(delim, endif);
-      fprintf(context, endif);
+      fprintf(delim, "%s", endif);
+      fprintf(context, "%s", endif);
       }
     else {
       fprintf(context,
@@ -616,7 +616,7 @@ void nextcon(sparse)
         if (i < ccount - 1) fprintf(context, ",");
         fprintf(context, "\n");
         }
-      fprintf(context, endif);
+      fprintf(context, "%s", endif);
       }
     }
   
index b5c9dba229bda9a56744f901169bed25b48a26a2..7a76deffd49a10ccbf05cb994bdbd122197ef576 100644 (file)
@@ -55,7 +55,7 @@ ELTSTRUCT *ntrelt(p)
     w_strcpy(new->enptr, p) ;
     new->model = M_NULLVAL ;
     new->content = M_NULLVAL ;
-    new->inptr = new->exptr = NULL ;
+    new->inptr = new->exptr = 0 ;
     new->parptr = NULL ;
     new->parindex = M_NULLVAL ;
     new->paramcount = M_NULLVAL ;
index a4358423e084895a16be329a5f5901d04939099f..1d7b4d98d5e264d3b5d66f69f8cb7c02ea16756c 100644 (file)
@@ -49,7 +49,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entity.h"
 
 /* Main program */
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
   {
@@ -93,4 +93,5 @@ void main(argc, argv)
         }
       }
     done() ;
+    return EXIT_SUCCESS;
     }
index 1f56430725fd8fc03544007bf7b22bf35a745b35..17921f293b6015fd57e80843d13c53143c95ac97 100644 (file)
@@ -226,7 +226,7 @@ LOGICAL litproc(
 #endif
   ) ;
 
-void main(
+int main(
 #if defined(M_PROTO)
   int argc, char **argv
 #endif
index 115e5486896c48a1cd39c25066dd0b55addf4289..fc36aab47036d1202b4b7e58f91b7060f9a5e2eb 100644 (file)
@@ -1766,7 +1766,7 @@ if (!charset)
        charset = dotPtr + 1;
     }
 if (dotPtr)
-    *dotPtr = NULL;
+    *dotPtr = '\0';
 
 strcpy(stdLang, locale);
 if (charset)
index 31be6b06fef9952ceb0ea1e63c1cfa537254935c..b4c257bd786c8f6a4a397ea07c12a26bef4f1a89 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: special.h /main/3 1995/11/08 10:12:54 rswiston $ */
-   0, "^@  NUL",                         SPECIAL, NULL, NULL,
-   1, "^A  SOH",                         SPECIAL, NULL, NULL,
-   2, "^B  STX",                         SPECIAL, NULL, NULL,
-   3, "^C  ETX",                         SPECIAL, NULL, NULL,
-   4, "^D  EOT",                         SPECIAL, NULL, NULL,
-   5, "^E  ENQ",                         SPECIAL, NULL, NULL,
-   6, "^F  ACK",                         SPECIAL, NULL, NULL,
-   7, "^G  BEL",                         SPECIAL, NULL, NULL,
-   8, "^H  BS",                          SPECIAL, NULL, NULL,
-   9, "^I  HT",                          SPECIAL, NULL, NULL,
-  10, "^J  LF",                          SPECIAL, NULL, NULL,
-  11, "^K  VT",                          SPECIAL, NULL, NULL,
-  12, "^L  FF",                          SPECIAL, NULL, NULL,
-  13, "^M  CR",                          SPECIAL, NULL, NULL,
-  14, "^N  SO",                          SPECIAL, NULL, NULL,
-  15, "^O  SI",                          SPECIAL, NULL, NULL,
-  16, "^P  DLE",                         SPECIAL, NULL, NULL,
-  17, "^Q  DC1",                         SPECIAL, NULL, NULL,
-  18, "^R  DC2",                         SPECIAL, NULL, NULL,
-  19, "^S  DC3",                         SPECIAL, NULL, NULL,
-  20, "^T  DC4",                         SPECIAL, NULL, NULL,
-  21, "^U  NAK",                         SPECIAL, NULL, NULL,
-  22, "^V  SYN",                         SPECIAL, NULL, NULL,
-  23, "^W  ETB",                         SPECIAL, NULL, NULL,
-  24, "^X  CAN",                         SPECIAL, NULL, NULL,
-  25, "^Y  EM",                          SPECIAL, NULL, NULL,
-  26, "^Z  SUB",                         SPECIAL, NULL, NULL,
-  27, "^[  ESC",                         SPECIAL, NULL, NULL,
-  28, "^\\  FS",                          SPECIAL, NULL, NULL,
-  29, "^]  GS",                          SPECIAL, NULL, NULL,
-  30, "^^  RS",                          SPECIAL, NULL, NULL,
-  31, "^_  US",                          SPECIAL, NULL, NULL,
-  32, "SP",                              SPECIAL, NULL, NULL,
-  33, "!",                               SPECIAL, NULL, NULL,
-  34, "\"",                               SPECIAL, NULL, NULL,
-  35, "#",                               SPECIAL, "\\\\#", NULL,
-  36, "$",                               SPECIAL, "\\\\dollar{}", NULL,
-  37, "%",                               SPECIAL, "\\\\%", NULL,
-  38, "&",                               SPECIAL, "\\\\&", NULL,
-  39, "'",                               SPECIAL, NULL, NULL,
-  40, "(",                               SPECIAL, NULL, NULL,
-  41, ")",                               SPECIAL, NULL, NULL,
-  42, "*",                               SPECIAL, NULL, NULL,
-  43, "+",                               SPECIAL, NULL, NULL,
-  44, ",",                               SPECIAL, NULL, NULL,
-  45, "-",                               SPECIAL, "{-}", NULL,
-  46, ".",                               SPECIAL, NULL, NULL,
-  47, "/",                               SPECIAL, NULL, NULL,
-  58, ":",                               SPECIAL, NULL, NULL,
-  59, ";",                               SPECIAL, NULL, NULL,
-  60, "<",                               SPECIAL, "{\\\\lthan}", NULL,
-  61, "=",                               SPECIAL, NULL, NULL,
-  62, ">",                               SPECIAL, "{\\\\gthan}", NULL,
-  63, "?",                               SPECIAL, NULL, NULL,
-  64, "@",                               SPECIAL, NULL, NULL,
-  91, "[",                               SPECIAL, NULL, NULL,
-  92, "\\\\",                               SPECIAL, "{\\\\bslash}", NULL,
-  93, "]",                               SPECIAL, NULL, NULL,
-  94, "^",                               SPECIAL, "\\\\string^", NULL,
-  95, "_",                               SPECIAL, "{\\\\under}", NULL,
-  96, "`",                               SPECIAL, NULL, NULL,
- 123, "{",                               SPECIAL, "{\\\\lbrac}", NULL,
- 124, "|",                               SPECIAL, "{\\\\vbar}", NULL,
- 125, "}",                               SPECIAL, "{\\\\rbrac}", NULL,
- 126, "~",                               SPECIAL, "\\\\string~", NULL,
- 184, "inverted exclamation mark",       SPECIAL, "{!`}", NULL,
- 185, "inverted question mark",          SPECIAL, "{?`}", NULL,
- 168, "acute accent",                    SPECIAL, "\\\\'{ }", NULL,
- 169, "grave accent",                    SPECIAL, "\\\\`{ }", NULL,
- 170, "circumflex",                      SPECIAL, "\\\\^{ }", NULL,
- 171, "dieresis",                        SPECIAL, "\\\\\\\"{ }", NULL,
- 172, "tilde",                           SPECIAL, "\\\\~{ }", NULL,
- 127, "DEL",                             SPECIAL, NULL, NULL,
-  48, "0",                               NORMAL, NULL, NULL,
-  49, "1",                               NORMAL, NULL, NULL,
-  50, "2",                               NORMAL, NULL, NULL,
-  51, "3",                               NORMAL, NULL, NULL,
-  52, "4",                               NORMAL, NULL, NULL,
-  53, "5",                               NORMAL, NULL, NULL,
-  54, "6",                               NORMAL, NULL, NULL,
-  55, "7",                               NORMAL, NULL, NULL,
-  56, "8",                               NORMAL, NULL, NULL,
-  57, "9",                               NORMAL, NULL, NULL,
-  97, "a",                               NORMAL, NULL, NULL,
- 192, "a   circumflex",                  NORMAL, "\\\\^a", NULL,
- 200, "a   grave",                       NORMAL, "\\\\`a", NULL,
- 196, "a   acute",                       NORMAL, "\\\\'a", NULL,
- 204, "a   dieresis",                    NORMAL, "\\\\\\\"a", NULL,
- 226, "a   tilde",                       NORMAL, "\\\\~a", NULL,
- 212, "a   angstrom",                    NORMAL, "{\\\\aa}", NULL,
- 215, "ae  ligature",                    NORMAL, "{\\\\ae}", NULL,
+   0, "^@  NUL",                         SPECIAL, 0, 0,
+   1, "^A  SOH",                         SPECIAL, 0, 0,
+   2, "^B  STX",                         SPECIAL, 0, 0,
+   3, "^C  ETX",                         SPECIAL, 0, 0,
+   4, "^D  EOT",                         SPECIAL, 0, 0,
+   5, "^E  ENQ",                         SPECIAL, 0, 0,
+   6, "^F  ACK",                         SPECIAL, 0, 0,
+   7, "^G  BEL",                         SPECIAL, 0, 0,
+   8, "^H  BS",                          SPECIAL, 0, 0,
+   9, "^I  HT",                          SPECIAL, 0, 0,
+  10, "^J  LF",                          SPECIAL, 0, 0,
+  11, "^K  VT",                          SPECIAL, 0, 0,
+  12, "^L  FF",                          SPECIAL, 0, 0,
+  13, "^M  CR",                          SPECIAL, 0, 0,
+  14, "^N  SO",                          SPECIAL, 0, 0,
+  15, "^O  SI",                          SPECIAL, 0, 0,
+  16, "^P  DLE",                         SPECIAL, 0, 0,
+  17, "^Q  DC1",                         SPECIAL, 0, 0,
+  18, "^R  DC2",                         SPECIAL, 0, 0,
+  19, "^S  DC3",                         SPECIAL, 0, 0,
+  20, "^T  DC4",                         SPECIAL, 0, 0,
+  21, "^U  NAK",                         SPECIAL, 0, 0,
+  22, "^V  SYN",                         SPECIAL, 0, 0,
+  23, "^W  ETB",                         SPECIAL, 0, 0,
+  24, "^X  CAN",                         SPECIAL, 0, 0,
+  25, "^Y  EM",                          SPECIAL, 0, 0,
+  26, "^Z  SUB",                         SPECIAL, 0, 0,
+  27, "^[  ESC",                         SPECIAL, 0, 0,
+  28, "^\\  FS",                         SPECIAL, 0, 0,
+  29, "^]  GS",                          SPECIAL, 0, 0,
+  30, "^^  RS",                          SPECIAL, 0, 0,
+  31, "^_  US",                          SPECIAL, 0, 0,
+  32, "SP",                              SPECIAL, 0, 0,
+  33, "!",                               SPECIAL, 0, 0,
+  34, "\"",                              SPECIAL, 0, 0,
+  35, "#",                               SPECIAL, "\\\\#", 0,
+  36, "$",                               SPECIAL, "\\\\dollar{}", 0,
+  37, "%",                               SPECIAL, "\\\\%", 0,
+  38, "&",                               SPECIAL, "\\\\&", 0,
+  39, "'",                               SPECIAL, 0, 0,
+  40, "(",                               SPECIAL, 0, 0,
+  41, ")",                               SPECIAL, 0, 0,
+  42, "*",                               SPECIAL, 0, 0,
+  43, "+",                               SPECIAL, 0, 0,
+  44, ",",                               SPECIAL, 0, 0,
+  45, "-",                               SPECIAL, "{-}", 0,
+  46, ".",                               SPECIAL, 0, 0,
+  47, "/",                               SPECIAL, 0, 0,
+  58, ":",                               SPECIAL, 0, 0,
+  59, ";",                               SPECIAL, 0, 0,
+  60, "<",                               SPECIAL, "{\\\\lthan}", 0,
+  61, "=",                               SPECIAL, 0, 0,
+  62, ">",                               SPECIAL, "{\\\\gthan}", 0,
+  63, "?",                               SPECIAL, 0, 0,
+  64, "@",                               SPECIAL, 0, 0,
+  91, "[",                               SPECIAL, 0, 0,
+  92, "\\\\",                            SPECIAL, "{\\\\bslash}", 0,
+  93, "]",                               SPECIAL, 0, 0,
+  94, "^",                               SPECIAL, "\\\\string^", 0,
+  95, "_",                               SPECIAL, "{\\\\under}", 0,
+  96, "`",                               SPECIAL, 0, 0,
+ 123, "{",                               SPECIAL, "{\\\\lbrac}", 0,
+ 124, "|",                               SPECIAL, "{\\\\vbar}", 0,
+ 125, "}",                               SPECIAL, "{\\\\rbrac}", 0,
+ 126, "~",                               SPECIAL, "\\\\string~", 0,
+ 184, "inverted exclamation mark",       SPECIAL, "{!`}", 0,
+ 185, "inverted question mark",          SPECIAL, "{?`}", 0,
+ 168, "acute accent",                    SPECIAL, "\\\\'{ }", 0,
+ 169, "grave accent",                    SPECIAL, "\\\\`{ }", 0,
+ 170, "circumflex",                      SPECIAL, "\\\\^{ }", 0,
+ 171, "dieresis",                        SPECIAL, "\\\\\\\"{ }", 0,
+ 172, "tilde",                           SPECIAL, "\\\\~{ }", 0,
+ 127, "DEL",                             SPECIAL, 0, 0,
+  48, "0",                               NORMAL, 0, 0,
+  49, "1",                               NORMAL, 0, 0,
+  50, "2",                               NORMAL, 0, 0,
+  51, "3",                               NORMAL, 0, 0,
+  52, "4",                               NORMAL, 0, 0,
+  53, "5",                               NORMAL, 0, 0,
+  54, "6",                               NORMAL, 0, 0,
+  55, "7",                               NORMAL, 0, 0,
+  56, "8",                               NORMAL, 0, 0,
+  57, "9",                               NORMAL, 0, 0,
+  97, "a",                               NORMAL, 0, 0,
+ 192, "a   circumflex",                  NORMAL, "\\\\^a", 0,
+ 200, "a   grave",                       NORMAL, "\\\\`a", 0,
+ 196, "a   acute",                       NORMAL, "\\\\'a", 0,
+ 204, "a   dieresis",                    NORMAL, "\\\\\\\"a", 0,
+ 226, "a   tilde",                       NORMAL, "\\\\~a", 0,
+ 212, "a   angstrom",                    NORMAL, "{\\\\aa}", 0,
+ 215, "ae  ligature",                    NORMAL, "{\\\\ae}", 0,
   65, "A",                               NORMAL, NULL, 97,
  162, "A   circumflex",                  NORMAL, "\\\\^A", 192,
  161, "A   grave",                       NORMAL, "\\\\`A", 200,
  225, "A   tilde",                       NORMAL, "\\\\~A", 226,
  208, "A   angstrom",                    NORMAL, "{\\\\AA}", 212,
  211, "AE  ligature",                    NORMAL, "{\\\\AE}", 215,
-  98, "b",                               NORMAL, NULL, NULL,
-  66, "B",                               NORMAL, NULL, 98,
-  99, "c",                               NORMAL, NULL, NULL,
-  67, "C",                               NORMAL, NULL, 99,
- 181, "c   cedilla",                     NORMAL, "\\\\c{c}", NULL,
+  98, "b",                               NORMAL, 0, 0,
+  66, "B",                               NORMAL, 0, 98,
+  99, "c",                               NORMAL, 0, 0,
+  67, "C",                               NORMAL, 0, 99,
+ 181, "c   cedilla",                     NORMAL, "\\\\c{c}", 0,
  180, "C   cedilla",                     NORMAL, "\\\\c{C}", 181,
-  68, "D",                               NORMAL, NULL, 100,
- 100, "d",                               NORMAL, NULL, NULL,
- 101, "e",                               NORMAL, NULL, NULL,
- 193, "e   circumflex",                  NORMAL, "\\\\^e", NULL,
- 201, "e   grave",                       NORMAL, "\\\\`e", NULL,
- 197, "e   acute",                       NORMAL, "\\\\'e", NULL,
- 205, "e   dieresis",                    NORMAL, "\\\\\\\"e", NULL,
-  69, "E",                               NORMAL, NULL, 101,
+  68, "D",                               NORMAL, 0, 100,
+ 100, "d",                               NORMAL, 0, 0,
+ 101, "e",                               NORMAL, 0, 0,
+ 193, "e   circumflex",                  NORMAL, "\\\\^e", 0,
+ 201, "e   grave",                       NORMAL, "\\\\`e", 0,
+ 197, "e   acute",                       NORMAL, "\\\\'e", 0,
+ 205, "e   dieresis",                    NORMAL, "\\\\\\\"e", 0,
+  69, "E",                               NORMAL, 0, 101,
  164, "E   circumflex",                  NORMAL, "\\\\^E", 193,
  163, "E   grave",                       NORMAL, "\\\\`E", 201,
  220, "E   acute",                       NORMAL, "\\\\'E", 197,
  165, "E   dieresis",                    NORMAL, "\\\\\\\"E", 205,
- 102, "f",                               NORMAL, NULL, NULL,
-  70, "F",                               NORMAL, NULL, 102,
- 103, "g",                               NORMAL, NULL, NULL,
-  71, "G",                               NORMAL, NULL, 103,
- 104, "h",                               NORMAL, NULL, NULL,
-  72, "H",                               NORMAL, NULL, 104,
- 105, "i",                               NORMAL, NULL, NULL,
- 209, "i   circumflex",                  NORMAL, "{\\\\^\\\\i}", NULL,
- 217, "i   grave",                       NORMAL, "{\\\\`\\\\i}", NULL,
- 213, "i   acute",                       NORMAL, "{\\\\'\\\\i}", NULL,
- 221, "i   dieresis",                    NORMAL, "{\\\\\\\"\\\\i}", NULL,
-  73, "I",                               NORMAL, NULL, 105,
+ 102, "f",                               NORMAL, 0, 0,
+  70, "F",                               NORMAL, 0, 102,
+ 103, "g",                               NORMAL, 0, 0,
+  71, "G",                               NORMAL, 0, 103,
+ 104, "h",                               NORMAL, 0, 0,
+  72, "H",                               NORMAL, 0, 104,
+ 105, "i",                               NORMAL, 0, 0,
+ 209, "i   circumflex",                  NORMAL, "{\\\\^\\\\i}", 0,
+ 217, "i   grave",                       NORMAL, "{\\\\`\\\\i}", 0,
+ 213, "i   acute",                       NORMAL, "{\\\\'\\\\i}", 0,
+ 221, "i   dieresis",                    NORMAL, "{\\\\\\\"\\\\i}", 0,
+  73, "I",                               NORMAL, 0, 105,
  166, "I   circumflex",                  NORMAL, "\\\\^I", 209,
  230, "I   grave",                       NORMAL, "\\\\`I", 217,
  229, "I   acute",                       NORMAL, "\\\\'I", 213,
  167, "I   dieresis",                    NORMAL, "\\\\\\\"I", 221,
- 106, "j",                               NORMAL, NULL, NULL,
-  74, "J",                               NORMAL, NULL, 106,
- 107, "k",                               NORMAL, NULL, NULL,
-  75, "K",                               NORMAL, NULL, 107,
- 108, "l",                               NORMAL, NULL, NULL,
-  76, "L",                               NORMAL, NULL, 108,
- 109, "m",                               NORMAL, NULL, NULL,
-  77, "M",                               NORMAL, NULL, 109,
- 110, "n",                               NORMAL, NULL, NULL,
- 183, "n   tilde",                       NORMAL, "\\\\~n", NULL,
-  78, "N",                               NORMAL, NULL, 110,
+ 106, "j",                               NORMAL, 0, 0,
+  74, "J",                               NORMAL, 0, 106,
+ 107, "k",                               NORMAL, 0, 0,
+  75, "K",                               NORMAL, 0, 107,
+ 108, "l",                               NORMAL, 0, 0,
+  76, "L",                               NORMAL, 0, 108,
+ 109, "m",                               NORMAL, 0, 0,
+  77, "M",                               NORMAL, 0, 109,
+ 110, "n",                               NORMAL, 0, 0,
+ 183, "n   tilde",                       NORMAL, "\\\\~n", 0,
+  78, "N",                               NORMAL, 0, 110,
  182, "N   tilde",                       NORMAL, "\\\\~N", 183,
- 111, "o",                               NORMAL, NULL, NULL,
- 194, "o   circumflex",                  NORMAL, "\\\\^o", NULL,
- 202, "o   grave",                       NORMAL, "\\\\`o", NULL,
- 198, "o   acute",                       NORMAL, "\\\\'o", NULL,
- 206, "o   dieresis",                    NORMAL, "\\\\\\\"o", NULL,
- 234, "o   tilde",                       NORMAL, "\\\\~o", NULL,
- 214, "o   slash",                       NORMAL, "{\\\\o}", NULL,
-  79, "O",                               NORMAL, NULL, 111,
+ 111, "o",                               NORMAL, 0, 0,
+ 194, "o   circumflex",                  NORMAL, "\\\\^o", 0,
+ 202, "o   grave",                       NORMAL, "\\\\`o", 0,
+ 198, "o   acute",                       NORMAL, "\\\\'o", 0,
+ 206, "o   dieresis",                    NORMAL, "\\\\\\\"o", 0,
+ 234, "o   tilde",                       NORMAL, "\\\\~o", 0,
+ 214, "o   slash",                       NORMAL, "{\\\\o}", 0,
+  79, "O",                               NORMAL, 0, 111,
  223, "O   circumflex",                  NORMAL, "\\\\^O", 194,
  232, "O   grave",                       NORMAL, "\\\\`O", 202,
  231, "O   acute",                       NORMAL, "\\\\'O", 198,
  218, "O   dieresis",                    NORMAL, "\\\\\\\"O", 206,
  233, "O   tilde",                       NORMAL, "\\\\~O", 234,
  210, "O   slash",                       NORMAL, "{\\\\O}", 214,
- 112, "p",                               NORMAL, NULL, NULL,
-  80, "P",                               NORMAL, NULL, 112,
- 113, "q",                               NORMAL, NULL, NULL,
-  81, "Q",                               NORMAL, NULL, 113,
- 114, "r",                               NORMAL, NULL, NULL,
-  82, "R",                               NORMAL, NULL, 114,
- 115, "s",                               NORMAL, NULL, NULL,
- 236, "s   caron",                       NORMAL, "\\\\v{s}", NULL,
- 222, "SS  ligature",                    NORMAL, "{\\\\ss}", NULL,
-  83, "S",                               NORMAL, NULL, 115,
+ 112, "p",                               NORMAL, 0, 0,
+  80, "P",                               NORMAL, 0, 112,
+ 113, "q",                               NORMAL, 0, 0,
+  81, "Q",                               NORMAL, 0, 113,
+ 114, "r",                               NORMAL, 0, 0,
+  82, "R",                               NORMAL, 0, 114,
+ 115, "s",                               NORMAL, 0, 0,
+ 236, "s   caron",                       NORMAL, "\\\\v{s}", 0,
+ 222, "SS  ligature",                    NORMAL, "{\\\\ss}", 0,
+  83, "S",                               NORMAL, 0, 115,
  235, "S   caron",                       NORMAL, "\\\\v{S}", 236,
- 116, "t",                               NORMAL, NULL, NULL,
-  84, "T",                               NORMAL, NULL, 116,
- 117, "u",                               NORMAL, NULL, NULL,
- 195, "u   circumflex",                  NORMAL, "\\\\^u", NULL,
- 203, "u   grave",                       NORMAL, "\\\\`u", NULL,
- 199, "u   acute",                       NORMAL, "\\\\'u", NULL,
- 207, "u   dieresis",                    NORMAL, "\\\\\\\"u", NULL,
-  85, "U",                               NORMAL, NULL, 117,
+ 116, "t",                               NORMAL, 0, 0,
+  84, "T",                               NORMAL, 0, 116,
+ 117, "u",                               NORMAL, 0, 0,
+ 195, "u   circumflex",                  NORMAL, "\\\\^u", 0,
+ 203, "u   grave",                       NORMAL, "\\\\`u", 0,
+ 199, "u   acute",                       NORMAL, "\\\\'u", 0,
+ 207, "u   dieresis",                    NORMAL, "\\\\\\\"u", 0,
+  85, "U",                               NORMAL, 0, 117,
  174, "U   circumflex",                  NORMAL, "\\\\^U", 195,
  173, "U   grave",                       NORMAL, "\\\\`U", 203,
  237, "U   acute",                       NORMAL, "\\\\'U", 199,
  219, "U   dieresis",                    NORMAL, "\\\\\\\"U", 207,
- 118, "v",                               NORMAL, NULL, NULL,
-  86, "V",                               NORMAL, NULL, 118,
- 119, "w",                               NORMAL, NULL, NULL,
-  87, "W",                               NORMAL, NULL, 119,
- 120, "x",                               NORMAL, NULL, NULL,
-  88, "X",                               NORMAL, NULL, 120,
- 121, "y",                               NORMAL, NULL, NULL,
- 178, "y   acute",                       NORMAL, "\\\\'y", NULL,
- 239, "y   dieresis",                    NORMAL, "\\\\\\\"y", NULL,
-  89, "Y",                               NORMAL, NULL, 121,
+ 118, "v",                               NORMAL, 0, 0,
+  86, "V",                               NORMAL, 0, 118,
+ 119, "w",                               NORMAL, 0, 0,
+  87, "W",                               NORMAL, 0, 119,
+ 120, "x",                               NORMAL, 0, 0,
+  88, "X",                               NORMAL, 0, 120,
+ 121, "y",                               NORMAL, 0, 0,
+ 178, "y   acute",                       NORMAL, "\\\\'y", 0,
+ 239, "y   dieresis",                    NORMAL, "\\\\\\\"y", 0,
+  89, "Y",                               NORMAL, 0, 121,
  177, "Y   acute",                       NORMAL, "\\\\'Y", 178,
  238, "Y   dieresis",                    NORMAL, "\\\\\\\"Y", 239,
- 122, "z",                               NORMAL, NULL, NULL,
-  90, "Z",                               NORMAL, NULL, NULL,
- 176, "overbar",                         UNSUPP, NULL, NULL,
- 179, "degree",                          UNSUPP, NULL, NULL,
- 189, "Section sign",                    UNSUPP, NULL, NULL,
- 191, "Cent sign",                       UNSUPP, NULL, NULL,
- 243, "mu",                              UNSUPP, NULL, NULL,
- 244, "paragraph sign",                  UNSUPP, NULL, NULL,
- 246, "long dash",                       UNSUPP, NULL, NULL,
- 249, "Female ordinal",                  UNSUPP, NULL, NULL,
- 250, "Male ordinal",                    UNSUPP, NULL, NULL,
- 254, "Plus over minus sign",            UNSUPP, NULL, NULL,
- 175, "Italian Lira",                    UNSUPP, NULL, NULL,
- 186, "currency sign",                   UNSUPP, NULL, NULL,
- 187, "pound sterling",                  UNSUPP, NULL, NULL,
- 188, "Yen",                             UNSUPP, NULL, NULL,
- 190, "florin",                          UNSUPP, NULL, NULL,
- 227, "Eth",                             UNSUPP, NULL, NULL,
- 228, "eth",                             UNSUPP, NULL, NULL,
- 240, "Thorn",                           UNSUPP, NULL, NULL,
- 241, "thorn",                           UNSUPP, NULL, NULL,
- 245, "fraction 3/4",                    UNSUPP, NULL, NULL,
- 247, "fraction 1/4",                    UNSUPP, NULL, NULL,
- 248, "fraction 1/2",                    UNSUPP, NULL, NULL,
- 251, "French double open quote",        UNSUPP, NULL, NULL,
- 252, "Solid square",                    UNSUPP, NULL, NULL,
- 253, "French double close quote",       UNSUPP, NULL, NULL
+ 122, "z",                               NORMAL, 0, 0,
+  90, "Z",                               NORMAL, 0, 0,
+ 176, "overbar",                         UNSUPP, 0, 0,
+ 179, "degree",                          UNSUPP, 0, 0,
+ 189, "Section sign",                    UNSUPP, 0, 0,
+ 191, "Cent sign",                       UNSUPP, 0, 0,
+ 243, "mu",                              UNSUPP, 0, 0,
+ 244, "paragraph sign",                  UNSUPP, 0, 0,
+ 246, "long dash",                       UNSUPP, 0, 0,
+ 249, "Female ordinal",                  UNSUPP, 0, 0,
+ 250, "Male ordinal",                    UNSUPP, 0, 0,
+ 254, "Plus over minus sign",            UNSUPP, 0, 0,
+ 175, "Italian Lira",                    UNSUPP, 0, 0,
+ 186, "currency sign",                   UNSUPP, 0, 0,
+ 187, "pound sterling",                  UNSUPP, 0, 0,
+ 188, "Yen",                             UNSUPP, 0, 0,
+ 190, "florin",                          UNSUPP, 0, 0,
+ 227, "Eth",                             UNSUPP, 0, 0,
+ 228, "eth",                             UNSUPP, 0, 0,
+ 240, "Thorn",                           UNSUPP, 0, 0,
+ 241, "thorn",                           UNSUPP, 0, 0,
+ 245, "fraction 3/4",                    UNSUPP, 0, 0,
+ 247, "fraction 1/4",                    UNSUPP, 0, 0,
+ 248, "fraction 1/2",                    UNSUPP, 0, 0,
+ 251, "French double open quote",        UNSUPP, 0, 0,
+ 252, "Solid square",                    UNSUPP, 0, 0,
+ 253, "French double close quote",       UNSUPP, 0, 0
index d5e801dc8ade7f0b053254fb963ca57af1db1303..ed4dfb6cfc29f8804c963410dd0052933b6dd9ba 100644 (file)
@@ -36,7 +36,7 @@
 #include "entext.h"
 
 /* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
   {
@@ -45,7 +45,7 @@ void main(argc, argv)
       "prevcon=%d,token=%d,curcon=%d,scanval='%c'(%d),line=%d,netlevel=%d\n" ;
     static char name[] = "m_name = '%s'\n" ;
     static char literal[] = "m_literal = '%s'\n" ;
-#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__)
+#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux)
     char buffer[M_LITLEN + 80] ;
 #else
 #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d))
@@ -113,5 +113,7 @@ void main(argc, argv)
       }
     /* At EOF */
     m_done() ;
+
+    return EXIT_SUCCESS;
     }
 
index db3fe7ec420c3ee6687d7f0524f18b1ed408a288..f1fe677129bda990c4642eb55a026c4ea3001b3e 100644 (file)
@@ -454,7 +454,7 @@ LOGICAL m_lookent(
 #endif
   ) ;
 
-void main(
+int main(
 #if defined(M_PROTO)
   int argc, char **argv
 #endif
index 4388f4f3b7fcea1d13110547458361c2c9cc8152..52e042e6d1c7330903b38808bc0d5c79b6e8862e 100644 (file)
@@ -127,7 +127,7 @@ int m_lower(
 #endif
   ) ;
 
-void main(
+int main(
 #if defined(M_PROTO)
   int argc, char **argv
 #endif
index 03ea572400767d635a42bed16744b9a7be82bcca..a76fd480c6c89ed9c97d0ed4476e84d2baa31d28 100644 (file)
@@ -155,6 +155,7 @@ a #define of MAXD to the length of the longest delimiter is written to
 delim.h.
 */
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <stdlib.h>
 #if defined(MSDOS)
@@ -169,7 +170,7 @@ delim.h.
 #include "cont.h"
 
 /* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
 {
index 154a0dcb2e4b0cc06ec3ae2ada8193aef373d9c3..c4a69a7e55805f970a9501fa0e17410980f795bd 100644 (file)
@@ -51,7 +51,7 @@ void dumpdlmptr(M_NOPAR)
       if (n) fputs(",\n", delim);
       fprintf(delim, "  %s", dlmptr[n]);
       }
-    fprintf(delim, endif);
+    fprintf(delim, "%s", endif);
     }
 
 /* Output the generated data structures */
@@ -83,8 +83,8 @@ void dumptree(sparse)
       else fprintf(context, "0");
       if (i < ccount - 1) fprintf(context, ",\n  ");
       }
-    fprintf(delim, endif);
-    fprintf(context, endif);
+    fprintf(delim, "%s", endif);
+    fprintf(context, "%s", endif);
     nextcon(sparse);
     }
 
@@ -599,8 +599,8 @@ void nextcon(sparse)
         if (i > 0) fprintf(context, ",\n");
         fprintf(context, "  %d", firstinrow);
         }
-      fprintf(delim, endif);
-      fprintf(context, endif);
+      fprintf(delim, "%s", endif);
+      fprintf(context, "%s", endif);
       }
     else {
       fprintf(context,
@@ -616,7 +616,7 @@ void nextcon(sparse)
         if (i < ccount - 1) fprintf(context, ",");
         fprintf(context, "\n");
         }
-      fprintf(context, endif);
+      fprintf(context, "%s", endif);
       }
     }
   
index 4a7c1ef53a1e14e459ee5688fa593f5d070ff75f..4dd386fc5fcd658aa0c70d3828796014e97622eb 100644 (file)
@@ -306,8 +306,8 @@ void esuffix(M_NOPAR)
 void msgline(text)
   char *text ;
   {
-    fprintf(stderr, text) ;
-    fprintf(m_errfile, text) ;
+    fprintf(stderr, "%s", text) ;
+    fprintf(m_errfile, "%s", text) ;
     }
 
 /* Print something to both stderr and m_errfile */
index 2aa2b9a9a37f19112102e1c203334a7958150c4c..f3935c7dc7c989ef288b657d6531fa8d6f746c03 100644 (file)
@@ -58,7 +58,7 @@ struct data {
 char linedir[] = "#line" ;
 char *p = linedir, *q = linedir + 1 ;
 
-void main(
+int main(
 #if defined(M_PROTO)
   int argc, char **argv
 #endif
@@ -76,7 +76,7 @@ int nextchar(
 #endif
   ) ;
 
-void main(argc, argv)
+int main(argc, argv)
   int argc ;
   char **argv ;
   {
index 0d8b46ce76ac523f8814da9d12bf74c5e092e818..d4b73b5dc725ac6003e5335e3b37adca5b75d3a8 100644 (file)
@@ -25,6 +25,7 @@
               Copyright 1992 Hewlett-Packard Co.
 */
 
+#include <string.h>
 #include "basic.h"
 #include "trie.h"
 #include "cont.h"
index 842eadb00c0016c577bdd9fc605986b05b002d08..9a8a6f9f92712772841984caf6ff6b82a622705f 100644 (file)
@@ -51,7 +51,7 @@ void dumpdlmptr(M_NOPAR)
       if (n) fputs(",\n", delim);
       fprintf(delim, "  %s", dlmptr[n]);
       }
-    fprintf(delim, endif);
+    fprintf(delim, "%s", endif);
     }
 
 /* Output the generated data structures */
@@ -83,8 +83,8 @@ void dumptree(sparse)
       else fprintf(context, "0");
       if (i < ccount - 1) fprintf(context, ",\n  ");
       }
-    fprintf(delim, endif);
-    fprintf(context, endif);
+    fprintf(delim, "%s", endif);
+    fprintf(context, "%s", endif);
     nextcon(sparse);
     }
 
@@ -599,8 +599,8 @@ void nextcon(sparse)
         if (i > 0) fprintf(context, ",\n");
         fprintf(context, "  %d", firstinrow);
         }
-      fprintf(delim, endif);
-      fprintf(context, endif);
+      fprintf(delim, "%s", endif);
+      fprintf(context, "%s", endif);
       }
     else {
       fprintf(context,
@@ -616,7 +616,7 @@ void nextcon(sparse)
         if (i < ccount - 1) fprintf(context, ",");
         fprintf(context, "\n");
         }
-      fprintf(context, endif);
+      fprintf(context, "%s", endif);
       }
     }