From 4df52042a5a9489d8974d7c1d0c7b862a7ca1703 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Feb 2011 11:37:54 -0800 Subject: [PATCH] * make-docfile.c (input_buffer): Rename variables to avoid shadowing. --- lib-src/ChangeLog | 2 ++ lib-src/make-docfile.c | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 042982aecb..d865754cb4 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2011-02-21 Paul Eggert + * make-docfile.c (input_buffer): Rename variables to avoid shadowing. + * movemail.c (main, pop_retr): Rename locals to avoid shadowing. (progname, sfi, sfo, ibuffer, obuffer): Remove unused vars. (DIRECTORY_SEP, IS_DIRECTORY_SEP, DONE, IS_FROM_LINE): diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 956e85f163..f0aa222986 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -255,7 +255,7 @@ start_globals (void) fprintf (outfile, "struct emacs_globals {\n"); } -static char buf[128]; +static char input_buffer[128]; /* Some state during the execution of `read_c_string_or_comment'. */ struct rcsoc_state @@ -395,7 +395,7 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa struct rcsoc_state state; state.in_file = infile; - state.buf_ptr = (printflag < 0 ? buf : 0); + state.buf_ptr = (printflag < 0 ? input_buffer : 0); state.out_file = (printflag > 0 ? outfile : 0); state.pending_spaces = 0; state.pending_newlines = 0; @@ -795,15 +795,15 @@ scan_c_file (char *filename, const char *mode) /* Read in the identifier. */ do { - buf[i++] = c; + input_buffer[i++] = c; c = getc (infile); } while (! (c == ',' || c == ' ' || c == '\t' || c == '\n' || c == '\r')); - buf[i] = '\0'; + input_buffer[i] = '\0'; name = xmalloc (i + 1); - memcpy (name, buf, i + 1); + memcpy (name, input_buffer, i + 1); add_global (type, name); continue; } @@ -888,7 +888,7 @@ scan_c_file (char *filename, const char *mode) putc (037, outfile); putc (defvarflag ? 'V' : 'F', outfile); - fprintf (outfile, "%s\n", buf); + fprintf (outfile, "%s\n", input_buffer); if (comment) getc (infile); /* Skip past `*' */ @@ -931,11 +931,12 @@ scan_c_file (char *filename, const char *mode) *p = '\0'; /* Output them. */ fprintf (outfile, "\n\n"); - write_c_args (outfile, buf, argbuf, minargs, maxargs); + write_c_args (outfile, input_buffer, argbuf, minargs, maxargs); } else if (defunflag && maxargs == -1 && !saw_usage) /* The DOC should provide the usage form. */ - fprintf (stderr, "Missing `usage' for function `%s'.\n", buf); + fprintf (stderr, "Missing `usage' for function `%s'.\n", + input_buffer); } } eof: -- 2.20.1