* lisp/emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious
[bpt/emacs.git] / src / doprnt.c
index 638fa4d..b8eb0f0 100644 (file)
@@ -1,7 +1,7 @@
 /* Output like sprintf to a buffer of specified size.
    Also takes args differently: pass one pointer to the end
    of the format string in addition to the format string itself.
-   Copyright (C) 1985, 2001-2011  Free Software Foundation, Inc.
+   Copyright (C) 1985, 2001-2012  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -26,7 +26,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
      of the (`int') argument, suitable for display in an Emacs buffer.
 
    . For %s and %c, when field width is specified (e.g., %25s), it accounts for
-     the diplay width of each character, according to char-width-table.  That
+     the display width of each character, according to char-width-table.  That
      is, it does not assume that each character takes one column on display.
 
    . If the size of the buffer is not enough to produce the formatted string in
@@ -347,7 +347,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
            case 'e':
            case 'g':
              {
-               double d = va_arg(ap, double);
+               double d = va_arg (ap, double);
                sprintf (sprintf_buffer, fmtcpy, d);
                /* Now copy into final output, truncating as necessary.  */
                string = sprintf_buffer;
@@ -427,7 +427,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
 
            case 'c':
              {
-               int chr = va_arg(ap, int);
+               int chr = va_arg (ap, int);
                tem = CHAR_STRING (chr, (unsigned char *) charbuf);
                string = charbuf;
                string[tem] = 0;
@@ -486,6 +486,8 @@ esprintf (char *buf, char const *format, ...)
   return nbytes;
 }
 
+#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
+
 /* Format to buffer *BUF of positive size *BUFSIZE, reallocating *BUF
    and updating *BUFSIZE if the buffer is too small, and otherwise
    behaving line esprintf.  When reallocating, free *BUF unless it is
@@ -505,6 +507,8 @@ exprintf (char **buf, ptrdiff_t *bufsize,
   return nbytes;
 }
 
+#endif
+
 /* Act like exprintf, except take a va_list.  */
 ptrdiff_t
 evxprintf (char **buf, ptrdiff_t *bufsize,