Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 3590:73664ea2030e legacy-trunk
moved verbose decl to pydebug.h; added dos_8x3 feature
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 23 May 1996 22:51:04 +0000 |
| parents | cee4a6d8415e |
| children | ec39264311ff |
line wrap: on
line diff
--- a/Python/import.c Thu May 23 22:50:26 1996 +0000 +++ b/Python/import.c Thu May 23 22:51:04 1996 +0000 @@ -26,6 +26,7 @@ #include "allobjects.h" +/* XXX Some of the following are duplicate with allobjects.h... */ #include "node.h" #include "token.h" #include "graminit.h" @@ -45,8 +46,6 @@ #include "macglue.h" #endif -extern int verbose; /* Defined in pythonrun.c */ - extern long getmtime(); /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions */ @@ -452,8 +451,25 @@ #endif if (len > 0 && buf[len-1] != SEP) buf[len++] = SEP; +#ifdef IMPORT_8x3_NAMES + /* see if we are searching in directory dos_8x3 */ + if (len > 7 && !strncmp(buf + len - 8, "dos_8x3", 7)){ + int j; + char ch; /* limit name to eight lower-case characters */ + for (j = 0; (ch = name[j]) && j < 8; j++) + if (isupper(ch)) + buf[len++] = tolower(ch); + else + buf[len++] = ch; + } + else{ /* Not in dos_8x3, use the full name */ + strcpy(buf+len, name); + len += namelen; + } +#else strcpy(buf+len, name); len += namelen; +#endif for (fdp = import_filetab; fdp->suffix != NULL; fdp++) { strcpy(buf+len, fdp->suffix); if (verbose > 1)
