summaryrefslogtreecommitdiff
path: root/lib-src/make-docfile.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-01-13 16:49:49 +0000
committerGerd Moellmann <gerd@gnu.org>2001-01-13 16:49:49 +0000
commit291c7e74d29a51303395956a6cf200f41dd953f8 (patch)
treec7c067d0ddc95d09441e5b5ac3d5274392615ebe /lib-src/make-docfile.c
parent1c0e6fa43c52c1e32d4de0d27ebe257a46a4564f (diff)
downloademacs-291c7e74d29a51303395956a6cf200f41dd953f8.tar.gz
(write_c_args): Print newlines as spaces.
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r--lib-src/make-docfile.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index df557e7edb4..793c5e4211a 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -1,5 +1,6 @@
/* Generate doc-string file for GNU Emacs from source files.
- Copyright (C) 1985, 86, 92, 93, 94, 97, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1985, 86, 92, 93, 94, 97, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -300,10 +301,12 @@ write_c_args (out, func, buf, minargs, maxargs)
}
/* Print the C argument list as it would appear in lisp:
- print underscores as hyphens, and print commas as spaces.
- Collapse adjacent spaces into one. */
- if (c == '_') c = '-';
- if (c == ',') c = ' ';
+ print underscores as hyphens, and print commas and newlines
+ as spaces. Collapse adjacent spaces into one. */
+ if (c == '_')
+ c = '-';
+ else if (c == ',' || c == '\n')
+ c = ' ';
/* In C code, `default' is a reserved word, so we spell it
`defalt'; unmangle that here. */
@@ -319,7 +322,7 @@ write_c_args (out, func, buf, minargs, maxargs)
in_ident = 0;
just_spaced = 0;
}
- else if (c != ' ' || ! just_spaced)
+ else if (c != ' ' || !just_spaced)
{
if (c >= 'a' && c <= 'z')
/* Upcase the letter. */
@@ -327,7 +330,7 @@ write_c_args (out, func, buf, minargs, maxargs)
putc (c, out);
}
- just_spaced = (c == ' ');
+ just_spaced = c == ' ';
need_space = 0;
}
}