[Patches] win32 module case bugfix to allcaps83

Robin Becker robin@jessikat.demon.co.uk
Sat, 29 Apr 2000 09:40:45 +0100


The following patch seems to fix a module case bug in 1.6a2 caused by wrong return values in
routine allcaps83 in import.c

*** import.c.orig       Sat Apr 29 09:12:18 2000
--- import.c    Sat Apr 29 09:14:34 2000
***************
*** 1035,1046 ****
        char *end = strchr(s, '\0');
        if (dot != NULL) {
                if (dot-s > 8)
!                       return 1; /* More than 8 before '.' */
                if (end-dot > 4)
!                       return 1; /* More than 3 after '.' */
                end = strchr(dot+1, '.');
                if (end != NULL)
!                       return 1; /* More than one dot  */
        }
        else if (end-s > 8)
                return 1; /* More than 8 and no dot */
--- 1035,1046 ----
        char *end = strchr(s, '\0');
        if (dot != NULL) {
                if (dot-s > 8)
!                       return 0; /* More than 8 before '.' */
                if (end-dot > 4)
!                       return 0; /* More than 3 after '.' */
                end = strchr(dot+1, '.');
                if (end != NULL)
!                       return 0; /* More than one dot  */
        }
        else if (end-s > 8)
                return 1; /* More than 8 and no dot */


                     I confirm that, to the best of my knowledge and belief, this
                     contribution is free of any claims of third parties under
                     copyright, patent or other rights or interests ("claims").  To
                     the extent that I have any such claims, I hereby grant to CNRI a
                     nonexclusive, irrevocable, royalty-free, worldwide license to
                     reproduce, distribute, perform and/or display publicly, prepare
                     derivative versions, and otherwise use this contribution as part
                     of the Python software and its related documentation, or any
                     derivative versions thereof, at no cost to CNRI or its licensed
                     users, and to authorize others to do so.

                     I acknowledge that CNRI may, at its sole discretion, decide
                     whether or not to incorporate this contribution in the Python
                     software and its related documentation.  I further grant CNRI
                     permission to use my name and other identifying information
                     provided to CNRI by me for use in connection with the Python
                     software and its related documentation.
-- 
Robin Becker