[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE]
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE] |
Date: |
Fri, 23 Nov 2007 13:27:13 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Andreas Schwab <schwab> 07/11/23 13:27:13
Index: editfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/editfns.c,v
retrieving revision 1.439.2.8
retrieving revision 1.439.2.9
diff -u -b -r1.439.2.8 -r1.439.2.9
--- editfns.c 16 Nov 2007 00:18:55 -0000 1.439.2.8
+++ editfns.c 23 Nov 2007 13:27:12 -0000 1.439.2.9
@@ -3809,7 +3809,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]
@@ -3820,12 +3821,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. */
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE], Andreas Schwab, 2007/11/15
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE], Andreas Schwab, 2007/11/15
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE], Andreas Schwab, 2007/11/15
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE], Andreas Schwab, 2007/11/15
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE], Andreas Schwab, 2007/11/15
- [Emacs-diffs] Changes to emacs/src/editfns.c,v [EMACS_22_BASE],
Andreas Schwab <=