Merge from emacs-24; up to 2014-06-02T14:17:07Z!michael.albinus@gmx.de
[bpt/emacs.git] / lib-src / make-docfile.c
index b6cd153..2eb2413 100644 (file)
@@ -1,7 +1,7 @@
 /* Generate doc-string file for GNU Emacs from source files.
 
-Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2012
-  Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2014 Free Software
+Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -276,7 +276,7 @@ struct rcsoc_state
 /* Output CH to the file or buffer in STATE.  Any pending newlines or
    spaces are output first.  */
 
-static inline void
+static void
 put_char (int ch, struct rcsoc_state *state)
 {
   int out_ch;
@@ -555,7 +555,7 @@ enum global_type
   LISP_OBJECT,
   EMACS_INTEGER,
   BOOLEAN,
-  FUNCTION,
+  FUNCTION
 };
 
 /* A single global.  */
@@ -624,7 +624,7 @@ write_globals (void)
   qsort (globals, num_globals, sizeof (struct global), compare_globals);
   for (i = 0; i < num_globals; ++i)
     {
-      char const *type;
+      char const *type = 0;
 
       switch (globals[i].type)
        {
@@ -649,7 +649,7 @@ write_globals (void)
          fatal ("not a recognized DEFVAR_", 0);
        }
 
-      if (globals[i].type != FUNCTION)
+      if (type)
        {
          fprintf (outfile, "  %s f_%s;\n", type, globals[i].name);
          fprintf (outfile, "#define %s globals.f_%s\n",
@@ -1075,7 +1075,7 @@ read_lisp_symbol (FILE *infile, char *buffer)
 static int
 search_lisp_doc_at_eol (FILE *infile)
 {
-  char c = 0, c1 = 0, c2 = 0;
+  int c = 0, c1 = 0, c2 = 0;
 
   /* Skip until the end of line; remember two previous chars.  */
   while (c != '\n' && c != '\r' && c != EOF)
@@ -1090,8 +1090,7 @@ search_lisp_doc_at_eol (FILE *infile)
   if (c2 != '"' || c1 != '\\')
     {
 #ifdef DEBUG
-      fprintf (stderr, "## non-docstring in %s (%s)\n",
-              buffer, filename);
+      fprintf (stderr, "## non-docstring found\n");
 #endif
       if (c != EOF)
        ungetc (c, infile);
@@ -1118,7 +1117,9 @@ scan_lisp_file (const char *filename, const char *mode)
   } const uncompiled[] = {
     DEF_ELISP_FILE (loaddefs.el),
     DEF_ELISP_FILE (loadup.el),
-    DEF_ELISP_FILE (charprop.el)
+    DEF_ELISP_FILE (charprop.el),
+    DEF_ELISP_FILE (cp51932.el),
+    DEF_ELISP_FILE (eucjp-ms.el)
   };
   int i, match;
   size_t flen = strlen (filename);