diff options
| author | Karoly Lorentey | 2007-01-13 22:59:28 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-01-13 22:59:28 +0000 |
| commit | 38db5c8d522cc1faa8190e77dbc932a5560e6aad (patch) | |
| tree | efe4c81d7210843bb208282461ebce12c5bd3daf /src/editfns.c | |
| parent | 191ae1cf7cd2571277635b3b8e488e773ca5c9b9 (diff) | |
| parent | b4ec8cb4e66f94547e8215a1c1eb6cda3b83ca63 (diff) | |
| download | emacs-38db5c8d522cc1faa8190e77dbc932a5560e6aad.tar.gz emacs-38db5c8d522cc1faa8190e77dbc932a5560e6aad.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-592
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-593
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-594
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-595
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-596
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-597
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-598
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-186
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-187
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-188
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-189
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-190
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-191
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-593
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c index 6089ee9a2e2..ab29a07b693 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Lisp functions pertaining to editing. | 1 | /* Lisp functions pertaining to editing. |
| 2 | Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, | 2 | Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, |
| 3 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006 Free Software Foundation, Inc. | 4 | 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -3631,7 +3631,12 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3631 | if (*format != 'd' && *format != 'o' && *format != 'x' | 3631 | if (*format != 'd' && *format != 'o' && *format != 'x' |
| 3632 | && *format != 'i' && *format != 'X' && *format != 'c') | 3632 | && *format != 'i' && *format != 'X' && *format != 'c') |
| 3633 | error ("Invalid format operation %%%c", *format); | 3633 | error ("Invalid format operation %%%c", *format); |
| 3634 | args[n] = Ftruncate (args[n], Qnil); | 3634 | /* This fails unnecessarily if args[n] is bigger than |
| 3635 | most-positive-fixnum but smaller than MAXINT. | ||
| 3636 | These cases are important because we sometimes use floats | ||
| 3637 | to represent such integer values (typically such values | ||
| 3638 | come from UIDs or PIDs). */ | ||
| 3639 | /* args[n] = Ftruncate (args[n], Qnil); */ | ||
| 3635 | } | 3640 | } |
| 3636 | 3641 | ||
| 3637 | /* Note that we're using sprintf to print floats, | 3642 | /* Note that we're using sprintf to print floats, |
| @@ -3799,8 +3804,15 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3799 | else | 3804 | else |
| 3800 | sprintf (p, this_format, XUINT (args[n])); | 3805 | sprintf (p, this_format, XUINT (args[n])); |
| 3801 | } | 3806 | } |
| 3802 | else | 3807 | else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g') |
| 3803 | sprintf (p, this_format, XFLOAT_DATA (args[n])); | 3808 | sprintf (p, this_format, XFLOAT_DATA (args[n])); |
| 3809 | else if (format[-1] == 'd') | ||
| 3810 | /* Maybe we should use "%1.0f" instead so it also works | ||
| 3811 | for values larger than MAXINT. */ | ||
| 3812 | sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n])); | ||
| 3813 | else | ||
| 3814 | /* Don't sign-extend for octal or hex printing. */ | ||
| 3815 | sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n])); | ||
| 3804 | 3816 | ||
| 3805 | if (p > buf | 3817 | if (p > buf |
| 3806 | && multibyte | 3818 | && multibyte |