changeset 1206:de54d705652f

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 23 Sep 1992 10:33:26 +0000
parents 56d315ca10ee
children af619d68a576
files lib-src/make-docfile.c
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/make-docfile.c	Wed Sep 23 04:21:23 1992 +0000
+++ b/lib-src/make-docfile.c	Wed Sep 23 10:33:26 1992 +0000
@@ -143,36 +143,36 @@
      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);
 }