Commit Graph

12 Commits

Author SHA1 Message Date
Jim Warner
384afa494a top: optional wider non-scalable cols
This commit accommodates those fields which may have
suffered truncation due to these default limits:
  . 5 digits for uid/gid type fields
  . 8 characters for user/group type fields

With a new interactive command, users can increase the
width of all such fields, or return to the defaults.

Note:
   There are no restrictions on the amount added to
   the defaults.  The user is free to vastly exceed
   screen limits which simply means such fields can
   never be displayed.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-10-02 20:56:40 +10:00
Jim Warner
0f61354bf7 top: refactoring now allows column header nls support
Now that column headings are independent of column
data format and require no carefully managed padding
bytes they are candidates for nls translation.

This commit migrates all column headings to the .pot
file with additional translator guidance in the form
of maximum sizes to avoid truncation.

It also places these new additions adjacent to their
associated descriptions, which were already present.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-10-02 20:56:40 +10:00
Jim Warner
4b98733132 top: honor the restrictive, crufty old top rcfile
At one time, new top silently defaulted when an rcfile
was found to be incompatible.  This is exactly what
the old top did.  However, after some discussion it
was decided top should alert the user and thereby
save the system administrator some headaches.

Now, some are upset over the fatal error, proving you
can't please everybody.  But in all fairness, given
the difficulty of customizing old top, any reluctance
to delete an old saved rcfile is understandable.

To ease transition to this new top, old style rcfiles
will now be honored and converted to the new format.
And if not disabled at ./configure time via CFLAGS,
a user will be warned when an old style rcfile is
about to be overwritten using the 'W' command.

Lastly, the config validation logic was enhanced to
help ensure both types of rcfile haven't been edited
manually and possibly made unuseable.

Reported-By: sergio <mailbox@sergio.spb.ru>
Bug-Debian:  http://bugs.debian.org/651213

Reported-By: martin f krafft <madduck@debian.org>
Bug-Debian:  http://bugs.debian.org/651863

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-02 21:29:43 +11:00
Jim Warner
a096fec8c0 top: extend the Copyright (c) dates to include 2012
Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-02-12 21:52:23 +11:00
Jim Warner
e64b6f70d7 top: update some programmer documentation (no logic, just comments)
This commit corrects some outdated programmer comments.

Additionally, certain nls justifications might become
increasingly obscure with the passage of time so some
previous nls commit text has been added as comments.
2012-01-04 08:58:54 +11:00
Jim Warner
c465dca573 top: adapt 'locate/find next' search capability for nls 2011-12-22 23:48:06 +11:00
Jim Warner
04e3ec75dd top: idiot! sometimes nls was misspelled nsl (but not anymore) 2011-12-22 23:48:05 +11:00
Jim Warner
bc441a67ea top: added additional xgettext strings plus translator hints 2011-12-22 23:48:05 +11:00
Jim Warner
5826ce4c6e top: relocated nls.h from top_nls.h to top_nls.c 2011-12-22 23:48:04 +11:00
Jim Warner
eac96c37b5 top: corrected several programmer comments 2011-12-22 23:48:04 +11:00
Jim Warner
3f7468082a top: finalized top nls support (or so he thought)
summary of changes:
. adopted relative paths to 'include' and 'proc'
  dirs so that stand alone compiles are made
  easier and no one need guess their locations

. corrected several names for enums and macro
  usage reflecting fmt vs. txt

. expanded all octal escape sequences to a full
  3 digits since one already required 3 digits

. finalized translator hints (for now)

programming note:
  as an aside, by not including an argument for
  the gettext --add-comments, any preceeding c
  style comment will be propagated to the .pot
  file, if the gettext macro isn't empty.

  /* Need Not Say 'TRANSLATORS' ...
  snprintf(buf, sizeof(buf), "%s", _(   // unseen
  /* Translator Hint: ...
  snprintf(buf, sizeof(buf), "%s", _("" // seen
2011-12-22 23:48:04 +11:00
Jim Warner
32a9adbc13 top: provide extensive, generalized nls support
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Jim Warner <james.warner@comcast.net>
2011-12-22 23:48:04 +11:00