*** empty log message ***
[bpt/emacs.git] / src / doprnt.c
index 2e8f498..3fd6222 100644 (file)
@@ -48,8 +48,6 @@ Boston, MA 02111-1307, USA.  */
    another macro.  */
 #include "charset.h"
 
-extern long *xmalloc (), *xrealloc ();
-
 static int doprnt1 ();
 
 /* Generate output from a format-spec FORMAT,
@@ -120,7 +118,6 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args)
   char fixed_buffer[20];       /* Default buffer for small formatting. */
   char *fmtcpy;
   int minlen;
-  int size;                    /* Field width factor; e.g., %90d */
   unsigned char charbuf[5];    /* Used for %c.  */
 
   if (format_end == 0)
@@ -243,7 +240,7 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args)
              if (lispstrings)
                {
                  string = ((struct Lisp_String *)args[cnt])->data;
-                 tem = ((struct Lisp_String *)args[cnt])->size;
+                 tem = STRING_BYTES ((struct Lisp_String *)args[cnt]);
                  cnt++;
                }
              else
@@ -301,7 +298,8 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args)
            case 'c':
              if (cnt == nargs)
                error ("not enough arguments for format string");
-             tem = CHAR_STRING ((int) (EMACS_INT) args[cnt], charbuf, string);
+             tem = CHAR_STRING ((int) (EMACS_INT) args[cnt], charbuf);
+             string = charbuf;
              cnt++;
              string[tem] = 0;
              width = strwidth (string, tem);