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>
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>
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>
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>
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>
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>
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 ""
. 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.
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>
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>
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>
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>
This file contains various preprocessor directed definitions, and
other definitions, which most programs need.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>