]> code.delx.au - gnu-emacs/blobdiff - src/doprnt.c
(init_iterator): Set iterator's extra_line_spacing
[gnu-emacs] / src / doprnt.c
index 9afdd5ae8561bd98a123c8827b8d9633ac3cd1d7..1d792a9a29193a41dbb3dcfe42407318ed5ed363 100644 (file)
@@ -29,6 +29,14 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
 #include "lisp.h"
 
 #ifndef DBL_MAX_10_EXP
@@ -293,7 +301,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);