emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/editfns.c,v


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/src/editfns.c,v
Date: Fri, 23 Nov 2007 13:25:24 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Andreas Schwab <schwab> 07/11/23 13:25:24

Index: editfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/editfns.c,v
retrieving revision 1.452
retrieving revision 1.453
diff -u -b -r1.452 -r1.453
--- editfns.c   16 Nov 2007 00:19:10 -0000      1.452
+++ editfns.c   23 Nov 2007 13:25:23 -0000      1.453
@@ -3807,7 +3807,8 @@
                sprintf (p, this_format, XFLOAT_DATA (args[n]));
              else
                {
-                 if (sizeof (EMACS_INT) > sizeof (int))
+                 if (sizeof (EMACS_INT) > sizeof (int)
+                     && format[-1] != 'c')
                    {
                      /* Insert 'l' before format spec.  */
                      this_format[format - this_format_start]
@@ -3818,12 +3819,16 @@
 
                if (INTEGERP (args[n]))
                  {
-                   if (format[-1] == 'd')
+                     if (format[-1] == 'c')
+                       sprintf (p, this_format, (int) XINT (args[n]));
+                     else if (format[-1] == 'd')
                      sprintf (p, this_format, XINT (args[n]));
                    /* Don't sign-extend for octal or hex printing.  */
                    else
                      sprintf (p, this_format, XUINT (args[n]));
                  }
+                 else if (format[-1] == 'c')
+                   sprintf (p, this_format, (int) XFLOAT_DATA (args[n]));
                else if (format[-1] == 'd')
                  /* Maybe we should use "%1.0f" instead so it also works
                     for values larger than MAXINT.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]