Description: Change formal of IRix mode when showing threads Author: Samuel Thibault Bug-Debian: http://bugs.debian.org/459890 Reviewed-by: Craig Small Index: b/top.c =================================================================== --- a/top.c 2009-11-24 20:53:05.000000000 +1100 +++ b/top.c 2009-11-24 21:00:33.000000000 +1100 @@ -1783,7 +1783,8 @@ confighlp(Winstk[i].rc.fieldscur); } - if(Rc.mode_irixps && smp_num_cpus>1){ + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))) { // good for 100 CPUs per process pcpu_max_value = 9999.0; Fieldstab[P_CPU].fmts = " %4.0f"; @@ -2570,6 +2571,15 @@ case 'H': if (VIZCHKc) { TOGw(Curwin, Show_THREADS); + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))){ + // good for 100 CPUs per process + pcpu_max_value = 9999.0; + Fieldstab[P_CPU].fmts = " %4.0f"; + } else { + pcpu_max_value = 99.9; + Fieldstab[P_CPU].fmts = " %#4.1f"; + } show_msg(fmtmk("Show threads %s" , CHKw(Curwin, Show_THREADS) ? "On" : "Off")); } @@ -2626,7 +2636,8 @@ Rc.mode_irixps = !Rc.mode_irixps; show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off")); #endif - if(Rc.mode_irixps && smp_num_cpus>1){ + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))){ // good for 100 CPUs per process pcpu_max_value = 9999.0; Fieldstab[P_CPU].fmts = " %4.0f";