diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-11 07:42:48 +0200 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-08-11 07:42:48 +0200 |
commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /lib-src/make-docfile.c | |
parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz |
Merge from trunk
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r-- | lib-src/make-docfile.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 51c30f91d8f..7fe63bed506 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -70,6 +70,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ int scan_file (char *filename); int scan_lisp_file (char *filename, char *mode); int scan_c_file (char *filename, char *mode); +void fatal (char *s1, char *s2) NO_RETURN; #ifdef MSDOS /* s/msdos.h defines this as sys_chdir, but we're not linking with the @@ -441,7 +442,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) register char *p; int in_ident = 0; char *ident_start; - int ident_length; + int ident_length = 0; fprintf (out, "(fn"); @@ -475,6 +476,12 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) identifier. */ if (c == ',' || c == ')') { + if (ident_length == 0) + { + error ("empty arg list for `%s' should be (void), not ()", func); + continue; + } + if (strncmp (ident_start, "void", ident_length) == 0) continue; @@ -488,7 +495,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) /* In C code, `default' is a reserved word, so we spell it `defalt'; unmangle that here. */ - if (strncmp (ident_start, "defalt", ident_length) == 0) + if (ident_length == 6 && strncmp (ident_start, "defalt", 6) == 0) fprintf (out, "DEFAULT"); else while (ident_length-- > 0) |