* process.c (read_process_output, send_process, Fprocess_send_region):
Likewise.
* callproc.c (Fcall_process): Likewise.
+ * doprnt.c (doprnt): Likewise.
+ * indent.c (compute_motion): Likewise.
+ * character.c (strwidth): Make its argument const char *, not const
+ unsigned char *, since more callers prefer it that way. All callers
+ changed.
2011-02-06 Paul Eggert <eggert@cs.ucla.edu>
occupies on the screen. */
EMACS_INT
-strwidth (const unsigned char *str, EMACS_INT len)
+strwidth (const char *str, EMACS_INT len)
{
- return c_string_width (str, len, -1, NULL, NULL);
+ return c_string_width ((const unsigned char *) str, len, -1, NULL, NULL);
}
/* Return width of Lisp string STRING when displayed in the current
extern EMACS_INT str_as_unibyte (unsigned char *, EMACS_INT);
extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *,
EMACS_INT, int);
-extern EMACS_INT strwidth (const unsigned char *, EMACS_INT);
+extern EMACS_INT strwidth (const char *, EMACS_INT);
extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int,
EMACS_INT *, EMACS_INT *);
extern EMACS_INT lisp_string_width (Lisp_Object, int,
do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
#endif /* EMACS_CHARACTER_H */
-
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);
fmt++;
/* Copy this one %-spec into fmtcpy. */
- string = (unsigned char *) fmtcpy;
+ string = fmtcpy;
*string++ = '%';
while (1)
{
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':
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;
}
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;
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);
*bufptr = 0; /* Make sure our string end with a '\0' */
return bufptr - buffer;
}
-
unsigned char *ovstr;
EMACS_INT ovlen = overlay_strings (pos, win, &ovstr);
hpos += ((multibyte && ovlen > 0)
- ? strwidth (ovstr, ovlen) : ovlen);
+ ? strwidth ((char *) ovstr, ovlen) : ovlen);
}
did_motion = 0;