filevercmp: handle simple~ and numbered.~3~ backup suffixes
[pspp] / lib / vasnprintf.c
index 129d7dee9050ac333e36649b0e24a8e04582f45d..ce4e44b7b3c1b87097031c5fc8b77eb944a779ae 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -210,7 +210,7 @@ local_strnlen (const char *string, size_t maxlen)
 # 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
@@ -413,7 +413,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
        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).}
@@ -2103,7 +2103,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                  }
              }
 #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
@@ -4588,7 +4588,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        {
 #  if WIDE_CHAR_VERSION
                          /* ISO C says about %ls in fwprintf:
-                              "If the precision is not specied 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
@@ -4602,7 +4602,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                            tmp_length = local_wcslen (arg);
 #  else
                          /* ISO C says about %ls in fprintf:
-                              "If a precision is specied, 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
@@ -4621,7 +4621,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        {
 # if WIDE_CHAR_VERSION
                          /* ISO C says about %s in fwprintf:
-                              "If the precision is not specied 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."