]> granicus.if.org Git - procps-ng/log
procps-ng
12 years agow: fix broken -o (old-style) short form option
Jim Warner [Wed, 28 Dec 2011 07:27:27 +0000 (01:27 -0600)]
w: fix broken -o (old-style) short form option

12 years agobuild-sys: re-enable 'dist' build
Jim Warner [Mon, 26 Dec 2011 22:47:19 +0000 (16:47 -0600)]
build-sys: re-enable 'dist' build

The 'build-sys: re-enable out of tree build' commit
failed to also address the 'dist' target errors.

13 years agoMerge branch 'master' into nls
Craig Small [Sun, 25 Dec 2011 22:11:27 +0000 (09:11 +1100)]
Merge branch 'master' into nls

Conflicts:
configure.ac
pmap.c
ps/Makefile.am

13 years agoRenaming libprocfs to libprocps
Craig Small [Thu, 22 Dec 2011 22:18:43 +0000 (09:18 +1100)]
Renaming libprocfs to libprocps

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.

13 years agoFixed pmap -x Kbytes column
Craig Small [Thu, 22 Dec 2011 13:44:23 +0000 (00:44 +1100)]
Fixed pmap -x Kbytes column

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.

13 years agoFixed slabtop -o crash
Craig Small [Thu, 22 Dec 2011 12:53:17 +0000 (23:53 +1100)]
Fixed slabtop -o crash

printw should only be used for ncurses enabled screens, slabtop -o needs
to use the standard printf function, as before.

13 years agotop: update README with benchmarks using NLS support
Jim Warner [Wed, 21 Dec 2011 16:36:15 +0000 (10:36 -0600)]
top: update README with benchmarks using NLS support

13 years agotop: additions to search narrative in man documment
Jim Warner [Wed, 21 Dec 2011 15:31:36 +0000 (09:31 -0600)]
top: additions to search narrative in man documment

13 years agotop: final cleanup following nls conflict resolutions
Jim Warner [Tue, 20 Dec 2011 21:17:26 +0000 (15:17 -0600)]
top: final cleanup following nls conflict resolutions

This patch represents the final resting place for miscellaneous
changes not otherwise encountered or for which the resolution
was incomplete or incorrect.

13 years agotop: adapt 'locate/find next' search capability for nls
Jim Warner [Tue, 20 Dec 2011 20:43:54 +0000 (14:43 -0600)]
top: adapt 'locate/find next' search capability for nls

13 years agotop: changed 'err' to 'errmsg', avoid conflict with <err.h>
Jim Warner [Fri, 9 Dec 2011 17:10:30 +0000 (11:10 -0600)]
top: changed 'err' to 'errmsg', avoid conflict with <err.h>

13 years agotop: streamlined creation of nls string tables
Jim Warner [Wed, 7 Dec 2011 10:41:14 +0000 (04:41 -0600)]
top: streamlined creation of nls string tables

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

13 years agotop: corrected typos and clarified 'Translation' notes
Jim Warner [Wed, 7 Dec 2011 11:40:37 +0000 (05:40 -0600)]
top: corrected typos and clarified 'Translation' notes

13 years agotop: repositioned nls.h to avoid redefine of procps.h restrict
Jim Warner [Thu, 3 Nov 2011 22:31:00 +0000 (17:31 -0500)]
top: repositioned nls.h to avoid redefine of procps.h restrict

13 years agotop: added <stdlib.h> for VALIDATE_NLS which requires exit()
Jim Warner [Thu, 3 Nov 2011 22:23:21 +0000 (17:23 -0500)]
top: added <stdlib.h> for VALIDATE_NLS which requires exit()

13 years agotop: idiot! sometimes nls was misspelled nsl (but not anymore)
Jim Warner [Sat, 5 Nov 2011 23:34:50 +0000 (18:34 -0500)]
top: idiot! sometimes nls was misspelled nsl (but not anymore)

13 years agotop: added additional xgettext strings plus translator hints
Jim Warner [Mon, 7 Nov 2011 09:08:27 +0000 (03:08 -0600)]
top: added additional xgettext strings plus translator hints

