X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=intl%2Fprintf-parse.c;h=1a06b1a90c007fa8e73f677450f9e6829b95bd3d;hb=65192703add4104267ee0ebcf9bc0ec35e4c93b6;hp=d19f903d72c8fe94daa2b636a4151e422b891eeb;hpb=b02093873e853ba0caabae0451b51a2a119e7379;p=lyx.git diff --git a/intl/printf-parse.c b/intl/printf-parse.c index d19f903d72..1a06b1a90c 100644 --- a/intl/printf-parse.c +++ b/intl/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -13,12 +13,10 @@ You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #if WIDE_CHAR_VERSION @@ -385,11 +383,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) switch (c) { case 'd': case 'i': -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif + /* If 'long long' exists and is the same as 'long', we parse + "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) @@ -400,11 +401,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif + /* If 'unsigned long long' exists and is the same as + 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) @@ -459,11 +463,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) type = TYPE_POINTER; break; case 'n': -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif + /* If 'long long' exists and is the same as 'long', we parse + "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2)