From: dttsp Date: Tue, 10 May 2005 13:48:17 +0000 (+0000) Subject: Added leading '-' to command strings to prevent echo to log X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=3b143308f318926640b2ccd14bf2e8de05232da9;p=dttsp.git Added leading '-' to command strings to prevent echo to log --- diff --git a/jDttSP/command-vocabulary b/jDttSP/command-vocabulary index 9eb1270..aee347f 100644 --- a/jDttSP/command-vocabulary +++ b/jDttSP/command-vocabulary @@ -1,6 +1,10 @@ [TRX] indicates optional arg (RX or TX), RX default T|F indicates TRUE or FALSE +If first char of command is '-', eg +-setNR ON +command is not echoed to log output. + setFilter low-freq high-freq TRX setMode mode [TRX] // mode = USB, LSB, CWL, CWU, etc. setOsc freq [TRX] // freq in Hz (float) diff --git a/jDttSP/update.c b/jDttSP/update.c index 833366b..0e6ef67 100644 --- a/jDttSP/update.c +++ b/jDttSP/update.c @@ -977,8 +977,14 @@ CTE update_cmds[] = { int do_update(char *str, FILE *log) { + BOOLEAN quiet = FALSE; SPLIT splt = &uni.update.splt; + if (*str == '-') { + quiet = TRUE; + str++; + } + split(splt, str); if (NF(splt) < 1) return -1; @@ -993,7 +999,7 @@ do_update(char *str, FILE *log) { val = (*thk)(NF(splt) - 1, Fptr(splt, 1)); sem_post(&top.sync.upd.sem); - if (log) { + if (log && !quiet) { int i; char *s = since(&top.start_tv); fprintf(log, "update[%s]: returned %d from", s, val);