Line 156... |
Line 156... |
156 |
char optionchar1 = '/'; /* Primary character used to determine option follows */
|
156 |
char optionchar1 = '/'; /* Primary character used to determine option follows */
|
157 |
char optionchar2 = '-'; /* Secondary character used to determine option follows */
|
157 |
char optionchar2 = '-'; /* Secondary character used to determine option follows */
|
158 |
const char OptShowFiles[2] = { 'F', 'f' }; /* Show files */
|
158 |
const char OptShowFiles[2] = { 'F', 'f' }; /* Show files */
|
159 |
const char OptUseASCII[2] = { 'A', 'a' }; /* Use ASCII only */
|
159 |
const char OptUseASCII[2] = { 'A', 'a' }; /* Use ASCII only */
|
160 |
const char OptVersion[2] = { 'V', 'v' }; /* Version information */
|
160 |
const char OptVersion[2] = { 'V', 'v' }; /* Version information */
|
161 |
const char OptSFNs[2] = { 'S', 's' }; /* Shortnames only (disable LFN support) */
|
- |
|
162 |
const char OptPause[2] = { 'P', 'p' }; /* Pause after each page (screenfull) */
|
161 |
const char OptPause[2] = { 'P', 'p' }; /* Pause after each page (screenfull) */
|
163 |
const char OptDisplay[2] = { 'D', 'd' }; /* modify Display settings */
|
162 |
const char OptDisplay[2] = { 'D', 'd' }; /* modify Display settings */
|
164 |
|
163 |
|
165 |
|
164 |
|
166 |
/* Procedures */
|
165 |
/* Procedures */
|
Line 532... |
Line 531... |
532 |
charSet = ASCIICHARS; /* set charset flag appropriately */
|
531 |
charSet = ASCIICHARS; /* set charset flag appropriately */
|
533 |
else if (argv[i][1] == '?')
|
532 |
else if (argv[i][1] == '?')
|
534 |
showUsage(); /* show usage info and exit */
|
533 |
showUsage(); /* show usage info and exit */
|
535 |
else if ((argv[i][1] == OptVersion[0]) || (argv[i][1] == OptVersion[1]))
|
534 |
else if ((argv[i][1] == OptVersion[0]) || (argv[i][1] == OptVersion[1]))
|
536 |
showVersionInfo(); /* show version info and exit */
|
535 |
showVersionInfo(); /* show version info and exit */
|
537 |
else if ((argv[i][1] == OptSFNs[0]) || (argv[i][1] == OptSFNs[1]))
|
- |
|
538 |
LFN_Enable_Flag = LFN_DISABLE; /* force shortnames only */
|
- |
|
539 |
else if ((argv[i][1] == OptPause[0]) || (argv[i][1] == OptPause[1]))
|
536 |
else if ((argv[i][1] == OptPause[0]) || (argv[i][1] == OptPause[1]))
|
540 |
pause = PAUSE; /* wait for keypress after each page (pause) */
|
537 |
pause = PAUSE; /* wait for keypress after each page (pause) */
|
541 |
else /* Invalid or unknown option */
|
538 |
else /* Invalid or unknown option */
|
542 |
showInvalidUsage(argv[i]);
|
539 |
showInvalidUsage(argv[i]);
|
543 |
}
|
540 |
}
|
Line 994... |
Line 991... |
994 |
else
|
991 |
else
|
995 |
{
|
992 |
{
|
996 |
/* set display name */
|
993 |
/* set display name */
|
997 |
strcpy(dsubdir, entry->cFileName);
|
994 |
strcpy(dsubdir, entry->cFileName);
|
998 |
|
995 |
|
999 |
/* set canical name to use for further FindFile calls */
|
- |
|
1000 |
/* use short file name if exists as lfn may contain unicode values converted
|
- |
|
1001 |
* to default character (eg. ?) and so not a valid path.
|
- |
|
1002 |
*/
|
- |
|
1003 |
strcpy(subdir, entry->cFileName);
|
996 |
strcpy(subdir, entry->cFileName);
|
1004 |
strcat(subdir, "\\");
|
997 |
strcat(subdir, "\\");
|
1005 |
}
|
998 |
}
|
1006 |
} while (!*subdir); // while (subdir is still blank)
|
999 |
} while (!*subdir); // while (subdir is still blank)
|
1007 |
|
1000 |
|
Line 1044... |
Line 1037... |
1044 |
}
|
1037 |
}
|
1045 |
|
1038 |
|
1046 |
/**
|
1039 |
/**
|
1047 |
* Given a search HANDLE, will find the next subdirectory,
|
1040 |
* Given a search HANDLE, will find the next subdirectory,
|
1048 |
* setting subdir to the found directory name.
|
1041 |
* setting subdir to the found directory name.
|
1049 |
* dsubdir is the name to display (lfn or sfn as appropriate)
|
1042 |
* dsubdir is the name to display
|
1050 |
* currentpath must end in \
|
1043 |
* currentpath must end in \
|
1051 |
* If a subdirectory is found, returns 0, otherwise returns 1
|
1044 |
* If a subdirectory is found, returns 0, otherwise returns 1
|
1052 |
* (either error or no more files).
|
1045 |
* (either error or no more files).
|
1053 |
*/
|
1046 |
*/
|
1054 |
static int findNextSubdir(HANDLE findnexthnd, char *subdir, char *dsubdir) {
|
1047 |
static int findNextSubdir(HANDLE findnexthnd, char *subdir, char *dsubdir) {
|