top: ensure previously saved rcfile honored completely

When startup defaults were changed users with existing
rcfiles would likely find their previous configuration
was not being honored in all respects. The disparities
involved Graphs modes and Summary/Task memory scaling.

This patch simply restores what was always intended as
the proper behavior for previously saved config files.

References(s):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762928
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762947
. new startup defaults
commit 8ef6cd91fc

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2014-09-28 00:00:00 -05:00 committed by Craig Small
parent 00ec244114
commit b0767bd391

View File

@ -3524,8 +3524,9 @@ static void configs_read (void) {
case 'g': // from 3.3.4 thru 3.3.8
scat(w->rc.fieldscur, RCF_PLUS_H);
case 'h': // this is release 3.3.9
/* w->rc.graph_cpus = 0; */// for documentation only, since
/* w->rc.graph_mems = 0; */// DEF_RCFILE zeroes them for us
w->rc.graph_cpus = w->rc.graph_mems = 0;
// these next 2 are really global, but best documented here
Rc.summ_mscale = Rc.task_mscale = SK_Kb;
case 'i': // actual RCF_VERSION_ID
default: // and a future version?
if (strlen(w->rc.fieldscur) != sizeof(DEF_FIELDS) - 1)