Commit 3753917f authored by John P. Willis's avatar John P. Willis
Browse files

Restore support for disabling vendor extensions

parent f233389a
Pipeline #756 passed with stage
in 1 minute and 27 seconds
......@@ -96,6 +96,7 @@ int main (int argc, char **argv, char **envp)
struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"filter", no_argument, &filter, TRUE},
{"standard", no_argument, &standard, TRUE},
{"import", no_argument, &import_env, TRUE},
{"quiet", no_argument, &quiet_mode, TRUE},
{"routine", required_argument, 0, 'r'},
......@@ -188,7 +189,7 @@ printf ("\r\nSTORE quack,foo neek\r\n");
while (1) {
c = getopt_long (argc, argv, "hfiqr:n:c:vx:dop", long_options, &option_index);
c = getopt_long (argc, argv, "hsfiqr:n:c:vx:dop", long_options, &option_index);
if (c == -1) break;
if (c == '?') freem_usage ();
......@@ -241,6 +242,10 @@ printf ("\r\nSTORE quack,foo neek\r\n");
break;
case 's': /* --standard */
standard = TRUE;
break;
case 'd': /* --daemon */
run_daemon = TRUE;
break;
......@@ -329,6 +334,10 @@ printf ("\r\nSTORE quack,foo neek\r\n");
pid_file_path = strdup (optarg);
break;
case 's': /* --standard */
standard = TRUE;
break;
}
}
......@@ -714,12 +723,18 @@ printf ("\r\nSTORE quack,foo neek\r\n");
stcpy (verstr, FREEM_VERSION_STR);
stcnv_m2c (verstr);
snprintf (version, 256, "\r\nCoherent Logic Development FreeM version %s\r\n\201", verstr);
snprintf (version, 255, "\r\nCoherent Logic Development FreeM version %s\r\n\201", verstr);
write_m (version);
snprintf (version, 256, "Copyright (C) 2014, 2020, 2021 Coherent Logic Development LLC\r\n\r\n\201");
snprintf (version, 255, "Copyright (C) 2014, 2020, 2021 Coherent Logic Development LLC\r\n\r\n\201");
write_m (version);
if (standard) {
snprintf (version, 255, "[vendor extensions disabled]\r\n\r\n\201");
write_m (version);
}
}
else {
write_m ("\r\n\r\n\201");
......@@ -754,6 +769,7 @@ void freem_usage(void)
fprintf (stdout, "\t-n <NAMESPACE>, --namespace=<NAMESPACE>\n\t\tselects <NAMESPACE> as the startup namespace instead of USER\n\n");
fprintf (stdout, "\t-q, --quiet\n\t\tdisables startup messages and prompt string\n\n");
fprintf (stdout, "\t-r <LABEL^ROUTINE>, --routine=<LABEL^ROUTINE>\n\t\texecute <LABEL^ROUTINE> on startup instead of entering direct mode\n\n");
fprintf (stdout, "\t-s, --standard\n\t\trestrict access to FreeM vendor extensions not present in relevant standards\n\n");
fprintf (stdout, "\t-v, --version\n\t\tdisplay FreeM version information\n\n");
fprintf (stdout, "\t-x <MCODE>, --execute=<MCODE>\n\t\texecute M code <MCODE> on startup\n\n");
fprintf (stdout, "\t-d, --daemon\n\t\trun the FreeM daemon (one FreeM daemon must always be running)\n\n");
......
......@@ -757,14 +757,13 @@ next0:
if (*codptr == ':') {
/* handle postconditional */
/* postcond after FOR,IF,ELSE not allowed */
/* postcond after FOR,IF,ELSE not allowed in standard mode */
/*
if (mcmnd == FOR || mcmnd == IF || mcmnd == ELSE) {
ierr = SPACER;
if (standard && (mcmnd == FOR || mcmnd == IF || mcmnd == ELSE)) {
ierr = NOSTAND;
goto err;
}
*/
}
codptr++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment