summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>1999-04-23 08:32:37 +0000
committerPhil Blundell <philb@gnu.org>1999-04-23 08:32:37 +0000
commit5ac09944c4a7c8fe396908d7b5dfe7dfe56bfa71 (patch)
treec4fba5a243a3ae6e2129dffecd869a76206e000c
parent704788c77be32c24d5a9a64a5583da244d58730c (diff)
downloadnet-tools-5ac09944c4a7c8fe396908d7b5dfe7dfe56bfa71.tar.gz
net-tools-5ac09944c4a7c8fe396908d7b5dfe7dfe56bfa71.tar.bz2
net-tools-5ac09944c4a7c8fe396908d7b5dfe7dfe56bfa71.zip
More i18n, from Meelis Roos
-rw-r--r--ipmaddr.c6
-rw-r--r--iptunnel.c6
-rw-r--r--lib/Makefile3
-rw-r--r--lib/net-support.h2
-rw-r--r--plipconfig.c7
5 files changed, 20 insertions, 4 deletions
diff --git a/ipmaddr.c b/ipmaddr.c
index 5f5c962..3ca668e 100644
--- a/ipmaddr.c
+++ b/ipmaddr.c
@@ -25,6 +25,7 @@
#include <arpa/inet.h>
#include <string.h>
+#include "config.h"
#include "intl.h"
#include "util-ank.h"
#include "net-support.h"
@@ -384,6 +385,11 @@ int main(int argc, char **argv)
{
char *basename;
+#if I18N
+ bindtextdomain("net-tools", "/usr/share/locale");
+ textdomain("net-tools");
+#endif
+
basename = strrchr(argv[0], '/');
if (basename == NULL)
basename = argv[0];
diff --git a/iptunnel.c b/iptunnel.c
index 26bb0cc..d9c282b 100644
--- a/iptunnel.c
+++ b/iptunnel.c
@@ -30,6 +30,7 @@
#include <arpa/inet.h>
#include <linux/if_tunnel.h>
+#include "config.h"
#include "intl.h"
#include "net-support.h"
#include "version.h"
@@ -571,6 +572,11 @@ int main(int argc, char **argv)
{
char *basename;
+#if I18N
+ bindtextdomain("net-tools", "/usr/share/locale");
+ textdomain("net-tools");
+#endif
+
basename = strrchr(argv[0], '/');
if (basename == NULL)
basename = argv[0];
diff --git a/lib/Makefile b/lib/Makefile
index c49d3b9..0a90610 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -45,9 +45,8 @@ lib$(NET_LIB_NAME).a: Makefile $(TOPDIR)/config.h $(OBJS)
$(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(SONAME) -nostdlib -nostartfiles $<
clean:
- rm -f *.o *~ *.orig
+ rm -f *.o *~ *.orig lib$(NET_LIB_NAME).a lib$(NET_LIB_NAME).so
clobber: clean
- rm -f *.a *.so
# End of lib/Makefile.
diff --git a/lib/net-support.h b/lib/net-support.h
index 6109de0..50ab96e 100644
--- a/lib/net-support.h
+++ b/lib/net-support.h
@@ -145,7 +145,7 @@ extern char afname[];
#define AFTRANS_CNT 10
#define EINTERN(file, text) fprintf(stderr, \
- "%s: Internal Error `%s'.\n",file,text);
+ _("%s: Internal Error `%s'.\n"),file,text);
#define ENOSUPP(A,B) fprintf(stderr,\
_("%s: feature `%s' not supported.\n" \
diff --git a/plipconfig.c b/plipconfig.c
index e35e4b1..46b2752 100644
--- a/plipconfig.c
+++ b/plipconfig.c
@@ -37,9 +37,9 @@
#include <sys/ioctl.h>
#include <net/if.h>
#include <linux/if_plip.h>
+
#include "config.h"
#include "intl.h"
-
#include "net-support.h"
#include "version.h"
@@ -79,6 +79,11 @@ int main(int argc, char **argv)
int ret = 0;
char **spp;
+#if I18N
+ bindtextdomain("net-tools", "/usr/share/locale");
+ textdomain("net-tools");
+#endif
+
if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
perror("socket");
exit(-1);