diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-02-06 21:42:15 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-02-06 21:42:15 -0800 |
commit | 7469ef5d1bf4a7d2297fce554dc0980d4787ffb4 (patch) | |
tree | 179dafe5e7dda10542f948c83f55b578621232ca /src/doprnt.c | |
parent | 0ca76b1eacbc5df387325d8711d3add68486909a (diff) | |
download | emacs-7469ef5d1bf4a7d2297fce554dc0980d4787ffb4.tar.gz |
* doprnt.c, indent.c, character.c: conform to C89 pointer rules
Diffstat (limited to 'src/doprnt.c')
-rw-r--r-- | src/doprnt.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/doprnt.c b/src/doprnt.c index 979cce3c402..36eb272caae 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -71,11 +71,11 @@ doprnt (char *buffer, register int bufsize, const char *format, char *big_buffer = 0; register int tem; - unsigned char *string; + char *string; char fixed_buffer[20]; /* Default buffer for small formatting. */ char *fmtcpy; int minlen; - unsigned char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ + char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ if (format_end == 0) format_end = format + strlen (format); @@ -97,7 +97,7 @@ doprnt (char *buffer, register int bufsize, const char *format, fmt++; /* Copy this one %-spec into fmtcpy. */ - string = (unsigned char *) fmtcpy; + string = fmtcpy; *string++ = '%'; while (1) { @@ -166,7 +166,7 @@ doprnt (char *buffer, register int bufsize, const char *format, abort (); sprintf (sprintf_buffer, fmtcpy, va_arg(ap, char *)); /* Now copy into final output, truncating as nec. */ - string = (unsigned char *) sprintf_buffer; + string = sprintf_buffer; goto doit; case 'f': @@ -176,7 +176,7 @@ doprnt (char *buffer, register int bufsize, const char *format, double d = va_arg(ap, double); sprintf (sprintf_buffer, fmtcpy, d); /* Now copy into final output, truncating as nec. */ - string = (unsigned char *) sprintf_buffer; + string = sprintf_buffer; goto doit; } @@ -185,7 +185,7 @@ doprnt (char *buffer, register int bufsize, const char *format, case 's': if (fmtcpy[1] != 's') minlen = atoi (&fmtcpy[1]); - string = va_arg(ap, unsigned char *); + string = va_arg (ap, char *); tem = strlen (string); width = strwidth (string, tem); goto doit1; @@ -242,7 +242,7 @@ doprnt (char *buffer, register int bufsize, const char *format, both are passed the same way, otherwise we'll need to rewrite callers. */ EMACS_INT chr = va_arg(ap, EMACS_INT); - tem = CHAR_STRING ((int) chr, charbuf); + tem = CHAR_STRING ((int) chr, (unsigned char *) charbuf); string = charbuf; string[tem] = 0; width = strwidth (string, tem); @@ -277,4 +277,3 @@ doprnt (char *buffer, register int bufsize, const char *format, *bufptr = 0; /* Make sure our string end with a '\0' */ return bufptr - buffer; } - |