13 years agotop: adapted/generalized comments for Makevars --add-comments=
Jim Warner [Sun, 6 Nov 2011 23:08:43 +0000 (17:08 -0600)]
top: adapted/generalized comments for Makevars --add-comments=

13 years agotop: finalized nls translation implementation
Jim Warner [Wed, 2 Nov 2011 17:30:03 +0000 (12:30 -0500)]
top: finalized nls translation implementation

13 years agotop: made prolog comments like those in procps:master
Jim Warner [Fri, 28 Oct 2011 15:28:37 +0000 (10:28 -0500)]
top: made prolog comments like those in procps:master

13 years agotop: provided for nls table integrity validation
Jim Warner [Sat, 29 Oct 2011 01:38:08 +0000 (20:38 -0500)]
top: provided for nls table integrity validation

13 years agotop: restored static to scat(), not needed in top_nls.c
Jim Warner [Fri, 28 Oct 2011 15:49:06 +0000 (10:49 -0500)]
top: restored static to scat(), not needed in top_nls.c

13 years agotop: corrected double #include missed at rebase
Jim Warner [Mon, 31 Oct 2011 08:46:39 +0000 (03:46 -0500)]
top: corrected double #include missed at rebase

13 years agotop: corrected missed escape seq from redesign
Jim Warner [Fri, 28 Oct 2011 15:30:40 +0000 (10:30 -0500)]
top: corrected missed escape seq from redesign

13 years agotop: optimization for show_special function
Jim Warner [Mon, 24 Oct 2011 22:20:45 +0000 (17:20 -0500)]
top: optimization for show_special function

13 years agotop: tweaked some xgettext emitted comments
Jim Warner [Thu, 27 Oct 2011 00:40:59 +0000 (19:40 -0500)]
top: tweaked some xgettext emitted comments

13 years agotop: added #include of proc/readproc.h to top.h
Jim Warner [Mon, 24 Oct 2011 22:18:57 +0000 (17:18 -0500)]
top: added #include of proc/readproc.h to top.h

13 years agotop: redesign Uniq_nlstab/show_special (nls quirks)
Jim Warner [Wed, 19 Oct 2011 19:14:37 +0000 (14:14 -0500)]
top: redesign Uniq_nlstab/show_special (nls quirks)

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

13 years agotop: shortened some of the longer lines, mostly nls
Jim Warner [Mon, 17 Oct 2011 23:29:59 +0000 (18:29 -0500)]
top: shortened some of the longer lines, mostly nls

13 years agotop: relocated nls.h from top_nls.h to top_nls.c
Jim Warner [Sun, 16 Oct 2011 22:56:11 +0000 (17:56 -0500)]
top: relocated nls.h from top_nls.h to top_nls.c

13 years agotop: use existing unsigned vs. separate int
Jim Warner [Sun, 16 Oct 2011 21:47:55 +0000 (16:47 -0500)]
top: use existing unsigned vs. separate int

13 years agotop: corrected several programmer comments
Jim Warner [Sat, 15 Oct 2011 00:58:02 +0000 (19:58 -0500)]
top: corrected several programmer comments

13 years agotop: fix misapplied 'rh analysis #2: top' patch
Jim Warner [Wed, 19 Oct 2011 08:33:04 +0000 (03:33 -0500)]
top: fix misapplied 'rh analysis #2: top' patch

13 years agotop: finalized top nls support (or so he thought)
Jim Warner [Fri, 14 Oct 2011 16:45:44 +0000 (11:45 -0500)]
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

13 years agotop: provide extensive, generalized nls support
Jim Warner [Tue, 11 Oct 2011 19:02:59 +0000 (14:02 -0500)]
top: provide extensive, generalized nls support

Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Jim Warner <james.warner@comcast.net>
13 years agotop: add gettext support
Sami Kerola [Sun, 9 Oct 2011 13:03:32 +0000 (15:03 +0200)]
top: add gettext support

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotop: with lib xalloc changes, restored prior memory logic
Jim Warner [Tue, 20 Dec 2011 14:23:37 +0000 (08:23 -0600)]
top: with lib xalloc changes, restored prior memory logic

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.

