# HG changeset patch
# User bears
# Date 997000037 -3600
# Node ID 7d1f26e7c728c56d319df3ac5ab96fa2c77c790b
# Parent fed1334d766b93ca2d0749f7b2d9ca212ba55edd
[svn] Remove case sensitivity in date parse.
diff -r fed1334d766b -r 7d1f26e7c728 ChangeLog
--- a/ChangeLog Sun Aug 05 09:24:22 2001 +0100
+++ b/ChangeLog Sun Aug 05 09:27:17 2001 +0100
@@ -11,6 +11,7 @@
Debug logging is always compiled and selected via noffle.conf. All debug
logs are classified as all, none, config, control, expire, fetch,
filter, newsbase, noffle, post, protocol, requests and server.
+* src/util.c: Remove case sensitivity in date parsing.
Tue May 15 2001 Jim Hague <jim.hague@acm.org>
diff -r fed1334d766b -r 7d1f26e7c728 src/util.c
--- a/src/util.c Sun Aug 05 09:24:22 2001 +0100
+++ b/src/util.c Sun Aug 05 09:27:17 2001 +0100
@@ -1,7 +1,7 @@
/*
util.c
- $Id: util.c 300 2001-08-05 08:24:22Z bears $
+ $Id: util.c 301 2001-08-05 08:27:17Z bears $
*/
#if HAVE_CONFIG_H
@@ -357,7 +357,7 @@
return (time_t) -1;
for ( wday = 0; DOTW[ wday ] != NULL; wday++ )
- if ( strncmp( DOTW[ wday ], s, 3 ) == 0 )
+ if ( strncasecmp( DOTW[ wday ], s, 3 ) == 0 )
break;
if( DOTW[ wday ] == NULL || s[3] != ',' )
@@ -377,7 +377,7 @@
if ( strlen( s ) < 4 )
return (time_t) -1;
for ( tm.tm_mon = 0; MON[ tm.tm_mon ] != NULL; tm.tm_mon++ )
- if ( strncmp( MON[ tm.tm_mon ], s, 3 ) == 0 )
+ if ( strncasecmp( MON[ tm.tm_mon ], s, 3 ) == 0 )
break;
if ( MON[ tm.tm_mon ] == NULL )
@@ -418,9 +418,9 @@
tzoffset = 0;
while ( isspace( *s ) )
s++;
- if ( strncmp( s, "GMT", 3) == 0 )
+ if ( strncasecmp( s, "GMT", 3) == 0 )
s += 3;
- else if ( strncmp( s, "UT", 2 ) == 0 )
+ else if ( strncasecmp( s, "UT", 2 ) == 0 )
s += 2;
else
{