/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# endif
#endif
-#if !USE_SNPRINTF && HAVE_WCHAR_T && (WIDE_CHAR_VERSION || DCHAR_IS_TCHAR)
+#if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T && (WIDE_CHAR_VERSION || DCHAR_IS_TCHAR)
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
Normalise [q[m-1],...,q[0]], yields q.
If m>=n>1, perform a multiple-precision division:
We have a/b < beta^(m-n+1).
- s:=intDsize-1-(hightest bit in b[n-1]), 0<=s<intDsize.
+ s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize.
Shift a and b left by s bits, copying them. r:=a.
r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2.
For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).}
}
}
#endif
-#if !USE_SNPRINTF && HAVE_WCHAR_T
+#if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
{
# if WIDE_CHAR_VERSION
/* ISO C says about %ls in fwprintf:
- "If the precision is not specified or is greater
+ "If the precision is not specified or is greater
than the size of the array, the array shall
contain a null wide character."
So if there is a precision, we must not use
tmp_length = local_wcslen (arg);
# else
/* ISO C says about %ls in fprintf:
- "If a precision is specified, no more than that
+ "If a precision is specified, no more than that
many bytes are written (including shift
sequences, if any), and the array shall contain
a null wide character if, to equal the
{
# if WIDE_CHAR_VERSION
/* ISO C says about %s in fwprintf:
- "If the precision is not specified or is greater
+ "If the precision is not specified or is greater
than the size of the converted array, the
converted array shall contain a null wide
character."