}
#endif
+ /* and accommodate optional wider non-scalable columns... */
+ Fieldstab[P_UED].width = Fieldstab[P_URD].width
+ = Fieldstab[P_USD].width = Fieldstab[P_GID].width
+ = Rc.fixed_widest ? 5 + Rc.fixed_widest : 5;
+ Fieldstab[P_UEN].width = Fieldstab[P_URN].width
+ = Fieldstab[P_USN].width = Fieldstab[P_GRP].width
+ = Rc.fixed_widest ? 8 + Rc.fixed_widest : 8;
+
// lastly, ensure we've got proper column headers...
calibrate_fields();
} // end: zap_fieldstab
* 'SYS_RCFILESPEC' contains two lines consisting of the secure
* mode switch and an update interval. It's presence limits what
* ordinary users are allowed to do.
- * 'Rc_name' contains multiple lines - 2 global + 3 per window.
- * line 1: an eyecatcher and creating program/alias name
- * line 2: an id, Mode_altcsr, Mode_irixps, Delay_time and Curwin.
- * If running in secure mode via the /etc/rcfile,
- * the 'delay time' will be ignored except for root.
- * For each of the 4 windows:
- * line a: contains w->winname, fieldscur
- * line b: contains w->winflags, sortindx, maxtasks
- * line c: contains w->summclr, msgsclr, headclr, taskclr */
+ * 'Rc_name' contains multiple lines - 3 global + 3 per window.
+ * line 1 : an eyecatcher and creating program/alias name
+ * line 2 : an id, Mode_altcsr, Mode_irixps, Delay_time, Curwin.
+ * For each of the 4 windows:
+ * line a: contains w->winname, fieldscur
+ * line b: contains w->winflags, sortindx, maxtasks
+ * line c: contains w->summclr, msgsclr, headclr, taskclr
+ * line 15 : Fixed_widest */
static void configs_read (void) {
float tmp_delay = DEF_DELAY;
char fbuf[LRGBUFSIZ];
}
} // end: for (GROUPSMAX)
+ // any new addition(s) last, for older rcfiles compatibility...
+ fscanf(fp, "Fixed_widest=%d\n", &Rc.fixed_widest);
+ if (0 > Rc.fixed_widest) Rc.fixed_widest = 0;
+
fclose(fp);
} // end: if (fp)
, Winstk[i].rc.summclr, Winstk[i].rc.msgsclr
, Winstk[i].rc.headclr, Winstk[i].rc.taskclr);
}
+
+ // any new addition(s) last, for older rcfiles compatibility...
+ fprintf(fp, "Fixed_widest=%d\n", Rc.fixed_widest);
+
fclose(fp);
show_msg(fmtmk(N_fmt(WRITE_rcfile_fmt), Rc_name));
} // end: file_writerc
, pid, val, strerror(errno)));
}
break;
+ case 'X':
+ { int wide = get_int(fmtmk(N_fmt(XTRA_fixwide_fmt), Rc.fixed_widest));
+ if (-1 < wide) Rc.fixed_widest = wide;
+ else if (INT_MIN < wide && 0 > wide) show_msg(N_txt(BAD_integers_txt));
+ }
+ break;
case 'Z':
wins_colors();
break;
char keys[SMLBUFSIZ];
} key_tab[] = {
{ keys_global,
- { '?', 'B', 'd', 'F', 'f', 'g', 'H', 'h', 'I', 'k', 'r', 's', 'Z'
+ { '?', 'B', 'd', 'F', 'f', 'g', 'H', 'h', 'I', 'k', 'r', 's', 'X', 'Z'
, kbd_ENTER, kbd_SPACE, '\0' } },
{ keys_summary,
{ '1', 'C', 'l', 'm', 't', '\0' } },
Norm_nlstab[OFF_one_word_txt] = _("Off");
/* Translation Hint: Only the following words should be translated
. delay, limit, user, cols (abbreviation for columns)*/
- Norm_nlstab[USAGE_abbrev_txt] = _(" -hv | -bcHiSs -d delay -n limit -u|U user | -p pid[,pid] -w [cols]");
+ Norm_nlstab[USAGE_abbrev_txt] = _(" -hv | -bcHiSs -d delay -n limit -u|U user -p pid[,pid] -w [cols]");
Norm_nlstab[FAIL_statget_txt] = _("failed /proc/stat read");
Norm_nlstab[FOREST_modes_fmt] = _("Forest mode %s");
Norm_nlstab[FAIL_tty_get_txt] = _("failed tty get");
Norm_nlstab[FIND_no_next_txt] = _("Locate next inactive, use \"L\"");
Norm_nlstab[GET_find_str_txt] = _("Locate string");
Norm_nlstab[FIND_no_find_fmt] = _("%s\"%s\" not found");
+ Norm_nlstab[XTRA_fixwide_fmt] = _("fixed-width incr is %d, change to (0 = default)");
#ifndef WARN_CFG_OFF
Norm_nlstab[XTRA_warncfg_txt] = _("Overwrite existing old style rcfile?");
#endif
" Z~5,~1B~5 Global: '~1Z~2' change color mappings; '~1B~2' disable/enable bold\n"
" l,t,m Toggle Summaries: '~1l~2' load avg; '~1t~2' task/cpu stats; '~1m~2' mem info\n"
" 1,I Toggle SMP view: '~11~2' single/separate states; '~1I~2' Irix/Solaris mode\n"
- " f,F Manage Fields: add/remove; change order; select sort field\n"
+ " f,F,X Fields: '~1f~2'/'~1F~2' add/remove/order/sort; '~1X~2' increase fixed-width\n"
"\n"
" L,&,<,> . Locate: '~1L~2'/'~1&~2' find/again; Move sort column: '~1<~2'/'~1>~2' left/right\n" \
" R,H,V,J . Toggle: '~1R~2' Sort; '~1H~2' Threads; '~1V~2' Forest view; '~1J~2' Num justify\n"