From: Phil Blundell Date: Sun, 8 Apr 2001 17:05:05 +0000 (+0000) Subject: Use setlocale at program initialisation. X-Git-Tag: v1.60~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d07aec815238096ca4624aeb5384b44685c5dafe;p=platform%2Fupstream%2Fnet-tools.git Use setlocale at program initialisation. Patch from Arnaldo Carvalho de Melo. --- diff --git a/arp.c b/arp.c index a090d31..509a804 100644 --- a/arp.c +++ b/arp.c @@ -8,7 +8,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: $Id: arp.c,v 1.19 2000/12/19 00:34:27 ecki Exp $ + * Version: $Id: arp.c,v 1.20 2001/04/08 17:05:05 pb Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -44,6 +44,7 @@ *990101 {1.85} Bernd Eckenfels fixed usage and return codes *990105 (1.86) Phil Blundell: don't ignore EINVAL in arp_set *991121 (1.87) Bernd Eckenfels: yes --device has a mandatory arg + *010404 (1.88) Arnaldo Carvalho de Melo: use setlocale * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -79,7 +80,7 @@ #define FEATURE_ARP #include "lib/net-features.h" -char *Release = RELEASE, *Version = "arp 1.87 (1999-11-21)"; +char *Release = RELEASE, *Version = "arp 1.88 (2001-04-04)"; int opt_n = 0; /* do not resolve addresses */ int opt_N = 0; /* use symbolic names */ @@ -655,6 +656,7 @@ int main(int argc, char **argv) }; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/hostname.c b/hostname.c index a4efdfb..8793fb9 100644 --- a/hostname.c +++ b/hostname.c @@ -22,6 +22,7 @@ *960218 {1.96} Bernd Eckenfels : netinet/in.h added *980629 {1.97} Arnaldo Carvalho de Melo : gettext instead of catgets for i18n *20000213 {1.99} Arnaldo Carvalho de Melo : fixed some i18n strings + *20010404 {1.100} Arnaldo Carvalho de Melo: use setlocale * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -46,7 +47,7 @@ #include #endif -char *Release = RELEASE, *Version = "hostname 1.99 (2000-02-13)"; +char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)"; static char *program_name; static int opt_v; @@ -280,6 +281,7 @@ int main(int argc, char **argv) {0, 0, 0, 0} }; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/ifconfig.c b/ifconfig.c index 2363488..0c6ce08 100644 --- a/ifconfig.c +++ b/ifconfig.c @@ -3,7 +3,7 @@ * that either displays or sets the characteristics of * one or more of the system's networking interfaces. * - * Version: $Id: ifconfig.c,v 1.46 2001/04/01 14:50:24 pb Exp $ + * Version: $Id: ifconfig.c,v 1.47 2001/04/08 17:05:05 pb Exp $ * * Author: Fred N. van Kempen, * and others. Copyright 1993 MicroWalt Corporation @@ -22,6 +22,7 @@ * 10/1998 - Andi Kleen. Use interface list primitives. * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu * (default AF was wrong) + * 20010404 - Arnaldo Carvalho de Melo, use setlocale */ #define DFLT_AF "inet" @@ -250,6 +251,7 @@ int main(int argc, char **argv) #endif #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/intl.h b/intl.h index 13396f3..32d02b6 100644 --- a/intl.h +++ b/intl.h @@ -1,6 +1,7 @@ /* Dummy header for libintl.h */ #if I18N +#include #undef __OPTIMIZE__ #include #define _(String) gettext((String)) diff --git a/ipmaddr.c b/ipmaddr.c index 4bf54db..2134e81 100644 --- a/ipmaddr.c +++ b/ipmaddr.c @@ -8,6 +8,9 @@ * * Authors: Alexey Kuznetsov, * + * Changes: Arnaldo Carvalho de Melo + * 20010404 - use setlocale + * */ #include @@ -42,7 +45,7 @@ int filter_family; #define DELADDR 2 char *Release = RELEASE, - *Version = "ipmaddr 1.0", + *Version = "ipmaddr 1.1", *Signature = "Alexey Kuznetsov, "; static void version(void) @@ -388,6 +391,7 @@ int main(int argc, char **argv) char *basename; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/iptunnel.c b/iptunnel.c index 979c1f8..4943d83 100644 --- a/iptunnel.c +++ b/iptunnel.c @@ -14,6 +14,7 @@ * Rani Assaf 980929: resolve addresses * Rani Assaf 980930: do not allow key for ipip/sit * Bernd Eckenfels 990715: add linux/types.h (not clean but solves missing __u16 + * Arnaldo Carvalho de Melo 20010404: use setlocale */ #include @@ -581,6 +582,7 @@ int main(int argc, char **argv) char *basename; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/netstat.c b/netstat.c index 5b3170b..44f978d 100644 --- a/netstat.c +++ b/netstat.c @@ -6,7 +6,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: $Id: netstat.c,v 1.41 2001/04/01 15:04:43 pb Exp $ + * Version: $Id: netstat.c,v 1.42 2001/04/08 17:05:05 pb Exp $ * * Authors: Fred Baumgarten, * Fred N. van Kempen, @@ -57,6 +57,7 @@ * Tuan Hoang added IGMP support for IPv4 and IPv6 * *990420 {1.38} Tuan Hoang removed a useless assignment from igmp_do_one() + *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -121,7 +122,7 @@ typedef enum { #define FEATURE_NETSTAT #include "lib/net-features.h" -char *Release = RELEASE, *Version = "netstat 1.40 (2001-04-01)", *Signature = "Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others"; +char *Release = RELEASE, *Version = "netstat 1.41 (2001-04-08)", *Signature = "Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others"; #define E_READ -1 @@ -1548,6 +1549,7 @@ int main }; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/plipconfig.c b/plipconfig.c index 46b2752..1f972a7 100644 --- a/plipconfig.c +++ b/plipconfig.c @@ -80,6 +80,7 @@ int main(int argc, char **argv) char **spp; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/rarp.c b/rarp.c index 8ad7998..aab05b3 100644 --- a/rarp.c +++ b/rarp.c @@ -3,7 +3,7 @@ * that maintains the kernel's RARP cache. It is derived * from Fred N. van Kempen's arp command. * - * Version: $Id: rarp.c,v 1.5 1999/01/05 20:53:02 philip Exp $ + * Version: $Id: rarp.c,v 1.6 2001/04/08 17:05:05 pb Exp $ * * Usage: rarp -d hostname Delete entry * rarp -s hostname ethernet_address Add entry @@ -13,6 +13,7 @@ * Rewritten: Phil Blundell 1997-08-03 * gettext instead of catgets: Arnaldo Carvalho de Melo 1998-06-29 * 1998-01-01 Bernd Eckenfels reorganised usage() + * 2001-04-04 Arnaldo Carvalho de Melo - use setlocale * */ @@ -42,7 +43,7 @@ static char no_rarp_message[] = N_("This kernel does not support RARP.\n"); -static char version_string[] = RELEASE "\nrarp 1.02 (1998-06-30)\n"; +static char version_string[] = RELEASE "\nrarp 1.03 (2001-04-04)\n"; static struct hwtype *hardware = NULL; @@ -208,6 +209,7 @@ int main(int argc, char **argv) int fd; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif diff --git a/route.c b/route.c index 869fd8d..f64111d 100644 --- a/route.c +++ b/route.c @@ -2,7 +2,7 @@ * route This file contains an implementation of the command * that manages the IP routing table in the kernel. * - * Version: $Id: route.c,v 1.7 2000/12/19 00:26:16 ecki Exp $ + * Version: $Id: route.c,v 1.8 2001/04/08 17:05:05 pb Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -33,6 +33,7 @@ *960823 {x.xx} Frank Strauss: INET6 stuff *980629 {1.95} Arnaldo Carvalho de Melo: gettext instead of catgets *990101 {1.96} Bernd Eckenfels: fixed usage and FLAG_CACHE Output + *20010404 {1.97} Arnaldo Carvalho de Melo: use setlocale * */ #include @@ -65,7 +66,7 @@ #define FEATURE_ROUTE #include "lib/net-features.h" /* needs some of the system includes above! */ -char *Release = RELEASE, *Version = "route 1.96 (1999-01-01)"; +char *Release = RELEASE, *Version = "route 1.97 (2001-04-04)"; int opt_n = 0; /* numerical output flag */ int opt_v = 0; /* debugging output flag */ @@ -123,6 +124,7 @@ int main(int argc, char **argv) char *progname; int options; #if I18N + setlocale (LC_ALL, ""); bindtextdomain("net-tools", "/usr/share/locale"); textdomain("net-tools"); #endif