* data.c etc: conform to C89 pointer rules
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Feb 2011 02:18:35 +0000 (18:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Feb 2011 02:18:35 +0000 (18:18 -0800)
src/ChangeLog
src/data.c
src/lisp.h
src/print.c

index a21d71e..a3e68dd 100644 (file)
@@ -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  <eggert@cs.ucla.edu>
 
index 927bc7c..77cdbab 100644 (file)
@@ -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 */
 }
-
index 7821eff..4afc731 100644 (file)
@@ -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 */
index 09904e0..fe2c8e1 100644 (file)
@@ -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;