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>
union el *procs;
int num;
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
parse_opts (argc, argv);
procs = select_procs (&num);
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
x_option = d_option = q_option = 0;
while ((c = getopt_long(argc, argv, "xrdqA:hV", longopts, NULL)) != -1)
/***** no comment */
int main(int argc, char *argv[]){
#if (__GNU_LIBRARY__ >= 6)
- setlocale (LC_CTYPE, "");
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
#endif
#ifdef DEBUG
{NULL, 0, 0, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
switch (ch) {
case 'V':
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
if (argc < 2)
kill_usage(stderr);
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
PrintName = true;
PrintNewline = true;
IgnoreError = false;
{NULL, 0, NULL, 0}
};
- while ((opt = getopt_long(argc, argv, "s:d:Vh", longopts, NULL)) != -1)
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ while ((opt =
+ getopt_long(argc, argv, "s:d:Vh", longopts, NULL)) != -1)
switch (opt) {
case 's':
scale_arg = optarg;
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
while ((c = getopt_long(argc, argv, "hV", longopts, NULL)) != -1)
switch (c) {
case 'h':
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
while ((c =
getopt_long(argc, argv, "afmnsdDp:S:hV", longopts,
NULL)) != EOF)
{NULL, 0, NULL, 0}
};
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
#ifndef W_SHOWFROM
from = 0;
#endif
- setlocale(LC_ALL, "");
- while ((ch = getopt_long(argc, argv, "hlusfVo", longopts, NULL)) != -1)
+ while ((ch =
+ getopt_long(argc, argv, "hlusfV", longopts, NULL)) != -1)
switch (ch) {
case 'h':
header = 0;
};
setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
while ((optc =
getopt_long(argc, argv, "+bced::hn:pvtx", longopts, (int *)0))