13 years agosysctl: enable pattern matching with path
Sami Kerola [Sun, 18 Dec 2011 15:24:36 +0000 (16:24 +0100)]
sysctl: enable pattern matching with path

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>
13 years agowatch: use strtod_or_err() to validate user input
Sami Kerola [Sun, 18 Dec 2011 15:07:44 +0000 (16:07 +0100)]
watch: use strtod_or_err() to validate user input

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotload: validate scale argument
Sami Kerola [Sun, 18 Dec 2011 14:58:48 +0000 (15:58 +0100)]
tload: validate scale argument

Earlier version crashed when negative value was provided.

$ tload -s -1
Segmentation fault

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolib: add strtod_or_err()
Sami Kerola [Sun, 18 Dec 2011 14:52:57 +0000 (15:52 +0100)]
lib: add strtod_or_err()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopwdx: write errors to stderr
Sami Kerola [Sun, 18 Dec 2011 14:37:02 +0000 (15:37 +0100)]
pwdx: write errors to stderr

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>
13 years agoslabtop: use strutils.c to validate user input
Sami Kerola [Sun, 18 Dec 2011 14:12:06 +0000 (15:12 +0100)]
slabtop: use strutils.c to validate user input

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>
13 years agovmstat: validate numeric user input and allow infinte updates
Sami Kerola [Sun, 18 Dec 2011 13:55:30 +0000 (14:55 +0100)]
vmstat: validate numeric user input and allow infinte updates

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>
13 years agotload: validate numeric user input
Sami Kerola [Sun, 18 Dec 2011 13:29:19 +0000 (14:29 +0100)]
tload: validate numeric user input

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agosysctl: exit with error message instead of usage()
Sami Kerola [Sun, 18 Dec 2011 13:07:34 +0000 (14:07 +0100)]
sysctl: exit with error message instead of usage()

Printing usage() output at error is too noisy.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add exit values to pmap manual page
Sami Kerola [Sun, 18 Dec 2011 12:52:03 +0000 (13:52 +0100)]
docs: add exit values to pmap manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: exit with error message instead of usage()
Sami Kerola [Sun, 18 Dec 2011 12:39:28 +0000 (13:39 +0100)]
pgrep: exit with error message instead of usage()

Printing usage() output at error is too noisy.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: clean up ps.1 manual page
Sami Kerola [Sun, 18 Dec 2011 01:03:28 +0000 (02:03 +0100)]
docs: clean up ps.1 manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agonls: improve translations and provide translator help comments
Sami Kerola [Sat, 17 Dec 2011 17:32:47 +0000 (18:32 +0100)]
nls: improve translations and provide translator help comments

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoother: tell what was taken from util-linux package
Sami Kerola [Wed, 7 Dec 2011 12:43:34 +0000 (13:43 +0100)]
other: tell what was taken from util-linux package

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agonls: add functions which take translations to be used
Sami Kerola [Wed, 7 Dec 2011 12:27:21 +0000 (13:27 +0100)]
nls: add functions which take translations to be used

Add the following three functions to most of the commands.

