open-src/app/xhost/xhost.patch
author Jay Cotton <Jay.Cotton@Sun.COM>
Thu, 24 Jan 2008 15:06:03 -0800
changeset 294 2c88146a951a
child 851 d428083dbbdd
permissions -rw-r--r--
6654375 Import the open source version of xhost
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
294
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     1
--- xhost.c	Mon Jul 10 19:53:04 2006
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     2
+++ filemerge.out	Wed Jan 23 14:22:49 2008
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     3
@@ -124,6 +124,11 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     4
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     5
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     6
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     7
+/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     8
+#include <locale.h>	/* setlocale()  */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
     9
+#include <libintl.h>	/* gettext(), textdomain(), etc. */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    10
+#include <stdlib.h>	/* getenv() */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    11
+
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    12
 static int change_host(Display *dpy, char *name, Bool add);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    13
 static char *get_hostname(XHostAddress *ha);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    14
 static int local_xerror(Display *dpy, XErrorEvent *rep);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    15
@@ -193,10 +198,24 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    16
     char *cp;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    17
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    18
  
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    19
+    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    20
+    char *domaindir;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    21
+    setlocale(LC_ALL,"");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    22
+    textdomain("xhost");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    23
+    
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    24
+    /* mainly for debugging */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    25
+    if((domaindir=getenv("TEXTDOMAINDIR")) == NULL) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    26
+	domaindir = "/usr/X11/share/locale"; /*XLOCALEDIR;*/
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    27
+    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    28
+    bindtextdomain("xhost",domaindir);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    29
+
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    30
+
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    31
     ProgramName = argv[0];
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    32
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    33
     if ((dpy = XOpenDisplay(NULL)) == NULL) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    34
