X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrftime.c;h=45173dce35b7d3a0fa7e9fb04850f7743b16b7cc;hb=98a354147cdb6d15365600fac33d492d7387996f;hp=c13612562253f744ca71f1b0bbaa133dc941c5f6;hpb=cf42d3e5e80be6bf7093a3ca9be0d04033eaf527;p=gnulib.git diff --git a/lib/strftime.c b/lib/strftime.c index c13612562..45173dce3 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. @@ -10,8 +10,8 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software @@ -100,7 +100,7 @@ extern char *tzname[]; #endif #ifndef __P -# if defined (__GNUC__) || (defined (__STDC__) && __STDC__) +# if defined __GNUC__ || (defined __STDC__ && __STDC__) # define __P(args) args # else # define __P(args) () @@ -1025,7 +1025,6 @@ my_strftime (char *s, size_t maxsize, const char *format, const struct tm *tp add (1, *p = '\t'); break; - case 'f': case 'u': /* POSIX.2 extension. */ DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); @@ -1220,7 +1219,7 @@ my_strftime (char *s, size_t maxsize, const char *format, const struct tm *tp } } - if (p && i < maxsize) + if (p && maxsize != 0) *p = '\0'; return i; }