setlocale (LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: use rpmatch() to yes/no question
Sami Kerola [Sun, 13 Nov 2011 12:23:17 +0000 (13:23 +0100)]
skill: use rpmatch() to yes/no question

The patch also removes fixed size of input, which can be problematic.
I do not know how long the string `yes' might be in all of the worlds
languages.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agovmstats: fix coding style
Sami Kerola [Sat, 22 Oct 2011 22:14:01 +0000 (00:14 +0200)]
vmstats: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodosc: add long options to skill.1
Sami Kerola [Sat, 22 Oct 2011 19:07:10 +0000 (21:07 +0200)]
dosc: add long options to skill.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add long options to kill.1
Sami Kerola [Sat, 22 Oct 2011 18:48:41 +0000 (20:48 +0200)]
docs: add long options to kill.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: fix compiler warnings
Sami Kerola [Sat, 22 Oct 2011 18:32:29 +0000 (20:32 +0200)]
skill: fix compiler warnings

Pretty much all of the warnings where caused by some of the previous
patches, and they became visible with gcc when compiling with;

CFLAGS="-O -g -ggdb -Wall -Wextra -pedantic -Wstrict-overflow
-Wformat -Wswitch-default -Wswitch-enum -Wsync-nand
-Wredundant-decls -Wuninitialized"

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: add long options to usage output
Sami Kerola [Sat, 22 Oct 2011 18:04:30 +0000 (20:04 +0200)]
skill: add long options to usage output

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: support usage output to stdout & stderr
Sami Kerola [Sat, 22 Oct 2011 17:06:06 +0000 (19:06 +0200)]
skill: support usage output to stdout & stderr

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: use symbolic exit values
Sami Kerola [Sat, 22 Oct 2011 17:01:21 +0000 (19:01 +0200)]
skill: use symbolic exit values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: use strtosig() for -l option argument
Sami Kerola [Sat, 22 Oct 2011 16:07:18 +0000 (18:07 +0200)]
skill: use strtosig() for -l option argument

Re-enable signal number to name string, and other way around,
conversion after it broke at the time when long options where
introduced.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibproc-ng: add strtosig() function
Sami Kerola [Sat, 22 Oct 2011 16:05:42 +0000 (18:05 +0200)]
libproc-ng: add strtosig() function

The function will convert a signal number string to a signal name, or
vice a verse.  Return value is string, which is an function user is
expected to free after use.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: add long options
Sami Kerola [Sat, 22 Oct 2011 10:20:35 +0000 (12:20 +0200)]
skill: add long options

This commit broke `-l <sig>' conversion, which needs to be fixed
before kill can be claimed to work similar enough way as it did
earlier.  The fix require libprocps change, because the current
print_given_signals() simply does not work in this case.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: warning printout for non-existing processes
Sami Kerola [Sat, 22 Oct 2011 07:47:46 +0000 (09:47 +0200)]
skill: warning printout for non-existing processes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: add long options & new debugging option
Sami Kerola [Tue, 18 Oct 2011 20:41:25 +0000 (22:41 +0200)]
skill: add long options & new debugging option

Done for skillsnice_parse(), meaning the kill needs functionality
will be done later.

This commit also introduces new debugging option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: parse kill signals separately
Sami Kerola [Tue, 18 Oct 2011 20:03:25 +0000 (22:03 +0200)]
skill: parse kill signals separately

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: use strtol_or_err to nice argument parsing
Sami Kerola [Tue, 18 Oct 2011 19:38:15 +0000 (21:38 +0200)]
skill: use strtol_or_err to nice argument parsing

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolib: add strtol into utility library
Sami Kerola [Tue, 18 Oct 2011 18:54:30 +0000 (20:54 +0200)]
lib: add strtol into utility library

The utility library is for functions which are shared in commands,
but that does not belong to libproc-ng.  The first function is a
wrapper for strtol that performs error checking, and exists if such
happen.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: remove run time configuration global variables
Sami Kerola [Sun, 16 Oct 2011 14:14:21 +0000 (16:14 +0200)]
skill: remove run time configuration global variables

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: move usage functions near each other
Sami Kerola [Sun, 16 Oct 2011 13:19:16 +0000 (15:19 +0200)]
skill: move usage functions near each other

Done only for convenience.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: clean up which functionality is being called
Sami Kerola [Sun, 16 Oct 2011 13:13:22 +0000 (15:13 +0200)]
skill: clean up which functionality is being called

The skill.c is three different commands depending on how the
executable is named. This patch makes evaluation of the command name
cleaner.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: reindent the file
Sami Kerola [Sat, 15 Oct 2011 11:08:03 +0000 (13:08 +0200)]
skill: reindent the file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: use Makevars --add-comments= to limit .pot comments
Jim Warner [Sun, 6 Nov 2011 23:08:02 +0000 (17:08 -0600)]
build-sys: use Makevars --add-comments= to limit .pot comments

By not limiting --add-comments= via an argument, xgettext is far
too aggressive (one might say stupid) when extracting comments.
It doesn't even limit extraction to a single preceeding comment.

Here is an example showing a program source excerpt and the
resulting .pot excerpt:

 --- program source ----------------------------------------
 close (0); dup (in_fd[0]);  /* set the stdin to the in pipe */
 close (1); dup (out_fd[1]); /* set the stdout to the out pipe */
 close (2); dup (out_fd[1]); /* set the stderr to the out pipe */
 execvp (args[0], args);     /* exec gdb */
 perror (_("exec failed"));

 --- resulting .pot ----------------------------------------
 #. set the stdin to the in pipe
 #. set the stdout to the out pipe
 #. set the stderr to the out pipe
 #. exec gdb
 #: ps/stacktrace.c:28 ps/stacktrace.c:63
 msgid "exec failed"
 msgstr ""

13 years agobuild-sys: we don't need wide-ncurses, what were we thinking?
Jim Warner [Fri, 28 Oct 2011 13:37:30 +0000 (08:37 -0500)]
build-sys: we don't need wide-ncurses, what were we thinking?

. 1 program uses curses (top)
. 2 programs use ncurses (slabtop, watch)
. all 3 include non-wide <curses.h> or <ncurses.h>
. those 3 do not currently need wide support
. but anticipating nls, we link against libncursesw

This patch ensures an environment consistent with current
and future ncurses needs.

13 years agobuild-sys: added config.h include to nls.h (for PACKAGE str)
Jim Warner [Tue, 1 Nov 2011 23:38:52 +0000 (18:38 -0500)]
build-sys: added config.h include to nls.h (for PACKAGE str)

13 years agobuild-sys: added tabs to AC_CONFIG_FILES for consistency
Jim Warner [Mon, 31 Oct 2011 15:15:23 +0000 (10:15 -0500)]
build-sys: added tabs to AC_CONFIG_FILES for consistency

13 years agobuild-sys: alphabeticized strverscmp in AC_CHECK_FUNCS
Jim Warner [Mon, 31 Oct 2011 15:13:20 +0000 (10:13 -0500)]
build-sys: alphabeticized strverscmp in AC_CHECK_FUNCS

13 years agobuild-sys: added some missing files to AC_CHECK_HEADERS
Jim Warner [Mon, 31 Oct 2011 14:57:00 +0000 (09:57 -0500)]
build-sys: added some missing files to AC_CHECK_HEADERS

13 years agoslabtop: added remaining missing nls support
Jim Warner [Thu, 3 Nov 2011 16:07:47 +0000 (11:07 -0500)]
slabtop: added remaining missing nls support

13 years agofree: added remaining missing nls support
Jim Warner [Thu, 3 Nov 2011 10:37:10 +0000 (05:37 -0500)]
free: added remaining missing nls support

13 years agomisc: trailing space/tab cleanup following rebase
Jim Warner [Thu, 27 Oct 2011 14:50:24 +0000 (09:50 -0500)]
misc: trailing space/tab cleanup following rebase

13 years agobuild-sys: corrected/simplified ncurses support detection
Jim Warner [Wed, 26 Oct 2011 22:29:48 +0000 (17:29 -0500)]
build-sys: corrected/simplified ncurses support detection

13 years agopmap: correct 'rh analysis #2' patch and contrib document
Jim Warner [Mon, 24 Oct 2011 22:16:26 +0000 (17:16 -0500)]
pmap: correct 'rh analysis #2' patch and contrib document

13 years agobuild-sys: verify gettext is present in autogen.sh
Sami Kerola [Wed, 19 Oct 2011 09:45:38 +0000 (11:45 +0200)]
build-sys: verify gettext is present in autogen.sh

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: add missing files to distribution
Sami Kerola [Wed, 19 Oct 2011 08:37:03 +0000 (10:37 +0200)]
build-sys: add missing files to distribution

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: remove non-existing files from Makefile.am
Sami Kerola [Wed, 19 Oct 2011 07:58:06 +0000 (09:58 +0200)]
build-sys: remove non-existing files from Makefile.am

The f23390043bece9f2d4870e5b3a187896e2c7d23f removed few files,
which still exist in Makefile.am making `make dist' to fail. This
patch fixes the isue.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: add rh analysis #2 information to contrib
Sami Kerola [Wed, 19 Oct 2011 07:39:36 +0000 (09:39 +0200)]
docs: add rh analysis #2 information to contrib

Reference information.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: enable xgettext TRANSLATORS comments
Jim Warner [Fri, 14 Oct 2011 07:10:34 +0000 (02:10 -0500)]
build-sys: enable xgettext TRANSLATORS comments

This commit will enable pass comments to translators near gettext
directive to .pot file. For example;

/* TRANSLATORS: this is visible in .pot file */
printf(_("to be translated"));

Signed-off-by: Jim Warner <james.warner@comcast.net>
13 years agosysctl: warn when separators are repeated
Sami Kerola [Wed, 12 Oct 2011 21:21:34 +0000 (23:21 +0200)]
sysctl: warn when separators are repeated

For some reason sysctl earlier allowed quite strange separators.

% sysctl kernel./.pty.nr
kernel./.pty.nr = 6
% sysctl kernel///pty//////////nr
kernel...pty..........nr = 6

This commit does not disallow that sort of constructs, but will warn
about them. In future disallowing these might be reasonable thing to
do.

% sysctl kernel./.pty.nr
sysctl: separators should not be repeated: ./.pty.nr
kernel./.pty.nr = 6

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agosysctl: use libc error printing facilities
Sami Kerola [Wed, 12 Oct 2011 20:35:56 +0000 (22:35 +0200)]
sysctl: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agovmstat: use libc error printing facilities
Sami Kerola [Wed, 12 Oct 2011 18:53:11 +0000 (20:53 +0200)]
vmstat: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: use libc error printing facilities
Sami Kerola [Tue, 11 Oct 2011 21:20:36 +0000 (23:20 +0200)]
pgrep: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibproc-ng & ps: fix warning reported by smatch
Sami Kerola [Tue, 11 Oct 2011 20:01:19 +0000 (22:01 +0200)]
libproc-ng & ps: fix warning reported by smatch

proc/ksym.c +279 read_file(54) info: redundant null check on buf calling free()
proc/ksym.c +330 parse_ksyms(41) info: redundant null check on ksyms_data calling free()
proc/ksym.c +332 parse_ksyms(43) info: redundant null check on ksyms_index calling free()
proc/ksym.c +451 sysmap_mmap(110) info: redundant null check on sysmap_index calling free()
proc/procps.h:74:5: warning: undefined preprocessor identifier 'SHARED'
proc/slab.c +145 parse_slabinfo20(24) error: potential null derefence 'prev'.
proc/slab.c +222 parse_slabinfo11(21) error: potential null derefence 'prev'.
ps/stacktrace.c +131 debug(6) error: snprintf() is printing too much 99 vs 16

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomisc: compiler warning fixes
Sami Kerola [Sun, 9 Oct 2011 20:45:59 +0000 (22:45 +0200)]
misc: compiler warning fixes

Fix few compiler warnings. Some of these warnings appeared multiple
times, and the listing bellow is more about which sort of errors
where fixed.

devname.c:87:12: warning: comparison of integers of different signs: 'int' and 'unsigned long'
output.c:389:36: warning: passing 'char **const' to parameter of type 'const char *const restrict *' discards qualifiers in nested pointer types
output.c:611:31: warning: comparison of integers of different signs: 'const unsigned long' and 'int'
stacktrace.c:33:37: warning: unused parameter 'signum'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoincludes: add xalloc.h to unify memory allocations
Sami Kerola [Sun, 9 Oct 2011 19:29:26 +0000 (21:29 +0200)]
includes: add xalloc.h to unify memory allocations

The xalloc.h provides necessary error checking.

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: add gettext support
Sami Kerola [Sun, 9 Oct 2011 11:52:57 +0000 (13:52 +0200)]
ps: add gettext support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agowatch: add gettext support
Sami Kerola [Sun, 9 Oct 2011 11:12:04 +0000 (13:12 +0200)]
watch: add gettext support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agow: add gettext support
Sami Kerola [Sun, 9 Oct 2011 11:05:02 +0000 (13:05 +0200)]
w: add gettext support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agovmstat: add gettext support
Sami Kerola [Sun, 9 Oct 2011 10:35:38 +0000 (12:35 +0200)]
vmstat: add gettext support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agouptime: add gettext support
Sami Kerola [Sun, 9 Oct 2011 10:25:30 +0000 (12:25 +0200)]
uptime: add gettext support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>