From 0a8a56c654b90b8025ab0071c81396deaa6db4dd Mon Sep 17 00:00:00 2001 From: pnenzi Date: Tue, 9 Oct 2007 21:27:25 +0000 Subject: [PATCH] Added "altshow" for switching between the old and the new show format. --- ChangeLog | 7 +++++++ src/frontend/device.c | 15 +++++++++++++-- src/frontend/miscvars.c | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab34f44f5..7bb2593c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-10-09 Paolo Nenzi + * src/frontend/{device.c, miscvars.c}: added "altshow" option to + enable the new (Phil Barker) version of the show command. The + old show command looks better in interactive mode while the + new format is more suitable for automatic processing of the + data. + 2007-10-09 Paolo Nenzi * src/frontend/cktdojob.c: Chenged of reporting analysis temperature from Kelvins to Celsius (as suggested from Phil Barker). diff --git a/src/frontend/device.c b/src/frontend/device.c index 189414c52..e44211886 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -23,6 +23,7 @@ Modified: 2000 AlansFixes static wordlist *devexpand(char *name); static void all_show(wordlist *wl, int mode); +static void all_show_old(wordlist *wl, int mode); /* * show: list device operating point info @@ -41,13 +42,23 @@ static int count; void com_showmod(wordlist *wl) { - all_show(wl, 1); + bool showmode; + + if (cp_getvar("altshow", VT_BOOL, (char *) &showmode)) + all_show(wl, 1); + else + all_show_old(wl, 1); } void com_show(wordlist *wl) { - all_show(wl, 0); + bool showmode; + + if (cp_getvar("altshow", VT_BOOL, (char *) &showmode)) + all_show(wl, 0); + else + all_show_old(wl, 0); } static void diff --git a/src/frontend/miscvars.c b/src/frontend/miscvars.c index 95da681bf..f8a8f4c15 100644 --- a/src/frontend/miscvars.c +++ b/src/frontend/miscvars.c @@ -25,6 +25,7 @@ bool ft_asyncdb = FALSE; char *ft_setkwords[] = { "acct", + "altshow", "appendwrite", "bypass", "chgtol",