From bdf16105ab7a41708e01e710322962857429f9df Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 3 Dec 2016 00:45:17 +0100 Subject: [PATCH] command.c, inpcom.c, add command 'setcf': like command 'set', but keeping upper or lower case of subsequent characters --- src/frontend/commands.c | 10 ++++++++-- src/frontend/inpcom.c | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/frontend/commands.c b/src/frontend/commands.c index 8b84a09f9..c598b9615 100644 --- a/src/frontend/commands.c +++ b/src/frontend/commands.c @@ -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, diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index fd5aa349f..2de5d6afb 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -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 */