command.c, inpcom.c, add command 'setcf': like command 'set',

but keeping upper or lower case of subsequent characters
This commit is contained in:
h_vogt 2016-12-03 00:45:17 +01:00
parent 8621ded52c
commit bdf16105ab
2 changed files with 10 additions and 3 deletions

View File

@ -127,7 +127,10 @@ struct comm spcp_coms[] = {
{ 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS,
arg_set,
"[option] [option = value] ... : Set a variable." } ,
{ "setcf", com_set, FALSE, TRUE,
{ 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS,
arg_set,
"[option] [option = value] ... : Set a variable, case remains as given." } ,
/* support for altering options in interactive mode,
using either command 'option' or 'options'*/
@ -624,7 +627,10 @@ struct comm nutcp_coms[] = {
{ 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS,
arg_set,
"[option] [option = value] ... : Set a variable." } ,
{ "setcf", com_set, FALSE, TRUE,
{ 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS,
arg_set,
"[option] [option = value] ... : Set a variable, case remains as given." } ,
#ifdef EXPERIMENTAL_CODE
/* PN support for altering options in interactive mode */
{ "option", com_option, TRUE, TRUE,

View File

@ -880,7 +880,8 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
!ciprefix("source", buffer) &&
!ciprefix("load", buffer) &&
!ciprefix("plot", buffer) &&
!ciprefix("hardcopy", buffer)
!ciprefix("hardcopy", buffer) &&
!ciprefix("setcf", buffer)
)
{
/* lower case for all other lines */