From: Eli Zaretskii Date: Fri, 29 Apr 2011 19:34:06 +0000 (+0300) Subject: Don't abort in doprnt when passed unsupported %ll modifier. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~170 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ae940ccad19a554e1134b7ae443716e46c72366d;p=emacs.git Don't abort in doprnt when passed unsupported %ll modifier. src/doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of aborting when %lld or %lll format is passed. [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when %llo or %llx format is passed. (Bug#8545) --- diff --git a/src/ChangeLog b/src/ChangeLog index f029daa684d..14d5ac9de48 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-04-29 Eli Zaretskii + * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of + aborting when %lld or %lll format is passed. + [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when + %llo or %llx format is passed. (Bug#8545) + * window.c (window_scroll_line_based): Use a marker instead of simple variables to record original value of point. (Bug#7952) diff --git a/src/doprnt.c b/src/doprnt.c index 2508ddd831a..7b4bd35d5b1 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -269,7 +269,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format, long long ll = va_arg (ap, long long); sprintf (sprintf_buffer, fmtcpy, ll); #else - abort (); + error ("Invalid format operation %%ll%c", fmt[-1]); #endif } else if (long_flag) @@ -299,7 +299,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format, unsigned long long ull = va_arg (ap, unsigned long long); sprintf (sprintf_buffer, fmtcpy, ull); #else - abort (); + error ("Invalid format operation %%ll%c", fmt[-1]); #endif } else if (long_flag)