(my_strftime): Let the `-' (no-pad) flag affect
authorJim Meyering <jim@meyering.net>
Mon, 12 May 2003 08:20:29 +0000 (08:20 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 12 May 2003 08:20:29 +0000 (08:20 +0000)
the space-padded-by-default conversion specifiers, %e, %k, %l.

lib/strftime.c

index cf76c1f5e38e147ecb0f42264a1813cacfae7594..1adcaa4ba469b63a8232dfc52e095e59c14b50be 100644 (file)
@@ -987,8 +987,8 @@ my_strftime (s, maxsize, format, tp extra_args LOCALE_PARAM)
             jump to one of these two labels.  */
 
        do_number_spacepad:
-         /* Force `_' flag unless overwritten by `0' flag.  */
-         if (pad != L_('0'))
+         /* Force `_' flag unless overridden by `0' or `-' flag.  */
+         if (pad != L_('0') && pad != L_('-'))
            pad = L_('_');
 
        do_number: