Package: psmisc
Version: 21.6cvs
Author: Guillem Jover <guillem@debian.org>
Status: applied
Description:
 I18N fixes.

diff -Naur -x CVS psmisc.cvs/src/fuser.c psmisc/src/fuser.c
--- psmisc.cvs/src/fuser.c	2004-11-03 22:32:14.000000000 +0100
+++ psmisc/src/fuser.c	2004-11-09 11:30:54.000000000 +0100
@@ -31,14 +31,8 @@
 #include <linux/kdev_t.h>	/* for MKDEV */
 #include <linux/major.h>	/* for LOOP_MAJOR */
 #endif
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(String) gettext (String)
-#else
-#define _(String) (String)
-#endif
 
+#include "i18n.h"
 #include "comm.h"
 #include "loop.h"         /* for loop_info */
 #include "signals.h"
@@ -668,7 +662,8 @@
       {
 	if (header && (file->flags & FLAG_VERB))
 	  {
-	    fprintf (stderr, _("\n%*s USER        PID ACCESS COMMAND\n"), NAME_FIELD, "");
+	    fprintf (stderr, _("\n%*s USER        PID ACCESS COMMAND\n"),
+		     NAME_FIELD, "");
 	    header = 0;
 	  }
 	length = 0;
@@ -995,10 +990,11 @@
 {
   fprintf(stderr, _("fuser (psmisc) %s\n"), VERSION);
   fprintf(stderr, _(
-    "Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"
+    "Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"));
+  fprintf(stderr, _(
     "PSmisc comes with ABSOLUTELY NO WARRANTY.\n"
-    "This is free software, and you are welcome to redistribute it under the terms\n"
-    "of the GNU General Public License.\n"
+    "This is free software, and you are welcome to redistribute it under\n"
+    "the terms of the GNU General Public License.\n"
     "For more information about these matters, see the files named COPYING.\n"));
 }
 
diff -Naur -x CVS psmisc.cvs/src/i18n.h psmisc/src/i18n.h
--- psmisc.cvs/src/i18n.h	1970-01-01 01:00:00.000000000 +0100
+++ psmisc/src/i18n.h	2004-11-09 11:02:33.000000000 +0100
@@ -0,0 +1,19 @@
+/* i18n.h - common i18n declarations for psmisc programs.  */
+
+#ifndef I18N_H
+#define I18N_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef ENABLE_NLS
+#include <locale.h>
+#include <libintl.h>
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#endif
+
diff -Naur -x CVS psmisc.cvs/src/killall.c psmisc/src/killall.c
--- psmisc.cvs/src/killall.c	2004-11-03 22:32:15.000000000 +0100
+++ psmisc/src/killall.c	2004-11-04 03:52:24.000000000 +0100
@@ -25,14 +25,8 @@
 #include <selinux/fs_secure.h>
 #include <selinux/ss.h>
 #endif /*FLASK_LINUX*/
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(String) gettext (String)
-#else
-#define _(String) (String)
-#endif
 
+#include "i18n.h"
 #include "comm.h"
 #include "signals.h"
 
@@ -390,13 +384,13 @@
 static void
 usage_pidof (void)
 {
-  fprintf (stderr, _("usage: pidof [ -eg ] name ...\n"));
-  fprintf (stderr, _("       pidof -V\n\n"));
-  fprintf (stderr, _("    -e      require exact match for very long names;\n"));
-  fprintf (stderr, _("            skip if the command line is unavailable\n"));
-  fprintf (stderr,
-	   _("    -g      show process group ID instead of process ID\n"));
-  fprintf (stderr, _("    -V      display version information\n\n"));
+  fprintf (stderr, _(
+    "usage: pidof [ -eg ] name ...\n"
+    "       pidof -V\n\n"
+    "    -e      require exact match for very long names;\n"
+    "            skip if the command line is unavailable\n"
+    "    -g      show process group ID instead of process ID\n"
+    "    -V      display version information\n\n"));
 }
 
 
@@ -404,26 +398,31 @@
 usage_killall (void)
 {
 #ifdef FLASK_LINUX
-  fprintf(stderr,_("Usage: killall [-s sid] [-c context] [ -egiqvw ] [ -signal ] name ...\n"));
+  fprintf(stderr, _(
+    "usage: killall [-s sid] [-c context] [ -egiqvw ] [ -signal ] name ...\n"));
 #else  /*FLASK_LINUX*/
-  fprintf (stderr, _("usage: killall [ OPTIONS ] [ -- ] name ...\n"));
+  fprintf(stderr, _(
+    "usage: killall [ OPTIONS ] [ -- ] name ...\n"));
 #endif /*FLASK_LINUX*/
-  fprintf (stderr, _("       killall -l, --list\n"));
-  fprintf (stderr, _("       killall -V --version\n\n"));
-  fprintf (stderr, _("  -e,--exact          require exact match for very long names\n"));
-  fprintf (stderr, _("  -I,--ignore-case-   case insensitive process name match\n"));
-  fprintf (stderr, _("  -g,--process-group  kill process group instead of process\n"));
-  fprintf (stderr, _("  -i,--interactive    ask for confirmation before killing\n"));
-  fprintf (stderr, _("  -l,--list           list all known signal names\n"));
-  fprintf (stderr, _("  -q,--quiet          don't print complaints\n"));
-  fprintf (stderr, _("  -s,--signal         send signal instead of SIGTERM\n"));
-  fprintf (stderr, _("  -v,--verbose        report if the signal was successfully sent\n"));
-  fprintf (stderr, _("  -V,--version        display version information\n"));
-  fprintf (stderr, _("  -w,--wait           wait for processes to die\n\n"));
-#ifdef FLASK_LINUX
-  fprintf (stderr, _("  -d,--sid            kill only process(es) having sid\n"));
-  fprintf (stderr, _("  -c,--context        kill only process(es) having scontext\n"));
-  fprintf(stderr, _("   (-s, -c are mutually exclusive and must precede other arguments)\n\n"));
+  fprintf(stderr, _(
+    "       killall -l, --list\n"
+    "       killall -V --version\n\n"
+    "  -e,--exact          require exact match for very long names\n"
+    "  -I,--ignore-case    case insensitive process name match\n"
+    "  -g,--process-group  kill process group instead of process\n"
+    "  -i,--interactive    ask for confirmation before killing\n"
+    "  -l,--list           list all known signal names\n"
+    "  -q,--quiet          don't print complaints\n"
+    "  -s,--signal         send signal instead of SIGTERM\n"
+    "  -v,--verbose        report if the signal was successfully sent\n"
+    "  -V,--version        display version information\n"
+    "  -w,--wait           wait for processes to die\n\n"));
+#ifdef FLASK_LINUX
+  fprintf(stderr, _(
+    "  -d,--sid            kill only process(es) having sid\n"
+    "  -c,--context        kill only process(es) having scontext\n"
+    "   (-s, -c are mutually exclusive and must precede other arguments)\n\n"
+    ));
 #endif /*FLASK_LINUX*/
 }
 
@@ -441,11 +440,13 @@
 void print_version()
 {
   fprintf(stderr, "%s (psmisc) %s\n", pidof ? "pidof" : "killall", VERSION);
-  fprintf(stderr, _("Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"));
-  fprintf(stderr, _("PSmisc comes with ABSOLUTELY NO WARRANTY.\n"));
-  fprintf(stderr, _("This is free software, and you are welcome to redistribute it under the terms\n"));
-  fprintf(stderr, _("of the GNU General Public License.\n"));
-  fprintf(stderr, _("For more information about these matters, see the files named COPYING.\n"));
+  fprintf(stderr, _(
+    "Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"));
+  fprintf(stderr, _(
+    "PSmisc comes with ABSOLUTELY NO WARRANTY.\n"
+    "This is free software, and you are welcome to redistribute it under\n"
+    "the terms of the GNU General Public License.\n"
+    "For more information about these matters, see the files named COPYING.\n"));
 }
 
 int
@@ -559,7 +560,8 @@
 
 	  lsid = strtol(optarg, buf, 0);
           if ( **buf ) {
-              (void) fprintf(stderr, _("%s: SID (%s) must be numeric\n"), name, *argv);
+              (void) fprintf(stderr, _("%s: SID (%s) must be numeric\n"),
+			     name, *argv);
               (void) fflush(stderr);
               return( 1 );
           }
@@ -569,7 +571,8 @@
           len = strlen(optarg);
           rv = security_sid_to_context(sid, buf, &len);
           if ( rv < 0 && (errno != ENOSPC) ) {
-              (void) fprintf(stderr, "%s: security_sid_to_context(%d) %s\n", name, (int) sid, strerror(errno));
+              (void) fprintf(stderr, "%s: security_sid_to_context(%d) %s\n",
+			     name, (int) sid, strerror(errno));
               (void) fflush(stderr);
               free(buf);
               return( 1 );
diff -Naur -x CVS psmisc.cvs/src/pstree.c psmisc/src/pstree.c
--- psmisc.cvs/src/pstree.c	2004-11-03 22:32:15.000000000 +0100
+++ psmisc/src/pstree.c	2004-11-09 10:53:42.000000000 +0100
@@ -23,14 +23,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#ifdef ENABLE_NLS
-#include <locale.h>
-#include <libintl.h>
-#define _(String) gettext (String)
-#else
-#define _(String) (String)
-#endif
 
+#include "i18n.h"
 #include "comm.h"
 
 #ifdef FLASK_LINUX
@@ -716,38 +710,43 @@
 static void
 usage (void)
 {
-  fprintf (stderr, _("usage: pstree [ -a ] [ -c ] [ -h | -H pid ] [ -l ] [ -n ] [ -p ] [ -u ]\n"));
-  fprintf (stderr, _("              [ -A | -G | -U ] [ pid | user]\n"));
-  fprintf (stderr, _("       pstree -V\n\n"));
-  fprintf (stderr, _("    -a     show command line arguments\n"));
-  fprintf (stderr, _("    -A     use ASCII line drawing characters\n"));
-  fprintf (stderr, _("    -c     don't compact identical subtrees\n"));
-  fprintf (stderr, _("    -h     highlight current process and its ancestors\n"));
-  fprintf (stderr, _("    -H pid highlight process \"pid\" and its ancestors\n"));
-  fprintf (stderr, _("    -G     use VT100 line drawing characters\n"));
-  fprintf (stderr, _("    -l     don't truncate long lines\n"));
-  fprintf (stderr, _("    -n     sort output by PID\n"));
-  fprintf (stderr, _("    -p     show PIDs; implies -c\n"));
-  fprintf (stderr, _("    -u     show uid transitions\n"));
-#ifdef FLASK_LINUX
-  fprintf (stderr, _("    -s     show Flask SIDs\n"));
-  fprintf (stderr, _("    -x     show Flask security contexts\n"));
-#endif /*FLASK_LINUX*/
-  fprintf (stderr, _("    -U     use UTF-8 (Unicode) line drawing characters\n"));
-  fprintf (stderr, _("    -V     display version information\n"));
-  fprintf (stderr, _("    pid    start at pid, default 1 (init)\n"));
-  fprintf (stderr, _("    user   show only trees rooted at processes of that user\n\n"));
+  fprintf (stderr, _(
+    "usage: pstree [ -a ] [ -c ] [ -h | -H pid ] [ -l ] [ -n ] [ -p ] [ -u ]\n"
+    "              [ -A | -G | -U ] [ pid | user]\n"
+    "       pstree -V\n\n"
+    "    -a     show command line arguments\n"
+    "    -A     use ASCII line drawing characters\n"
+    "    -c     don't compact identical subtrees\n"
+    "    -h     highlight current process and its ancestors\n"
+    "    -H pid highlight process \"pid\" and its ancestors\n"
+    "    -G     use VT100 line drawing characters\n"
+    "    -l     don't truncate long lines\n"
+    "    -n     sort output by PID\n"
+    "    -p     show PIDs; implies -c\n"
+    "    -u     show uid transitions\n"));
+#ifdef FLASK_LINUX
+  fprintf (stderr, _(
+    "    -s     show Flask SIDs\n"
+    "    -x     show Flask security contexts\n"));
+#endif /*FLASK_LINUX*/
+  fprintf (stderr, _(
+    "    -U     use UTF-8 (Unicode)) line drawing characters\n"
+    "    -V     display version information\n"
+    "    pid    start at pid, default 1 (init))\n"
+    "    user   show only trees rooted at processes of that user\n\n"));
   exit (1);
 }
 
 void print_version()
 {
   fprintf(stderr, _("pstree (psmisc) %s\n"), VERSION);
-  fprintf(stderr, _("Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"));
-  fprintf(stderr, _("pstree comes with ABSOLUTELY NO WARRANTY.\n"));
-  fprintf(stderr, _("This is free software, and you are welcome to redistribute it under the terms\n"));
-  fprintf(stderr, _("of the GNU General Public License.\n"));
-  fprintf(stderr, _("For more information about these matters, see the files named COPYING.\n"));
+  fprintf(stderr, _(
+    "Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n\n"));
+  fprintf(stderr, _(
+    "PSmisc comes with ABSOLUTELY NO WARRANTY.\n"
+    "This is free software, and you are welcome to redistribute it under\n"
+    "the terms of the GNU General Public License.\n"
+    "For more information about these matters, see the files named COPYING.\n"));
 }
 
 
diff -Naur -x CVS psmisc.cvs/src/signals.c psmisc/src/signals.c
--- psmisc.cvs/src/signals.c	2004-11-03 22:32:15.000000000 +0100
+++ psmisc/src/signals.c	2004-11-09 11:01:56.000000000 +0100
@@ -8,13 +8,8 @@
 #include <string.h>
 #include <ctype.h>
 #include <signal.h>
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(String) gettext (String)
-#else
-#define _(String) (String)
-#endif
+
+#include "i18n.h"
 #include "signals.h"
 
 
diff -Naur -x CVS psmisc.cvs/po/POTFILES.in psmisc/po/POTFILES.in
--- psmisc.cvs/po/POTFILES.in	2003-09-26 16:08:11.000000000 +0200
+++ psmisc/po/POTFILES.in	2004-10-31 08:30:58.000000000 +0100
@@ -1,3 +1,4 @@
 src/killall.c
 src/fuser.c
 src/pstree.c
+src/signals.c
diff -Naur -x CVS psmisc.cvs/po/.cvsignore psmisc/po/.cvsignore
--- psmisc.cvs/po/.cvsignore	2001-10-18 00:20:12.000000000 +0200
+++ psmisc/po/.cvsignore	2004-10-31 07:42:26.000000000 +0100
@@ -1,3 +1,4 @@
+*.gmo
 Makefile.in
 Makefile
 POTFILES
