Commit 4b2cb283 authored by Phil Blundell's avatar Phil Blundell

Make i18n default to off (and fix typo in config.in)

Cosmetic changes to ifconfig.  Fix lots of stuff to
compile properly with glibc2.1.
Fix HIPPI and HDLC/LAPB for new i18n code.
parent 97914470
......@@ -43,9 +43,9 @@
* on GNU gettext, only a brazilian portuguese catalog (translation)
* is present, but others are *highly* welcome!
*
* (answer 'n' if you haye no system with GNU gettext support)
* (answer 'n' if you have no system with GNU gettext support)
*
bool 'Does your system support GNU gettext?' I18N y
bool 'Does your system support GNU gettext?' I18N n
*
*
* Protocol Families.
......
......@@ -87,8 +87,12 @@ static const char *if_port_text[][4] = {
#endif
#if HAVE_AFIPX
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h"
#endif
#endif
#include "net-support.h"
#include "pathnames.h"
#include "version.h"
......@@ -97,7 +101,7 @@ static const char *if_port_text[][4] = {
#include "sockets.h"
char *Release = RELEASE,
*Version = "ifconfig 1.34 (1998-06-30)";
*Version = "ifconfig 1.35 (1998-08-29)";
int opt_a = 0; /* show all interfaces */
int opt_i = 0; /* show the statistics */
......@@ -258,12 +262,6 @@ ife_print(struct interface *ptr)
if (ptr->flags & IFF_MULTICAST) printf(_("MULTICAST "));
printf(_(" MTU:%d Metric:%d\n"),
ptr->mtu, ptr->metric?ptr->metric:1);
if (ptr->tx_queue_len != -1)
printf(_(" txqueuelen:%d\n"), ptr->tx_queue_len);
#if 0
else
printf(_(" txqueuelen not available\n"));
#endif
/* If needed, display the interface statistics. */
printf(" ");
......@@ -281,9 +279,11 @@ ife_print(struct interface *ptr)
ptr->stats.tx_packets, ptr->stats.tx_errors,
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
ptr->stats.tx_carrier_errors);
printf(_(" Collisions:%lu "), ptr->stats.collisions);
printf(_(" collisions:%lu "), ptr->stats.collisions);
if (can_compress)
printf(_("compressed:%lu "), ptr->stats.tx_compressed);
if (ptr->tx_queue_len != -1)
printf(_("txqueuelen:%d "), ptr->tx_queue_len);
printf("\n");
if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
......
......@@ -16,8 +16,12 @@
#include <ctype.h>
#if HAVE_AFIPX
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h"
#endif
#endif
#if HAVE_AFECONET
#include <linux/if_ec.h>
......
......@@ -24,7 +24,11 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netax25/ax25.h>
#else
#include <linux/ax25.h>
#endif
#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
......
......@@ -35,9 +35,6 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
struct hwtype hdlc_hwtype = {
"hdlc", NULL, /*"(Cisco) HDLC",*/ ARPHRD_HDLC, 0,
......
......@@ -25,7 +25,6 @@
#error "No HIPPI Support in your current Kernelsource Tree."
#error "Disable HW Type HIPPI"
#endif
#include <linux/if_hippi.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
......@@ -34,9 +33,13 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/*
* HIPPI magic constants.
*/
#define HIPPI_ALEN 6 /* Bytes in one HIPPI hw-addr */
extern struct hwtype hippi_hwtype;
......@@ -62,7 +65,7 @@ pr_shippi(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, hippiSet, hippi_none, "[NONE SET]", buf, 64));
return(strncpy(buf, _("[NONE SET]"), 64));
return(pr_hippi(sap->sa_data));
}
......@@ -88,8 +91,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug1,
"in_hippi(%s): invalid hippi address!\n"), orig);
fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -101,8 +103,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug2,
"in_hippi(%s): invalid hippi address!\n"), orig);
fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -114,9 +115,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
if (*bufp == ':') {
if (i == HIPPI_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug3,
"in_hippi(%s): trailing : ignored!\n"),
orig)
fprintf(stderr, _("in_hippi(%s): trailing : ignored!\n"), orig)
#endif
; /* nothing */
}
......@@ -127,7 +126,7 @@ in_hippi(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */
if ((i == HIPPI_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, hippiSet, hippi_debug4, "in_hippi(%s): trailing junk!\n"), orig);
fprintf(stderr, _("in_hippi(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
......
......@@ -19,7 +19,11 @@
#include <asm/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
......
......@@ -11,7 +11,11 @@
#include <asm/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netipx/ipx.h>
#else
#include "ipx.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
......
......@@ -30,7 +30,11 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
#include <netax25/ax25.h>
#else
#include <linux/ax25.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment