X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrptime.c;h=bcd219dd4fbe289c70ea9c0700af61356eb862f9;hb=25b6b5120113989e0b91de9d0b75d3d625bbc753;hp=6cf44bce424e44cdd117812c897f3e2790236e8c;hpb=f9e83fd48cb5c5a0b5a65751710138d42c814402;p=gnulib.git diff --git a/lib/strptime.c b/lib/strptime.c index 6cf44bce4..bcd219dd4 100644 --- a/lib/strptime.c +++ b/lib/strptime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation, +/* Copyright (C) 2002, 2004-2005, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,8 +13,7 @@ GNU 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 Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _LIBC # include @@ -240,7 +239,6 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) struct locale_data *const current = locale->__locales[LC_TIME]; #endif - const char *rp_backup; int cnt; size_t val; int have_I, is_pm; @@ -253,14 +251,14 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) int week_no; #ifdef _NL_CURRENT size_t num_eras; + struct era_entry *era = NULL; + const char *rp_backup; #endif - struct era_entry *era; have_I = is_pm = 0; century = -1; want_century = 0; want_era = 0; - era = NULL; week_no = 0; have_wday = want_xday = have_yday = have_mon = have_mday = have_uweek = 0; @@ -278,7 +276,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) continue; } - /* Any character but `%' must be matched by the same character + /* Any character but '%' must be matched by the same character in the iput string. */ if (*fmt != '%') { @@ -288,17 +286,17 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) ++fmt; #ifndef _NL_CURRENT - /* We need this for handling the `E' modifier. */ + /* We need this for handling the 'E' modifier. */ start_over: -#endif - +#else /* Make back up of current processing pointer. */ rp_backup = rp; +#endif switch (*fmt++) { case '%': - /* Match the `%' character itself. */ + /* Match the '%' character itself. */ match_char ('%', *rp++); break; case 'a': @@ -559,7 +557,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) case 's': { /* The number of seconds may be very high so we cannot use - the `get_number' macro. Instead read the number + the 'get_number' macro. Instead read the number character for character and construct the result while doing this. */ time_t secs = 0; @@ -675,7 +673,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) specify hours. If fours digits are used, minutes are also specified. */ { - bool neg; + bool neg _GL_UNUSED; int n; val = 0;