From affb9d521256601239fe27a25c9b6973cf9eac6e Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 23 Sep 1992 10:33:26 +0000 Subject: *** empty log message *** --- lib-src/make-docfile.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib-src') diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 676f29cb9c7..037e00e6800 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -143,36 +143,36 @@ write_c_args (out, buf, minargs, maxargs) char *buf; int minargs, maxargs; { - register int c; - register char *p = buf; + register char *p; int space = 0; fprintf (out, "arguments: "); - while (*p) + for (p = buf; *p; p++) { - c = *p++; - if (c == ',') + if (*p == ',' || p == buf) { - minargs--; - maxargs--; if (!space) putc (' ', out); if (minargs == 0 && maxargs > 0) fprintf (out, "&optional "); space = 1; + + minargs--; + maxargs--; + continue; } - else if (c == ' ' && space) + else if (*p == ' ' && space) continue; - space = (c == ' '); + space = (*p == ' '); /* Print the C arguments as they would appear in Elisp; print underscores as hyphens. */ - if (c == '_') + if (*p == '_') putc ('-', out); else - putc (c, out); + putc (*p, out); } putc ('\n', out); } -- cgit v1.2.1