This change allows user to see what was the last message before exit
on error, and when where the last update.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Bug-Debian: http://bugs.debian.org/654368
On systems with very large amonut of RAM when they use the -b or --bytes
option on free you get overflow and free shows a negative amount of
memory, which is obviously wrong.
The handling of the -c (count) option in free uses the standard string
handling and error utils. The program also checks for negative counts
and errors on these.
The -e option would print a confusing error message. This is because
most error messages in watch are one word. This fix makes a more
sensible message about what went wrong.
The -x option exited before the endwin() function was called, so if the
child process died the terminal was left in a funky state. endwin is now
called just before the exit(8) for the -x option.
Some of the latest changes to Makefile.am files are missing.
This patch restores the LOCALEDIR variable, among others,
and dispenses with the include directives in the ps/ and top/
subdirectories since they're no longer needed.
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.
This commit represents an experiment in nls help text support.
The word --help itself been made translatable along with the
help section names and their abbreviations. Thus, the work of
the translators will ultimately alter program run-time behavior.
Perhaps someday all "long" options can behave in a similar way
which could offer a considerable benefit to other languages.
Instead of translationg just option descriptions, the long
forms of those options could also be transalated.
This commit also:
. includes the section abbreviations in --help output
. isolates all --help support in the ps/help.c module
. provides (hopefully) meaningful Translator guidance
. removes --help support from the ps/common.h header
. removes --help support from the ps/parser.c module
. eliminates tabs in line with the style of other ps modules
. eliminates the need for the include/c.h header file
This commit is prmarily concerned with elimnating deugging only
code from the nls template file.
It also eliminates any remaing useless trailing whitespace.
This patch mostly reorganizes include files and eliminates
some useless trailing whitespace.
It also adopts the standard procps-ng unconditional approach
to nls initialization.
err and warn are BSD format but they are not recommended by library
developers. However their consiseness is useful!
The solution is to use some macros that create xerr etc which then
just map to the error() function. The next problem is error() uses
program_invocation_name so we set this to program_invovation_short_name
This is a global set but seems to be the convention (or at least errors
are on the short name only) used everywhere else.
The library used to be called libprocps but it was renamed to make sure
there was only one. However the formatting of the library SONAME has
changed so there cannot be any confusion.
libprocps makes it clear that its a library from this project and not a
set of functions directly on the filesystem.
The Kbytes column when using the pmap -x flag would always be zero. This
was because the diff variable was reset before it could be printed.
pmap with no -x was not impacted by this bug or fix.
This patch represents the final resting place for miscellaneous
changes not otherwise encountered or for which the resolution
was incomplete or incorrect.
The gettext documentation leads one to believe that
a printf type call is necessary for gettext string
extraction. That turns out to be misleading and
all one really needs is the runtime gettext string
address resolution.
Thus, we can avoid our original snprintf/strdup
overhead and establish an address for the original
or translated string just by issuing the _() macro.
We create these nls string tables so that:
1) top avoids the overhead of repeated
runtime function calls
2) we can control the order of top's
strings in the .pot file
3) translator comments don't obscure
and clutter the main program