FYI, I've just checked in this change:

2005-08-17  Jim Meyering  <[EMAIL PROTECTED]>

        Make the %s format (seconds since the epoch) work for a negative
        number and when used with a zero-padded field width, e.g. %015s.

        * strftime.c (my_strftime): Move the `do_number_sign_and_padding'
        label so that it precedes the code to set `digits'.  Otherwise,
        %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
        print `00-22'.  Now, it prints `-0022', as it should.

Index: strftime.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/strftime.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -u -r1.84 -r1.85
--- strftime.c  4 Jul 2005 04:40:46 -0000       1.84
+++ strftime.c  19 Aug 2005 09:21:57 -0000      1.85
@@ -909,10 +909,10 @@ my_strftime (CHAR_T *s, size_t maxsize,
            }
          while (u_number_value != 0);
 
+       do_number_sign_and_padding:
          if (digits < width)
            digits = width;
 
-       do_number_sign_and_padding:
          if (negative_number)
            *--bufp = L_('-');
 


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to