Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
John P. Willis
freem
Commits
3753917f
Commit
3753917f
authored
Jun 30, 2022
by
John P. Willis
Browse files
Restore support for disabling vendor extensions
parent
f233389a
Pipeline
#756
passed with stage
in 1 minute and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
src/mumps.c
src/mumps.c
+19
-3
src/xecline.c
src/xecline.c
+5
-6
No files found.
src/mumps.c
View file @
3753917f
...
...
@@ -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
,
"h
s
fiqr: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
,
25
6
,
"
\r\n
Coherent Logic Development FreeM version %s
\r\n\201
"
,
verstr
);
snprintf
(
version
,
25
5
,
"
\r\n
Coherent Logic Development FreeM version %s
\r\n\201
"
,
verstr
);
write_m
(
version
);
snprintf
(
version
,
25
6
,
"Copyright (C) 2014, 2020, 2021 Coherent Logic Development LLC
\r\n\r\n\201
"
);
snprintf
(
version
,
25
5
,
"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\t
selects <NAMESPACE> as the startup namespace instead of USER
\n\n
"
);
fprintf
(
stdout
,
"
\t
-q, --quiet
\n\t\t
disables startup messages and prompt string
\n\n
"
);
fprintf
(
stdout
,
"
\t
-r <LABEL^ROUTINE>, --routine=<LABEL^ROUTINE>
\n\t\t
execute <LABEL^ROUTINE> on startup instead of entering direct mode
\n\n
"
);
fprintf
(
stdout
,
"
\t
-s, --standard
\n\t\t
restrict access to FreeM vendor extensions not present in relevant standards
\n\n
"
);
fprintf
(
stdout
,
"
\t
-v, --version
\n\t\t
display FreeM version information
\n\n
"
);
fprintf
(
stdout
,
"
\t
-x <MCODE>, --execute=<MCODE>
\n\t\t
execute M code <MCODE> on startup
\n\n
"
);
fprintf
(
stdout
,
"
\t
-d, --daemon
\n\t\t
run the FreeM daemon (one FreeM daemon must always be running)
\n\n
"
);
...
...
src/xecline.c
View file @
3753917f
...
...
@@ -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
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment