Skip to content
Snippets Groups Projects
Commit f881f667 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Break with legacy command-line syntax (e.g. don't support /options) for SCFG

Command-line options must begin with '-' (not ye olde CPM/DOS '/option')
Command-line options are now all case sensitive (e.g. '-a' not '-A').

Remove '-d' (long deprecated for '-id')
Remove '-t' (long deprecated, do nothing)
parent 89f12cc2
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -404,9 +404,6 @@ int main(int argc, char **argv) ...@@ -404,9 +404,6 @@ int main(int argc, char **argv)
uint32_t misc = 0; uint32_t misc = 0;
for(i=1;i<argc;i++) { for(i=1;i<argc;i++) {
if(argv[i][0]=='-' if(argv[i][0]=='-'
#ifndef __unix__
|| argv[i][0]=='/'
#endif
) { ) {
if(strncmp(argv[i], "-import=", 8) == 0) { if(strncmp(argv[i], "-import=", 8) == 0) {
import = argv[i] + 8; import = argv[i] + 8;
...@@ -424,53 +421,48 @@ int main(int argc, char **argv) ...@@ -424,53 +421,48 @@ int main(int argc, char **argv)
uifc.insert_mode = TRUE; uifc.insert_mode = TRUE;
continue; continue;
} }
switch(toupper(argv[i][1])) { switch(argv[i][1]) {
case 'W': case 'w':
run_wizard = TRUE; run_wizard = TRUE;
break; break;
case 'N': /* Set "New Installation" flag */ case 'n': /* Set "New Installation" flag */
new_install=TRUE; new_install=TRUE;
forcesave=TRUE; forcesave=TRUE;
continue; continue;
case 'K': /* Keyboard only (no mouse) */ case 'k': /* Keyboard only (no mouse) */
uifc.mode |= UIFC_NOMOUSE; uifc.mode |= UIFC_NOMOUSE;
break; break;
case 'M': /* Monochrome mode */ case 'm': /* Monochrome mode */
uifc.mode|=UIFC_MONO; uifc.mode|=UIFC_MONO;
break; break;
case 'C': case 'c':
uifc.mode|=UIFC_COLOR; uifc.mode|=UIFC_COLOR;
break; break;
case 'D': case 'u':
printf("NOTICE: The -d option is deprecated, use -id instead\n");
SLEEP(2000);
door_mode=TRUE;
break;
case 'U':
umask(strtoul(argv[i]+2,NULL,8)); umask(strtoul(argv[i]+2,NULL,8));
break; break;
case 'G': case 'g':
if(IS_ALPHA(argv[i][2])) if(IS_ALPHA(argv[i][2]))
grpname = argv[i]+2; grpname = argv[i]+2;
else else
grpnum = atoi(argv[i]+2); grpnum = atoi(argv[i]+2);
break; break;
case 'H': case 'h':
no_msghdr=!no_msghdr; no_msghdr=!no_msghdr;
break; break;
case 'A': case 'a':
all_msghdr=!all_msghdr; all_msghdr=!all_msghdr;
break; break;
case 'F': case 'f':
forcesave=TRUE; forcesave=TRUE;
break; break;
case 'L': case 'l':
uifc.scrn_len=atoi(argv[i]+2); uifc.scrn_len=atoi(argv[i]+2);
break; break;
case 'E': case 'e':
uifc.esc_delay=atoi(argv[i]+2); uifc.esc_delay=atoi(argv[i]+2);
break; break;
case 'I': case 'i':
switch(toupper(argv[i][2])) { switch(toupper(argv[i][2])) {
case 'A': case 'A':
ciolib_mode=CIOLIB_MODE_ANSI; ciolib_mode=CIOLIB_MODE_ANSI;
...@@ -499,15 +491,12 @@ int main(int argc, char **argv) ...@@ -499,15 +491,12 @@ int main(int argc, char **argv)
goto USAGE; goto USAGE;
} }
break; break;
case 'V': case 'v':
textmode(atoi(argv[i]+2)); textmode(atoi(argv[i]+2));
break; break;
case 'Y': case 'y':
auto_save=TRUE; auto_save=TRUE;
break; break;
case 'T':
/* Legacy (time-slice API), ignore */
break;
default: default:
USAGE: USAGE:
printf("\nusage: scfg [ctrl_dir] [options]" printf("\nusage: scfg [ctrl_dir] [options]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment