More i18n, from Meelis Roos
authorPhil Blundell <philb@gnu.org>
Fri, 23 Apr 1999 08:32:37 +0000 (08:32 +0000)
committerPhil Blundell <philb@gnu.org>
Fri, 23 Apr 1999 08:32:37 +0000 (08:32 +0000)
ipmaddr.c
iptunnel.c
lib/Makefile
lib/net-support.h
plipconfig.c

index 5f5c962..3ca668e 100644 (file)
--- 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];
index 26bb0cc..d9c282b 100644 (file)
@@ -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];
index c49d3b9..0a90610 100644 (file)
@@ -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.
index 6109de0..50ab96e 100644 (file)
@@ -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" \
index e35e4b1..46b2752 100644 (file)
@@ -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);