Changed the fix options so '-' (the default) always asks
This commit is contained in:
parent
0e5293a8f4
commit
bbdeb12af5
14
sortdir.c
14
sortdir.c
|
@ -7,7 +7,6 @@
|
||||||
* 1) Check this in readir() taking account of sparse files
|
* 1) Check this in readir() taking account of sparse files
|
||||||
* 2) When trimming a directory, need to update EOF for parent entry
|
* 2) When trimming a directory, need to update EOF for parent entry
|
||||||
* TODO: Print indication when a file is sparse - blocks in inverse video?
|
* TODO: Print indication when a file is sparse - blocks in inverse video?
|
||||||
* TODO: Change fix options so '-' is ask, other two options are 'y', 'n'
|
|
||||||
* TODO: Get both ProDOS-8 and GNO versions to build from this source
|
* TODO: Get both ProDOS-8 and GNO versions to build from this source
|
||||||
*
|
*
|
||||||
* Revision History
|
* Revision History
|
||||||
|
@ -48,6 +47,7 @@
|
||||||
* v0.84 Minor fixup for builds without CHECK and FREELIST defined.
|
* v0.84 Minor fixup for builds without CHECK and FREELIST defined.
|
||||||
* v0.85 Only write free list if it has been changed.
|
* v0.85 Only write free list if it has been changed.
|
||||||
* v0.86 Show 'invisible' access bit.
|
* v0.86 Show 'invisible' access bit.
|
||||||
|
* v0.87 Change the fix options so '-' is ask, 'y'/'n' are always/never.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#pragma debug 9
|
//#pragma debug 9
|
||||||
|
@ -826,11 +826,11 @@ uint askfix(void) {
|
||||||
return 0;
|
return 0;
|
||||||
fputs(": Fix (y/n)? ", stdout);
|
fputs(": Fix (y/n)? ", stdout);
|
||||||
switch (fixopts[0]) {
|
switch (fixopts[0]) {
|
||||||
case '?':
|
case '-':
|
||||||
if (tolower(getchar()) == 'y')
|
if (tolower(getchar()) == 'y')
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
case 'a':
|
case 'y':
|
||||||
fputs("y", stdout);
|
fputs("y", stdout);
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
|
@ -2053,7 +2053,7 @@ void interactive(void) {
|
||||||
|
|
||||||
revers(1);
|
revers(1);
|
||||||
hlinechar(' ');
|
hlinechar(' ');
|
||||||
fputs("S O R T D I R v0.86 alpha Use ^ to return to previous question", stdout);
|
fputs("S O R T D I R v0.87 alpha Use ^ to return to previous question", stdout);
|
||||||
hlinechar(' ');
|
hlinechar(' ');
|
||||||
revers(0);
|
revers(0);
|
||||||
|
|
||||||
|
@ -2132,9 +2132,9 @@ q5:
|
||||||
q6:
|
q6:
|
||||||
subtitle("Attempt to fix errors?");
|
subtitle("Attempt to fix errors?");
|
||||||
do {
|
do {
|
||||||
fputs("| [-] Never fix | [?] Ask before fixing | [a] Always fix |", stderr);
|
fputs("| [-] Always ask | [y] Always fix | [n] Never fix |", stderr);
|
||||||
f = getchar();
|
f = getchar();
|
||||||
} while (strchr("-?a^", f) == NULL);
|
} while (strchr("-yn^", f) == NULL);
|
||||||
if (f == '^')
|
if (f == '^')
|
||||||
goto q5;
|
goto q5;
|
||||||
fixopts[0] = ((f == '-') ? 'n' : f);
|
fixopts[0] = ((f == '-') ? 'n' : f);
|
||||||
|
@ -2362,7 +2362,7 @@ void usage(void) {
|
||||||
printf(" E sort by EOF position descending\n");
|
printf(" E sort by EOF position descending\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("-fx: Fix mode, where x is:\n");
|
printf("-fx: Fix mode, where x is:\n");
|
||||||
printf(" ? prompt for each fix\n");
|
printf(" - prompt for each fix\n");
|
||||||
printf(" n never fix\n");
|
printf(" n never fix\n");
|
||||||
printf(" y always fix (be careful!)\n");
|
printf(" y always fix (be careful!)\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in New Issue