summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Made the c and nls include explicitnlsCraig Small2012-01-021-2/+2
| | | | | These two includes need the path otherwise the make distcheck fails. I suspect its actually a ps/Makefile.am problem
* Updated testsuite files for new NLS outputCraig Small2012-01-029-14/+20
|
* translations: group usage textsSami Kerola2012-01-0211-173/+173
| | | | | Reference: http://www.freelists.org/post/procps/backporting,5 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* w: fix broken -o (old-style) short form optionJim Warner2012-01-021-1/+1
|
* build-sys: re-enable 'dist' buildJim Warner2012-01-022-1/+2
| | | | | The 'build-sys: re-enable out of tree build' commit failed to also address the 'dist' target errors.
* Merge branch 'master' into nlsCraig Small2011-12-269-23/+25
|\ | | | | | | | | | | | | Conflicts: configure.ac pmap.c ps/Makefile.am
| * Renaming libprocfs to libprocpsCraig Small2011-12-237-21/+21
| | | | | | | | | | | | | | | | | | 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.
| * Fixed pmap -x Kbytes columnCraig Small2011-12-231-1/+3
| | | | | | | | | | | | 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.
* | Fixed slabtop -o crashCraig Small2011-12-221-2/+2
| | | | | | | | | | printw should only be used for ncurses enabled screens, slabtop -o needs to use the standard printf function, as before.
* | top: update README with benchmarks using NLS supportJim Warner2011-12-221-0/+50
| |
* | top: additions to search narrative in man docummentJim Warner2011-12-221-2/+5
| |
* | top: final cleanup following nls conflict resolutionsJim Warner2011-12-221-2/+2
| | | | | | | | | | | | This patch represents the final resting place for miscellaneous changes not otherwise encountered or for which the resolution was incomplete or incorrect.
* | top: adapt 'locate/find next' search capability for nlsJim Warner2011-12-223-13/+19
| |
* | top: changed 'err' to 'errmsg', avoid conflict with <err.h>Jim Warner2011-12-221-5/+5
| |
* | top: streamlined creation of nls string tablesJim Warner2011-12-221-340/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | top: corrected typos and clarified 'Translation' notesJim Warner2011-12-221-2/+4
| |
* | top: repositioned nls.h to avoid redefine of procps.h restrictJim Warner2011-12-221-2/+2
| |
* | top: added <stdlib.h> for VALIDATE_NLS which requires exit()Jim Warner2011-12-221-0/+3
| |
* | top: idiot! sometimes nls was misspelled nsl (but not anymore)Jim Warner2011-12-223-6/+6
| |
* | top: added additional xgettext strings plus translator hintsJim Warner2011-12-223-5/+22
| |
* | top: adapted/generalized comments for Makevars --add-comments=Jim Warner2011-12-221-86/+83
| |
* | top: finalized nls translation implementationJim Warner2011-12-222-13/+72
| |
* | top: made prolog comments like those in procps:masterJim Warner2011-12-221-5/+5
| |
* | top: provided for nls table integrity validationJim Warner2011-12-222-0/+28
| |
* | top: restored static to scat(), not needed in top_nls.cJim Warner2011-12-221-1/+1
| |
* | top: corrected double #include missed at rebaseJim Warner2011-12-221-2/+0
| |
* | top: corrected missed escape seq from redesignJim Warner2011-12-221-1/+1
| |
* | top: optimization for show_special functionJim Warner2011-12-221-2/+2
| |
* | top: tweaked some xgettext emitted commentsJim Warner2011-12-221-12/+12
| |
* | top: added #include of proc/readproc.h to top.hJim Warner2011-12-221-0/+2
| |
* | top: redesign Uniq_nlstab/show_special (nls quirks)Jim Warner2011-12-222-111/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until this patch, top had used some strings with special escape sequences to produce colors, normal text, bold text, etc. They took the following form, explained by an excerpt from program comments: ... Our special formatting consists of: "some text <_delimiter_> some more text <_delimiter_>...\n" Where <_delimiter_> is a single byte in the range of: \001 through \010 (in decimalizee, 1 - 8) and is used to select an 'attribute' from a capabilities table which is then applied to the *preceding* substring. ... Unfortunately, these nonprinting values revealed insurmountable inconsistencies in both the front-end and back-end translation tools. The xgettext (extraction) program would take those special escapes, convert them and then output raw binary values. Thus the .pot file would contain lots of unprintable stuff making it unreadable. If the following was added to po/Makevars, most of those special escapes would be preserved in their escape notation: XGETTEXT_OPTIONS = ... --escape But two escapes were converted from octal notation and there was no way to prevent it: \007 --> \a \010 --> \b After a pass through the msginit program, most of the escapes were reconverted to raw binary values making translation impossible. There was no "--escape" option for the back-end programs like there was for xgettext. But the real killer was the escape \004, also used in some of top's special strings. This value would be silently accepted by xgettext, only to produce the following fatal error in back-end programs like msginit, msgfmt and msgen: .pot:2647: context separator <EOT> within string To quote from one of the references below: "Would you create a suite of tools that silently allow what is destined to become a fatal error to pass unnoticed?" So the bottom line was: top's special strings, in use for the past nine years, had to be redesigned. References: http://www.freelists.org/post/procps/procpsng-nls-support,11 http://www.freelists.org/post/procps/procpsng-nls-support,14
* | top: shortened some of the longer lines, mostly nlsJim Warner2011-12-221-7/+10
| |
* | top: relocated nls.h from top_nls.h to top_nls.cJim Warner2011-12-222-2/+2
| |
* | top: use existing unsigned vs. separate intJim Warner2011-12-221-2/+1
| |
* | top: corrected several programmer commentsJim Warner2011-12-222-10/+10
| |
* | top: fix misapplied 'rh analysis #2: top' patchJim Warner2011-12-221-2/+4
| |
* | top: finalized top nls support (or so he thought)Jim Warner2011-12-224-162/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | top: provide extensive, generalized nls supportJim Warner2011-12-2211-363/+925
| | | | | | | | | | Reviewed-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Jim Warner <james.warner@comcast.net>
* | top: add gettext supportSami Kerola2011-12-221-110/+106
| | | | | | | | | | Signed-off-by: Jim Warner <james.warner@comcast.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | top: with lib xalloc changes, restored prior memory logicJim Warner2011-12-222-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the privatization of the library xalloc functions, this patch restores top's previous internal memory logic. This puts us back on a 3.3.1 (and earlier) footing wherein memory allocation errors carry these implications: . if top detected, the terminal will be restored prior to an abnormal exit and message . if library detected, the terminal will become corrupted following the message To my knowledge, neither type of memory error has ever occurred during the nine years since top was rewritten. So the issue of restoring the termios structure is probably moot.
* | sysctl: enable pattern matching with pathSami Kerola2011-12-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Pattern matching support in `sysctl: implement --pattern option' commit did not work when variable path was defined, for example $ sysctl net.ipv4 -r arp.ignore gave no output. Reason being was tht the pattern was matched agains the specified argument and not the output variable list. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | watch: use strtod_or_err() to validate user inputSami Kerola2011-12-202-11/+7
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | tload: validate scale argumentSami Kerola2011-12-201-6/+5
| | | | | | | | | | | | | | | | | | Earlier version crashed when negative value was provided. $ tload -s -1 Segmentation fault Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | lib: add strtod_or_err()Sami Kerola2011-12-202-0/+25
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | pwdx: write errors to stderrSami Kerola2011-12-201-1/+3
| | | | | | | | | | | | | | Includes also magic number removal (return value 1 to EXIT_FAILURE), and proper null assignment to end of string. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | slabtop: use strutils.c to validate user inputSami Kerola2011-12-202-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes also peculiar behavior of $ slabtop -d 0 which did not make sense. The fix is to disallow anything else but positive integers, which includes zero as is is not positive (or negative) number. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | vmstat: validate numeric user input and allow infinte updatesSami Kerola2011-12-202-9/+19
| | | | | | | | | | | | | | | | | | The vmstat used ULONG_MAX as definition of infinite updates. On a computer with mighty uptime one will find that after 136 years (assuming 1 second update interval) the vmstat exits, which is in conflict with a promise of infinite. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | tload: validate numeric user inputSami Kerola2011-12-202-2/+10
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | sysctl: exit with error message instead of usage()Sami Kerola2011-12-201-16/+16
| | | | | | | | | | | | Printing usage() output at error is too noisy. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | docs: add exit values to pmap manual pageSami Kerola2011-12-201-0/+15
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>