diff src/util.c @ 186:7d1f26e7c728 noffle

[svn] Remove case sensitivity in date parse.
author bears
date Sun, 05 Aug 2001 09:27:17 +0100
parents fed1334d766b
children 24d4cd032da5
line wrap: on
line diff
--- 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
     {