mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
moved verbose decl to pydebug.h; added dos_8x3 feature
This commit is contained in:
parent
f857a6becb
commit
40f470f7e0
1 changed files with 18 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include "allobjects.h"
|
#include "allobjects.h"
|
||||||
|
|
||||||
|
/* XXX Some of the following are duplicate with allobjects.h... */
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "graminit.h"
|
#include "graminit.h"
|
||||||
|
|
@ -45,8 +46,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "macglue.h"
|
#include "macglue.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int verbose; /* Defined in pythonrun.c */
|
|
||||||
|
|
||||||
extern long getmtime(); /* In getmtime.c */
|
extern long getmtime(); /* In getmtime.c */
|
||||||
|
|
||||||
/* Magic word to reject .pyc files generated by other Python versions */
|
/* Magic word to reject .pyc files generated by other Python versions */
|
||||||
|
|
@ -452,8 +451,25 @@ find_module(name, path, buf, buflen, p_fp)
|
||||||
#endif
|
#endif
|
||||||
if (len > 0 && buf[len-1] != SEP)
|
if (len > 0 && buf[len-1] != SEP)
|
||||||
buf[len++] = 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);
|
strcpy(buf+len, name);
|
||||||
len += namelen;
|
len += namelen;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
strcpy(buf+len, name);
|
||||||
|
len += namelen;
|
||||||
|
#endif
|
||||||
for (fdp = import_filetab; fdp->suffix != NULL; fdp++) {
|
for (fdp = import_filetab; fdp->suffix != NULL; fdp++) {
|
||||||
strcpy(buf+len, fdp->suffix);
|
strcpy(buf+len, fdp->suffix);
|
||||||
if (verbose > 1)
|
if (verbose > 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue