From 57ace6d0d302ccfb83e5b5ff20a39e57bab86dd1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Feb 2011 18:18:35 -0800 Subject: [PATCH] * data.c etc: conform to C89 pointer rules --- src/ChangeLog | 2 ++ src/data.c | 5 ++--- src/lisp.h | 2 +- src/print.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a21d71e17b3..a3e68dd92b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,8 @@ * search.c (Freplace_match, Fregexp_quote): Likewise. * alloc.c (make_string, make_specified_string, make_pure_string): Likewise. + * data.c (Fstring_to_number): Likewise. + * print.c (float_to_string): Likewise. 2011-02-06 Paul Eggert diff --git a/src/data.c b/src/data.c index 927bc7c5a47..77cdbabb2d5 100644 --- a/src/data.c +++ b/src/data.c @@ -2417,7 +2417,7 @@ present, base 10 is used. BASE must be between 2 and 16 (inclusive). If the base used is not 10, STRING is always parsed as integer. */) (register Lisp_Object string, Lisp_Object base) { - register unsigned char *p; + register char *p; register int b; int sign = 1; Lisp_Object val; @@ -2436,7 +2436,7 @@ If the base used is not 10, STRING is always parsed as integer. */) /* Skip any whitespace at the front of the number. Some versions of atoi do this anyway, so we might as well make Emacs lisp consistent. */ - p = SDATA (string); + p = SSDATA (string); while (*p == ' ' || *p == '\t') p++; @@ -3334,4 +3334,3 @@ init_data (void) signal (SIGEMT, arith_error); #endif /* uts */ } - diff --git a/src/lisp.h b/src/lisp.h index 7821efff8ef..4afc73195fd 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2787,7 +2787,7 @@ extern void print_error_message (Lisp_Object, Lisp_Object, const char *, extern Lisp_Object internal_with_output_to_temp_buffer (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); #define FLOAT_TO_STRING_BUFSIZE 350 -extern void float_to_string (unsigned char *, double); +extern void float_to_string (char *, double); extern void syms_of_print (void); /* Defined in doprnt.c */ diff --git a/src/print.c b/src/print.c index 09904e078b8..fe2c8e15932 100644 --- a/src/print.c +++ b/src/print.c @@ -1016,9 +1016,9 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context, */ void -float_to_string (unsigned char *buf, double data) +float_to_string (char *buf, double data) { - unsigned char *cp; + char *cp; int width; /* Check for plus infinity in a way that won't lose @@ -1067,7 +1067,7 @@ float_to_string (unsigned char *buf, double data) /* Check that the spec we have is fully valid. This means not only valid for printf, but meant for floats, and reasonable. */ - cp = SDATA (Vfloat_output_format); + cp = SSDATA (Vfloat_output_format); if (cp[0] != '%') goto lose; -- 2.39.5