summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-09-23 10:33:26 +0000
committerJim Blandy <jimb@redhat.com>1992-09-23 10:33:26 +0000
commitaffb9d521256601239fe27a25c9b6973cf9eac6e (patch)
tree030daad0e43b16f12330359102af308eaaf5f362 /lib-src
parent17ece0a25ef4a0d9bc4d3f28b189e9f14b4f9182 (diff)
downloademacs-affb9d521256601239fe27a25c9b6973cf9eac6e.tar.gz
*** empty log message ***
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/make-docfile.c22
1 files changed, 11 insertions, 11 deletions
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);
}