mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Rip out DOS-8x3 support.
This commit is contained in:
parent
1bb7734c7e
commit
215c340aa3
1 changed files with 2 additions and 17 deletions
|
@ -957,23 +957,8 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
buf[len++] = SEP;
|
buf[len++] = SEP;
|
||||||
#ifdef IMPORT_8x3_NAMES
|
strcpy(buf+len, name);
|
||||||
/* see if we are searching in directory dos-8x3 */
|
len += namelen;
|
||||||
if (len > 7 && !strncmp(buf + len - 8, "dos-8x3", 7)){
|
|
||||||
int j;
|
|
||||||
char ch; /* limit name to 8 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 */
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
strcpy(buf+len, name);
|
|
||||||
len += namelen;
|
|
||||||
}
|
|
||||||
#ifdef HAVE_STAT
|
#ifdef HAVE_STAT
|
||||||
if (stat(buf, &statbuf) == 0) {
|
if (stat(buf, &statbuf) == 0) {
|
||||||
if (S_ISDIR(statbuf.st_mode)) {
|
if (S_ISDIR(statbuf.st_mode)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue