diff options
| author | Jim Blandy | 1992-09-23 10:33:26 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-09-23 10:33:26 +0000 |
| commit | f125a9e8b5f2894df9d731f6479afd86d60d93fe (patch) | |
| tree | 221dbe5839718cfc4ff90a4fea6839c76fd4406a /lib-src | |
| parent | 791cc57dfa6c20fef571ef3467a06e309c3ec1be (diff) | |
| download | emacs-f125a9e8b5f2894df9d731f6479afd86d60d93fe.tar.gz emacs-f125a9e8b5f2894df9d731f6479afd86d60d93fe.zip | |
*** empty log message ***
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/make-docfile.c | 22 |
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) | |||
| 143 | char *buf; | 143 | char *buf; |
| 144 | int minargs, maxargs; | 144 | int minargs, maxargs; |
| 145 | { | 145 | { |
| 146 | register int c; | 146 | register char *p; |
| 147 | register char *p = buf; | ||
| 148 | int space = 0; | 147 | int space = 0; |
| 149 | 148 | ||
| 150 | fprintf (out, "arguments: "); | 149 | fprintf (out, "arguments: "); |
| 151 | 150 | ||
| 152 | while (*p) | 151 | for (p = buf; *p; p++) |
| 153 | { | 152 | { |
| 154 | c = *p++; | 153 | if (*p == ',' || p == buf) |
| 155 | if (c == ',') | ||
| 156 | { | 154 | { |
| 157 | minargs--; | ||
| 158 | maxargs--; | ||
| 159 | if (!space) | 155 | if (!space) |
| 160 | putc (' ', out); | 156 | putc (' ', out); |
| 161 | if (minargs == 0 && maxargs > 0) | 157 | if (minargs == 0 && maxargs > 0) |
| 162 | fprintf (out, "&optional "); | 158 | fprintf (out, "&optional "); |
| 163 | space = 1; | 159 | space = 1; |
| 160 | |||
| 161 | minargs--; | ||
| 162 | maxargs--; | ||
| 163 | |||
| 164 | continue; | 164 | continue; |
| 165 | } | 165 | } |
| 166 | else if (c == ' ' && space) | 166 | else if (*p == ' ' && space) |
| 167 | continue; | 167 | continue; |
| 168 | space = (c == ' '); | 168 | space = (*p == ' '); |
| 169 | 169 | ||
| 170 | /* Print the C arguments as they would appear in Elisp; | 170 | /* Print the C arguments as they would appear in Elisp; |
| 171 | print underscores as hyphens. */ | 171 | print underscores as hyphens. */ |
| 172 | if (c == '_') | 172 | if (*p == '_') |
| 173 | putc ('-', out); | 173 | putc ('-', out); |
| 174 | else | 174 | else |
| 175 | putc (c, out); | 175 | putc (*p, out); |
| 176 | } | 176 | } |
| 177 | putc ('\n', out); | 177 | putc ('\n', out); |
| 178 | } | 178 | } |