-	fprintf(stderr, "%s:  unable to open display \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    35
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    36
+	fprintf(stderr,
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    37
+		gettext("%s:  unable to open display \"%s\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    38
 		ProgramName, XDisplayName (NULL));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    39
 	exit(1);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    40
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    41
@@ -211,9 +230,11 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    42
 	sethostent(1);		/* don't close the data base each time */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    43
 	list = XListHosts(dpy, &nhosts, &enabled);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    44
 	if (enabled)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    45
-	    printf ("access control enabled, only authorized clients can connect\n");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    46
+	    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    47
+	    printf (gettext("access control enabled, only authorized clients can connect\n"));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    48
 	else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    49
-	    printf ("access control disabled, clients can connect from any host\n");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    50
+	    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    51
+	    printf (gettext("access control disabled, clients can connect from any host\n"));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    52
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    53
 	if (nhosts != 0) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    54
 	    for (i = 0; i < nhosts; i++ )  {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    55
@@ -242,16 +263,18 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    56
 			printf("SI:");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    57
 			break;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    58
 		    default:
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    59
-			printf("<unknown family type %d>:", list[i].family);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    60
+			printf(gettext("<unknown family type %d>:"), list[i].family);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    61
 			break;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    62
 		    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    63
 		    printf ("%s", hostname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    64
 		} else {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    65
-		    printf ("<unknown address in family %d>",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    66
+		    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    67
+		    printf (gettext("<unknown address in family %d>"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    68
 			    list[i].family);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    69
 		}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    70
 		if (nameserver_timedout) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    71
-		    printf("\t(no nameserver response within %d seconds)\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    72
+		    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    73
+		    printf(gettext("\t(no nameserver response within %d seconds)\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    74
 			   NAMESERVER_TIMEOUT);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    75
 		    nameserver_timedout = 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    76
 		} else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    77
@@ -264,7 +287,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    78
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    79
  
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    80
     if (argc == 2 && !strcmp(argv[1], "-help")) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    81
-	fprintf(stderr, "usage: %s [[+-]hostname ...]\n", argv[0]);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    82
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    83
+	fprintf(stderr, gettext("usage: %s [[+-]hostname ...]\n"), argv[0]);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    84
 	exit(1);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    85
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    86
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    87
@@ -273,12 +297,14 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    88
 	if (*arg == '-') {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    89
 	    
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    90
 	    if (!argv[i][1] && ((i+1) == argc)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    91
-		printf ("access control enabled, only authorized clients can connect\n");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    92
+		/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    93
+		printf (gettext("access control enabled, only authorized clients can connect\n"));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    94
 		XEnableAccessControl(dpy);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    95
 	    } else {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    96
 		arg = argv[i][1]? &argv[i][1] : argv[++i];
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    97
 		if (!change_host (dpy, arg, False)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    98
-		    fprintf (stderr, "%s:  bad hostname \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
    99
+		    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   100
+		    fprintf (stderr, gettext("%s:  bad hostname \"%s\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   101
 			     ProgramName, arg);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   102
 		    nfailed++;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   103
 		}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   104
@@ -285,7 +311,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   105
 	    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   106
 	} else {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   107
 	    if (*arg == '+' && !argv[i][1] && ((i+1) == argc)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   108
-		printf ("access control disabled, clients can connect from any host\n");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   109
+		/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   110
+		printf (gettext("access control disabled, clients can connect from any host\n"));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   111
 		XDisableAccessControl(dpy);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   112
 	    } else {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   113
 		if (*arg == '+') {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   114
@@ -292,7 +319,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   115
 		    arg = argv[i][1]? &argv[i][1] : argv[++i];
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   116
 		}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   117
 		if (!change_host (dpy, arg, True)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   118
-		    fprintf (stderr, "%s:  bad hostname \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   119
+		    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   120
+		    fprintf (stderr, gettext("%s:  bad hostname \"%s\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   121
 			     ProgramName, arg);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   122
 		    nfailed++;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   123
 		}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   124
@@ -324,6 +352,7 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   125
     krb5_data kbuf;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   126
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   127
 #ifdef NEEDSOCKETS
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   128
+#ifndef AMTCPCONN
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   129
     static struct in_addr addr;	/* so we can point at it */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   130
 #if defined(IPv6) && defined(AF_INET6)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   131
     static struct in6_addr addr6; /* so we can point at it */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   132
@@ -330,7 +359,10 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   133
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   134
     struct hostent *hp;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   135
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   136
+#else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   137
+    static ipaddr_t addr;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   138
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   139
+#endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   140
     char *cp;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   141
 #ifdef DNETCONN
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   142
     struct dn_naddr *dnaddrp;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   143
@@ -337,12 +369,14 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   144
     struct nodeent *np;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   145
     static struct dn_naddr dnaddr;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   146
 #endif				/* DNETCONN */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   147
-    static char *add_msg = "being added to access control list";
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   148
-    static char *remove_msg = "being removed from access control list";
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   149
+    const char *add_msg = gettext("being added to access control list");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   150
+    const char *remove_msg = gettext("being removed from access control list");
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   151
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   152
     namelen = strlen(name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   153
     if ((lname = (char *)malloc(namelen+1)) == NULL) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   154
-	fprintf (stderr, "%s: malloc bombed in change_host\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   155
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   156
+	fprintf (stderr, gettext("%s: malloc bombed in change_host\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   157
+		 ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   158
 	exit (1);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   159
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   160
     for (i = 0; i < namelen; i++) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   161
@@ -350,12 +384,12 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   162
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   163
     lname[namelen] = '\0';
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   164
     if (!strncmp("inet:", lname, 5)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   165
-#if defined(TCPCONN) || defined(STREAMSCONN)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   166
+#if defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   167
 	family = FamilyInternet;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   168
 	name += 5;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   169
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   170
-	fprintf (stderr, "%s: not compiled for TCP/IP\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   171
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   172
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   173
+	fprintf (stderr, gettext("%s: not compiled for TCP/IP\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   174
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   175
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   176
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   177
@@ -365,8 +399,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   178
 	family = FamilyInternet6;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   179
 	name += 6;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   180
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   181
-	fprintf (stderr, "%s: not compiled for IPv6\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   182
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   183
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   184
+	fprintf (stderr, gettext("%s: not compiled for IPv6\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   185
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   186
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   187
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   188
@@ -378,8 +412,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   189
 	family = FamilyInternet6;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   190
 	name += 7;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   191
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   192
-	fprintf (stderr, "%s: not compiled for IPv6\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   193
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   194
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   195
+	fprintf (stderr, gettext("%s: not compiled for IPv6\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   196
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   197
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   198
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   199
@@ -389,8 +423,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   200
 	family = FamilyDECnet;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   201
 	name += 5;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   202
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   203
-	fprintf (stderr, "%s: not compiled for DECnet\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   204
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   205
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   206
+	fprintf (stderr, gettext("%s: not compiled for DECnet\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   207
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   208
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   209
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   210
@@ -399,8 +433,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   211
 	family = FamilyNetname;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   212
 	name += 4;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   213
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   214
-	fprintf (stderr, "%s: not compiled for Secure RPC\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   215
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   216
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   217
+	fprintf (stderr, gettext("%s: not compiled for Secure RPC\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   218
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   219
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   220
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   221
@@ -409,8 +443,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   222
 	family = FamilyKrb5Principal;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   223
 	name +=4;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   224
 #else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   225
-	fprintf (stderr, "%s: not compiled for Kerberos 5\n", ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   226
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   227
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   228
+	fprintf (stderr, gettext("%s: not compiled for Kerberos 5\n"), ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   229
 	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   230
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   231
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   232
@@ -422,11 +456,21 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   233
 	name += 3;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   234
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   235
     if (family == FamilyWild && (cp = strchr(lname, ':'))) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   236
-	*cp = '\0';
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   237
-	fprintf (stderr, "%s: unknown address family \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   238
-		 ProgramName, lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   239
-	free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   240
-	return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   241
+#ifdef IPv6
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   242
+	/*
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   243
+	 * Check to see if inet_pton() can grok it as an IPv6 address
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   244
+	 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   245
+	if (inet_pton(AF_INET6, lname, &addr6.s6_addr) == 1) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   246
+	    family = FamilyInternet6;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   247
+	} else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   248
+#endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   249
+	{
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   250
+	    *cp = '\0';
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   251
+	    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   252
+	    fprintf (stderr, gettext("%s: unknown address family \"%s\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   253
+		     ProgramName, lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   254
+	    return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   255
+	}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   256
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   257
     free(lname);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   258
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   259
@@ -436,8 +480,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   260
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   261
 	cp = strchr(name, ':');
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   262
 	if (cp == NULL || cp == name) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   263
-	    fprintf(stderr, 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   264
-	   "%s: type must be specified for server interpreted family \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   265
+	    fprintf(stderr, gettext(
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   266
+	  "%s: type must be specified for server interpreted family \"%s\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   267
 	      ProgramName, name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   268
 	    return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   269
 	}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   270
@@ -471,7 +515,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   271
 	    dnaddr = *dnaddrp;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   272
 	} else {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   273
 	    if ((np = getnodebyname (name)) == NULL) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   274
-		fprintf (stderr, "%s:  unable to get node name for \"%s::\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   275
+		/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   276
+		fprintf (stderr, gettext("%s:  unable to get node name for \"%s::\"\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   277
 			 ProgramName, name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   278
 		return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   279
 	    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   280
@@ -497,7 +542,8 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   281
 	retval = krb5_parse_name(name, &princ);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   282
 	if (retval) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   283
 	    krb5_init_ets();	/* init krb errs for error_message() */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   284
-	    fprintf(stderr, "%s: cannot parse Kerberos name: %s\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   285
+	    /* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   286
+	    fprintf(stderr, gettext("%s: cannot parse Kerberos name: %s\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   287
 		    ProgramName, error_message(retval));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   288
 	    return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   289
 	}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   290
@@ -523,7 +569,7 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   291
 	    XAddHost(dpy, &ha);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   292
 	else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   293
 	    XRemoveHost(dpy, &ha);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   294
-	printf( "non-network local connections %s\n", add ? add_msg : remove_msg);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   295
+	printf( gettext("non-network local connections %s\n"), add ? add_msg : remove_msg);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   296
 	return 1;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   297
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   298
     /*
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   299
@@ -542,12 +588,14 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   300
 	    *cp = '\0';
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   301
 	    pwd = getpwnam(name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   302
 	    if (!pwd) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   303
-		fprintf(stderr, "no such user \"%s\"\n", name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   304
+		/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   305
+		fprintf(stderr, gettext("no such user \"%s\"\n"), name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   306
 		return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   307
 	    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   308
 	    getdomainname(domainname, sizeof(domainname));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   309
 	    if (!user2netname(username, pwd->pw_uid, domainname)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   310
-		fprintf(stderr, "failed to get netname for \"%s\"\n", name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   311
+		/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   312
+		fprintf(stderr, gettext("failed to get netname for \"%s\"\n"), name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   313
 		return 0;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   314
 	    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   315
 	    netname = username;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   316
@@ -570,8 +618,13 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   317
     /*
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   318
      * First see if inet_addr() can grok the name; if so, then use it.
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   319
      */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   320
+#ifndef AMTCPCONN
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   321
     if (((family == FamilyWild) || (family == FamilyInternet)) &&
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   322
 	((addr.s_addr = inet_addr(name)) != -1)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   323
+#else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   324
+    if (((family == FamilyWild) || (family == FamilyInternet)) &&
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   325
+	((addr = inet_addr(name)) != -1)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   326
+#endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   327
 	ha.family = FamilyInternet;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   328
 	ha.length = 4;		/* but for Cray would be sizeof(addr.s_addr) */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   329
 	ha.address = (char *)&addr; /* but for Cray would be &addr.s_addr */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   330
@@ -654,8 +707,11 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   331
 		familyMsg = "inet ";
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   332
 	    }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   333
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   334
-	    fprintf(stderr, "%s: unable to get %saddress for \"%s\"\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   335
-		ProgramName, familyMsg, name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   336
+	    /* L10N_Comments - Parts composed to make full error string
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   337
+	       'unable to get' ['inet'|'inetv6'|''] 'address for' <address> */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   338
+	    fprintf (stderr, "%s:  %s %s%s \"%s\"\n", ProgramName, 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   339
+	      gettext("unable to get"), familyMsg, gettext("address for"), 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   340
+	      name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   341
 	}
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   342
 	freeaddrinfo(addresses);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   343
 	return 1;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   344
@@ -715,7 +771,7 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   345
 static char *
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   346
 get_hostname(XHostAddress *ha)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   347
 {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   348
-#if (defined(TCPCONN) || defined(STREAMSCONN)) &&	\
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   349
+#if (defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN)) && \
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   350
      (!defined(IPv6) || !defined(AF_INET6))
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   351
     static struct hostent *hp = NULL;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   352
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   353
@@ -733,7 +789,7 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   354
     struct sigaction sa;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   355
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   356
 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   357
-#if defined(TCPCONN) || defined(STREAMSCONN)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   358
+#if defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   359
 #if defined(IPv6) && defined(AF_INET6)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   360
     if ((ha->family == FamilyInternet) || (ha->family == FamilyInternet6)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   361
 	struct sockaddr_storage saddr;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   362
@@ -823,7 +879,11 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   363
 	alarm(0);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   364
 	if (hp)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   365
 	    return (hp->h_name);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   366
+#ifndef AMTCPCONN
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   367
 	else return (inet_ntoa(*((struct in_addr *)(ha->address))));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   368
+#else
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   369
+	else return (inet_ntoa(*((ipaddr_t *)(ha->address))));
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   370
+#endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   371
     }
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   372
 #endif /* IPv6 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   373
 #endif
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   374
@@ -933,14 +993,16 @@
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   375
 local_xerror(Display *dpy, XErrorEvent *rep)
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   376
 {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   377
     if ((rep->error_code == BadAccess) && (rep->request_code == X_ChangeHosts)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   378
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   379
 	fprintf (stderr, 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   380
-		 "%s:  must be on local machine to add or remove hosts.\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   381
+		 gettext("%s:  must be on local machine to add or remove hosts.\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   382
 		 ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   383
 	return 1;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   384
     } else if ((rep->error_code == BadAccess) && 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   385
 	       (rep->request_code == X_SetAccessControl)) {
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   386
+	/* Internationalize messages for bug 4256527... S Swales 5/25/00 */
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   387
 	fprintf (stderr, 
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   388
-	"%s:  must be on local machine to enable or disable access control.\n",
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   389
+		 gettext("%s:  must be on local machine to enable or disable access control.\n"),
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   390
 		 ProgramName);
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   391
 	return 1;
2c88146a951a 6654375 Import the open source version of xhost
Jay Cotton <Jay.Cotton@Sun.COM>
parents:
diff changeset
   392
     } else if ((rep->error_code == BadValue) &&