From: Billy G. A. <bal...@us...> - 2002-01-12 22:38:47
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv12115 Modified Files: pgversion.c Log Message: 12JAN2002 bga [Bug #486151] fixed a problem that prevented a connection to be made to version 7.2devel of PostgreSQL. Index: pgversion.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/pgversion.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pgversion.c 2001/09/19 03:46:49 1.12 --- pgversion.c 2002/01/12 22:38:43 1.13 *************** *** 32,35 **** --- 32,37 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 12JAN2002 bga [Bug #486151] fixed a problem that prevented a connec- | + | tion to be made to version 7.2devel of PostgreSQL. | | 18SEP2001 bga Removed variables that are no longer needed/referenced. | | 16SEP2001 bga Corrected my mis-conceptions about Python ignoring ex- | *************** *** 105,108 **** --- 107,143 ---- /***********************************************************************\ + | Name: stricmp | + | Synopsis: int stricmp(char *s1, char *s2); | + | Description: stricmp compares its arguments (ignoring case) and re- | + | turns an integer less than, equal to, or greater than | + | 0, based upon whether s1 is lexicographically less | + | than, equal to, or greater than s2. | + | | + | Note: Characters following a null character are not compared. | + \***********************************************************************/ + + static int stricmp(char *s1, char *s2) + { + int c1, c2; + + for (;(*s1 != 0) && (*s2 != 0); s1++, s2++) + { + if (isupper(*s1)) + c1 = _tolower(*s1); + else + c1 = *s1; + if (isupper(*s2)) + c2 = _tolower(*s2); + else + c2 = *s2; + + if (c1 != c2) + break; + } + + return (c1 - c2); + } + + /***********************************************************************\ | Name: parseToken | | | *************** *** 134,137 **** --- 169,175 ---- *result = strtol(token, &last, 0); + + if (stricmp(last, "devel") == 0) + return (errno != 0); return ((errno != 0) || (*last != (char)0)); |