static char Rc_name [OURPATHSZ];
static RCF_t Rc = DEF_RCFILE;
static int Rc_questions;
+static int Rc_compatibilty;
/* SMP, Irix/Solaris mode, Linux 2.5.xx support (and beyond) */
static long Hertz;
if (Rc.zero_suppress < 0 || Rc.zero_suppress > 1)
Rc.zero_suppress = 0;
+ // prepare to warn that older top can no longer read rcfile ...
+ if (Rc.id != RCF_VERSION_ID)
+ Rc_compatibilty = 1;
+
// lastly, let's process any optional glob(s) ...
// (darn, must do osel 1st even though alphabetically 2nd)
fbuf[0] = '\0';
return;
Rc_questions = 0;
}
+ if (Rc_compatibilty) {
+ show_pmt(N_txt(XTRA_warnold_txt));
+ if ('y' != tolower(iokey(1)))
+ return;
+ Rc_compatibilty = 0;
+ }
if (!(fp = fopen(Rc_name, "w"))) {
show_msg(fmtmk(N_fmt(FAIL_rc_open_fmt), Rc_name, strerror(errno)));
return;
Norm_nlstab[XTRA_vforest_fmt] = _("PID to collapse/expand [default pid = %d]");
Norm_nlstab[XTRA_size2up_txt] = _("terminal is not wide enough");
Norm_nlstab[XTRA_modebad_txt] = _("wrong mode, command inactive");
+ Norm_nlstab[XTRA_warnold_txt] = _("saving prevents older top from reading, save anyway?");
}
WORD_eachcpu_fmt, WORD_exclude_txt, WORD_include_txt, WORD_noneone_txt,
WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt,
XTRA_badflds_fmt, XTRA_fixwide_fmt, XTRA_modebad_txt, XTRA_size2up_txt,
- XTRA_vforest_fmt, XTRA_warncfg_txt, XTRA_winsize_txt,
+ XTRA_vforest_fmt, XTRA_warncfg_txt, XTRA_warnold_txt, XTRA_winsize_txt,
#ifndef INSP_OFFDEMO
YINSP_demo01_txt, YINSP_demo02_txt, YINSP_demo03_txt, YINSP_deqfmt_txt,
YINSP_deqtyp_txt, YINSP_dstory_txt,