Commit 54b8e3f7 authored by Paul Eggert's avatar Paul Eggert

Merge from mainline.

parents 8f41de3a fc3b7291
2011-04-27 Niels Giesen <niels.giesen@gmail.com>
* calendar/icalendar.el (diary-lib): Add require statement.
(icalendar--create-uid): Read out a uid from a text-property on
the first character in the entry. This allows for code to add its
own uid to the entry.
(icalendar--convert-float-to-ical): Add export of
`diary-float'-entries save for those with the optional DAY
argument.
2011-04-27 Daniel Colascione <dan.colascione@gmail.com> 2011-04-27 Daniel Colascione <dan.colascione@gmail.com>
* subr.el (shell-quote-argument): Use alternate escaping strategy * subr.el (shell-quote-argument): Use alternate escaping strategy
...@@ -7,7 +17,7 @@ ...@@ -7,7 +17,7 @@
* cus-start.el (all): Define customization for debug-on-event. * cus-start.el (all): Define customization for debug-on-event.
2011-04-26 Daniel Colascione <dan.colascione@gmail.com> 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* subr.el (shell-quote-argument): Escape correctly under Windows. * subr.el (shell-quote-argument): Escape correctly under Windows.
...@@ -65,7 +75,7 @@ ...@@ -65,7 +75,7 @@
(gnutls-negotiate): Adjust `gnutls-negotiate' declaration. (gnutls-negotiate): Adjust `gnutls-negotiate' declaration.
* subr.el (shell-quote-argument): Escape correctly under Windows. * subr.el (shell-quote-argument): Escape correctly under Windows.
2011-04-24 Daniel Colascione <dan.colascione@gmail.com> 2011-04-24 Daniel Colascione <dan.colascione@gmail.com>
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): * progmodes/cc-engine.el (c-forward-decl-or-cast-1):
Use correct match group (bug#8438). Use correct match group (bug#8438).
...@@ -131,7 +141,7 @@ ...@@ -131,7 +141,7 @@
* image-mode.el (image-type, image-mode-map, image-minor-mode-map) * image-mode.el (image-type, image-mode-map, image-minor-mode-map)
(image-toggle-display): Doc fix. (image-toggle-display): Doc fix.
2011-04-23 Stephen Berman <stephen.berman@gmx.net> 2011-04-23 Stephen Berman <stephen.berman@gmx.net>
* textmodes/page.el (what-page): Use line-number-at-pos to * textmodes/page.el (what-page): Use line-number-at-pos to
calculate line number (Bug#6825). calculate line number (Bug#6825).
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
;; week of the year 2000 when they are exported. ;; week of the year 2000 when they are exported.
;; - Yearly diary entries are assumed to occur the first time in the year ;; - Yearly diary entries are assumed to occur the first time in the year
;; 1900 when they are exported. ;; 1900 when they are exported.
;; - Float diary entries are assumed to occur the first time on the
;; day when they are exported.
;;; History: ;;; History:
...@@ -241,6 +243,7 @@ code for the event, and your personal domain name." ...@@ -241,6 +243,7 @@ code for the event, and your personal domain name."
;; all the other libs we need ;; all the other libs we need
;; ====================================================================== ;; ======================================================================
(require 'calendar) (require 'calendar)
(require 'diary-lib)
;; ====================================================================== ;; ======================================================================
;; misc ;; misc
...@@ -925,27 +928,30 @@ ENTRY-FULL is the full diary entry string. CONTENTS is the ...@@ -925,27 +928,30 @@ ENTRY-FULL is the full diary entry string. CONTENTS is the
current iCalendar object, as a string. Increase current iCalendar object, as a string. Increase
`icalendar--uid-count'. Returns the UID string." `icalendar--uid-count'. Returns the UID string."
(let ((uid icalendar-uid-format)) (let ((uid icalendar-uid-format))
(if
(setq uid (replace-regexp-in-string ;; Allow other apps (such as org-mode) to create its own uid
"%c" (get-text-property 0 'uid entry-full)
(format "%d" icalendar--uid-count) (setq uid (get-text-property 0 'uid entry-full))
uid t t)) (setq uid (replace-regexp-in-string
(setq icalendar--uid-count (1+ icalendar--uid-count)) "%c"
(setq uid (replace-regexp-in-string (format "%d" icalendar--uid-count)
"%t" uid t t))
(format "%d%d%d" (car (current-time)) (setq icalendar--uid-count (1+ icalendar--uid-count))
(cadr (current-time)) (setq uid (replace-regexp-in-string
(car (cddr (current-time)))) "%t"
uid t t)) (format "%d%d%d" (car (current-time))
(setq uid (replace-regexp-in-string (cadr (current-time))
"%h" (car (cddr (current-time))))
(format "%d" (abs (sxhash entry-full))) uid t t)) uid t t))
(setq uid (replace-regexp-in-string (setq uid (replace-regexp-in-string
"%u" (or user-login-name "UNKNOWN_USER") uid t t)) "%h"
(let ((dtstart (if (string-match "^DTSTART[^:]*:\\([0-9]*\\)" contents) (format "%d" (abs (sxhash entry-full))) uid t t))
(substring contents (match-beginning 1) (match-end 1)) (setq uid (replace-regexp-in-string
"DTSTART"))) "%u" (or user-login-name "UNKNOWN_USER") uid t t))
(setq uid (replace-regexp-in-string "%s" dtstart uid t t))) (let ((dtstart (if (string-match "^DTSTART[^:]*:\\([0-9]*\\)" contents)
(substring contents (match-beginning 1) (match-end 1))
"DTSTART")))
(setq uid (replace-regexp-in-string "%s" dtstart uid t t))))
;; Return the UID string ;; Return the UID string
uid)) uid))
...@@ -1545,18 +1551,65 @@ entries. ENTRY-MAIN is the first line of the diary entry." ...@@ -1545,18 +1551,65 @@ entries. ENTRY-MAIN is the first line of the diary entry."
nil)) nil))
(defun icalendar--convert-float-to-ical (nonmarker entry-main) (defun icalendar--convert-float-to-ical (nonmarker entry-main)
"Convert float diary entry to icalendar format -- unsupported! "Convert float diary entry to icalendar format -- partially unsupported!
FIXME! FIXME! DAY from diary-float yet unimplemented.
NONMARKER is a regular expression matching the start of non-marking NONMARKER is a regular expression matching the start of non-marking
entries. ENTRY-MAIN is the first line of the diary entry." entries. ENTRY-MAIN is the first line of the diary entry."
(if (string-match (concat nonmarker (if (string-match (concat nonmarker "%%\\((diary-float .+\\) ?$") entry-main)
"%%(diary-float \\([^)]+\\))\\s-*\\(.*?\\) ?$") (with-temp-buffer
entry-main) (insert (match-string 1 entry-main))
(progn (goto-char (point-min))
(icalendar--dmsg "diary-float %s" entry-main) (let* ((sexp (read (current-buffer))) ;using `read' here
(error "`diary-float' is not supported yet")) ;easier than regexp
;matching, esp. with
;different forms of
;MONTH
(month (nth 1 sexp))
(dayname (nth 2 sexp))
(n (nth 3 sexp))
(day (nth 4 sexp))
(summary
(replace-regexp-in-string
"\\(^\s+\\|\s+$\\)" ""
(buffer-substring (point) (point-max)))))
(when day
(progn
(icalendar--dmsg "diary-float %s" entry-main)
(error "Don't know if or how to implement day in `diary-float'")))
(list (concat
;;Start today (yes this is an arbitrary choice):
"\nDTSTART;VALUE=DATE:"
(format-time-string "%Y%m%d" (current-time))
;;BUT remove today if `diary-float'
;;expression does not hold true for today:
(when
(null (let ((date (calendar-current-date))
(entry entry-main))
(diary-float month dayname n)))
(concat
"\nEXDATE;VALUE=DATE:"
(format-time-string "%Y%m%d" (current-time))))
"\nRRULE:"
(if (or (numberp month) (listp month))
"FREQ=YEARLY;BYMONTH="
"FREQ=MONTHLY")
(when
(listp month)
(mapconcat
(lambda (m)
(number-to-string m))
(cadr month) ","))
(when
(numberp month)
(number-to-string month))
";BYDAY="
(number-to-string n)
(aref icalendar--weekday-array dayname))
summary)))
;; no match ;; no match
nil)) nil))
......
2011-04-27 Eli Zaretskii <eliz@gnu.org>
* inc/inttypes.h: New file.
* config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
(HAVE_STRTOULL, HAVE_STRTOUMAX): New macros.
2011-04-27 Daniel Colascione <dan.colascione@gmail.com> 2011-04-27 Daniel Colascione <dan.colascione@gmail.com>
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions
inside quotation marks and bail out. inside quotation marks and bail out.
2011-04-26 Daniel Colascione <dan.colascione@gmail.com> 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* cmdproxy.c (try_dequote_cmdline): New function. * cmdproxy.c (try_dequote_cmdline): New function.
(main): Use it. (main): Use it.
......
...@@ -299,6 +299,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -299,6 +299,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `localtime_r' function. */ /* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R #undef HAVE_LOCALTIME_R
/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
don't. */
#define HAVE_DECL_STRTOULL 1
/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
don't. */
#define HAVE_DECL_STRTOUMAX 1
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1
/* Define to 1 if you have the `strtoumax' function. */
#define HAVE_STRTOUMAX 1
/* Define if you have the 'wchar_t' type. */ /* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1 #define HAVE_WCHAR_T 1
......
/* Replacement inntypes.h file for building GNU Emacs on Windows with MSVC.
Copyright (C) 2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _REPL_INTTYPES_H
#define _REPL_INTTYPES_H
#ifdef __MINGW32__
#include_next <inttypes.h>
#else /* !__MINGW32__ */
#define uintmax_t unsigned __int64
#define strtoumax _strtoui64
#endif /* !__MINGW32__ */
#endif
...@@ -2,6 +2,19 @@ ...@@ -2,6 +2,19 @@
* doprnt.c (doprnt): Support "ll" length modifier, for long long. * doprnt.c (doprnt): Support "ll" length modifier, for long long.
2011-04-27 Eli Zaretskii <eliz@gnu.org>
Improve `doprnt' and its usage. (Bug#8545)
* doprnt.c (doprnt): Make sure `format' is never accessed beyond
`format_end'. Remove support for %l as a conversion specifier.
Don't use xrealloc. Improve diagnostics when the %l size modifier
is used. Update the commentary.
* eval.c (verror): Simplify calculation of size_t.
* coding.c (Ffind_operation_coding_system): Fix diagnostic error
messages.
2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change) 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
* buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
...@@ -21,7 +34,7 @@ ...@@ -21,7 +34,7 @@
Remove unused local. Remove unused local.
(emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546) * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
GCC 4.6.0 optimizes based on type-based alias analysis. For GCC 4.6.0 optimizes based on type-based alias analysis. For
example, if b is of type struct buffer * and v of type struct example, if b is of type struct buffer * and v of type struct
Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
...@@ -213,7 +226,7 @@ ...@@ -213,7 +226,7 @@
supposed to be handshaking. (Bug#8556) supposed to be handshaking. (Bug#8556)
Reported by Paul Eggert <eggert@cs.ucla.edu>. Reported by Paul Eggert <eggert@cs.ucla.edu>.
2011-04-26 Daniel Colascione <dan.colascione@gmail.com> 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* lisp.h (Qdebug): List symbol. * lisp.h (Qdebug): List symbol.
* eval.c (Qdebug): Restore global linkage. * eval.c (Qdebug): Restore global linkage.
...@@ -469,8 +482,8 @@ ...@@ -469,8 +482,8 @@
define if USE_GTK || USE_X_TOOLKIT. define if USE_GTK || USE_X_TOOLKIT.
(SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK. (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
* xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT. * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
* xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only if * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK. if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
* xmenu.c (menu_help_callback): Pointer type fixes. * xmenu.c (menu_help_callback): Pointer type fixes.
Use const pointers when pointing at readonly data. Avoid pointer Use const pointers when pointing at readonly data. Avoid pointer
......
...@@ -9282,14 +9282,15 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) ...@@ -9282,14 +9282,15 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
|| !NATNUMP (target_idx = Fget (operation, Qtarget_idx))) || !NATNUMP (target_idx = Fget (operation, Qtarget_idx)))
error ("Invalid first argument"); error ("Invalid first argument");
if (nargs < 1 + XFASTINT (target_idx)) if (nargs < 1 + XFASTINT (target_idx))
error ("Too few arguments for operation: %s", error ("Too few arguments for operation `%s'",
SDATA (SYMBOL_NAME (operation))); SDATA (SYMBOL_NAME (operation)));
target = args[XFASTINT (target_idx) + 1]; target = args[XFASTINT (target_idx) + 1];
if (!(STRINGP (target) if (!(STRINGP (target)
|| (EQ (operation, Qinsert_file_contents) && CONSP (target) || (EQ (operation, Qinsert_file_contents) && CONSP (target)
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
error ("Invalid %"pI"dth argument", XFASTINT (target_idx) + 1); error ("Invalid argument %"pI"d of operation `%s'",
XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
if (CONSP (target)) if (CONSP (target))
target = XCAR (target); target = XCAR (target);
......
...@@ -55,7 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -55,7 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
%s means print a string argument. %s means print a string argument.
%S is silently treated as %s, for loose compatibility with `Fformat'. %S is silently treated as %s, for loose compatibility with `Fformat'.
%d means print a `signed int' argument in decimal. %d means print a `signed int' argument in decimal.
%l means print a `long int' argument in decimal.
%o means print an `unsigned int' argument in octal. %o means print an `unsigned int' argument in octal.
%x means print an `unsigned int' argument in hex. %x means print an `unsigned int' argument in hex.
%e means print a `double' argument in exponential notation. %e means print a `double' argument in exponential notation.
...@@ -65,24 +64,28 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -65,24 +64,28 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
%c means print a `signed int' argument as a single character. %c means print a `signed int' argument as a single character.
%% means produce a literal % character. %% means produce a literal % character.
A %-sequence may contain optional flag, width, and precision specifiers, as A %-sequence may contain optional flag, width, and precision specifiers, and
follows: a length modifier, as follows:
%<flags><width><precision>character %<flags><width><precision><length>character
where flags is [+ -0l], width is [0-9]+, and precision is .[0-9]+ where flags is [+ -0l], width is [0-9]+, and precision is .[0-9]+
The + flag character inserts a + before any positive number, while a space The + flag character inserts a + before any positive number, while a space
inserts a space before any positive number; these flags only affect %d, %l, inserts a space before any positive number; these flags only affect %d, %o,
%o, %x, %e, %f, and %g sequences. The - and 0 flags affect the width %x, %e, %f, and %g sequences. The - and 0 flags affect the width specifier,
specifier, as described below. as described below. For signed numerical arguments only, the ` ' (space)
flag causes the result to be prefixed with a space character if it does not
The l (lower-case letter ell) flag is a `long' data type modifier: it is start with a sign (+ or -).
supported for %d, %o, and %x conversions of integral arguments, and means
that the respective argument is to be treated as `long int' or `unsigned The l (lower-case letter ell) length modifier is a `long' data type
long int'. ll means to use 'long long'. EMACS_INT arguments modifier: it is supported for %d, %o, and %x conversions of integral
should use the pI macro, which expands to whatever length modifier arguments, must immediately precede the conversion specifier, and means that
is needed for the target host, e.g., "", "l", "ll". the respective argument is to be treated as `long int' or `unsigned long
int'. Similarly, ll (two letter ells) means to use `long long int' or
`unsigned long long int'. The empty length modifier means to use `int' or
`unsigned int'. EMACS_INT arguments should use the pI macro, which
expands to whatever length modifier is needed for the target host.
The width specifier supplies a lower limit for the length of the printed The width specifier supplies a lower limit for the length of the printed
representation. The padding, if any, normally goes on the left, but it goes representation. The padding, if any, normally goes on the left, but it goes
...@@ -168,7 +171,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -168,7 +171,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
bufsize--; bufsize--;
/* Loop until end of format string or buffer full. */ /* Loop until end of format string or buffer full. */
while (fmt != format_end && bufsize > 0) while (fmt < format_end && bufsize > 0)
{ {
if (*fmt == '%') /* Check for a '%' character */ if (*fmt == '%') /* Check for a '%' character */
{ {
...@@ -180,7 +183,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -180,7 +183,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
/* Copy this one %-spec into fmtcpy. */ /* Copy this one %-spec into fmtcpy. */
string = fmtcpy; string = fmtcpy;
*string++ = '%'; *string++ = '%';
while (1) while (fmt < format_end)
{ {
*string++ = *fmt; *string++ = *fmt;
if ('0' <= *fmt && *fmt <= '9') if ('0' <= *fmt && *fmt <= '9')
...@@ -190,7 +193,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -190,7 +193,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
%1.1000f and %1000.1f both might need 1000+ bytes. %1.1000f and %1000.1f both might need 1000+ bytes.
Parse the width or precision, checking for overflow. */ Parse the width or precision, checking for overflow. */
size_t n = *fmt - '0'; size_t n = *fmt - '0';
while ('0' <= fmt[1] && fmt[1] <= '9') while (fmt < format_end
&& '0' <= fmt[1] && fmt[1] <= '9')
{ {
if (n >= SIZE_MAX / 10 if (n >= SIZE_MAX / 10
|| n * 10 > SIZE_MAX - (fmt[1] - '0')) || n * 10 > SIZE_MAX - (fmt[1] - '0'))
...@@ -206,20 +210,16 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -206,20 +210,16 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
; ;
else if (*fmt == 'l') else if (*fmt == 'l')
{ {
long_flag = 1; long_flag = 1 + (fmt + 1 < fmt_end && fmt[1] == 'l');
if (fmt[1] == 'l') fmt += long_flag;
{ break;
long_flag = 2;
fmt++;
}
if (!strchr ("dox", fmt[1]))
/* %l as conversion specifier, not as modifier. */
break;
} }
else else
break; break;
fmt++; fmt++;
} }
if (fmt > format_end)
fmt = format_end;
*string = 0; *string = 0;
/* Make the size bound large enough to handle floating point formats /* Make the size bound large enough to handle floating point formats
...@@ -232,9 +232,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -232,9 +232,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
if (size_bound > size_allocated) if (size_bound > size_allocated)
{ {
if (big_buffer) if (big_buffer)
big_buffer = (char *) xrealloc (big_buffer, size_bound); xfree (big_buffer);
else big_buffer = (char *) xmalloc (size_bound);
big_buffer = (char *) xmalloc (size_bound);
sprintf_buffer = big_buffer; sprintf_buffer = big_buffer;
size_allocated = size_bound; size_allocated = size_bound;
} }
...@@ -242,7 +241,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -242,7 +241,8 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
switch (*fmt++) switch (*fmt++)
{ {
default: default:
error ("Invalid format operation %%%c", fmt[-1]); error ("Invalid format operation %%%s%c",
long_flag ? "l" : "", fmt[-1]);
/* case 'b': */ /* case 'b': */
case 'l': case 'l':
...@@ -398,7 +398,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format, ...@@ -398,7 +398,7 @@ doprnt (char *buffer, register size_t bufsize, const char *format,
char *save_bufptr = bufptr; char *save_bufptr = bufptr;
do { *bufptr++ = *fmt++; } do { *bufptr++ = *fmt++; }
while (--bufsize > 0 && !CHAR_HEAD_P (*fmt)); while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt));
if (!CHAR_HEAD_P (*fmt)) if (!CHAR_HEAD_P (*fmt))
{ {
bufptr = save_bufptr; bufptr = save_bufptr;
......
...@@ -1994,8 +1994,7 @@ verror (const char *m, va_list ap) ...@@ -1994,8 +1994,7 @@ verror (const char *m, va_list ap)
{ {
char buf[4000]; char buf[4000];
size_t size = sizeof buf; size_t size = sizeof buf;
size_t size_max = size_t size_max = min (MOST_POSITIVE_FIXNUM, SIZE_MAX);
min (MOST_POSITIVE_FIXNUM, min (INT_MAX, SIZE_MAX - 1)) + 1;
size_t mlen = strlen (m); size_t mlen = strlen (m);
char *buffer = buf; char *buffer = buf;
size_t used; size_t used;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment