1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Sat Nov 25 02:48:47 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>

* assert/assert-perr.c, assert/assert.c, inet/rcmd.c,
	malloc/mcheck.c, malloc/vm-limit.c, posix/getconf.c, posix/id.c,
	resolv/herror.c, sunrpc/auth_unix.c, sunrpc/clnt_perr.c,
	sunrpc/clnt_raw.c, sunrpc/get_myaddr.c, sunrpc/pmap_clnt.c,
	sunrpc/pmap_rmt.c, sunrpc/portmap.c, sunrpc/rpc_main.c,
	sunrpc/rpc_parse.c, sunrpc/rpc_scan.c, sunrpc/rpc_util.c,
	sunrpc/rpcinfo.c, sunrpc/svc_simple.c, sunrpc/svc_tcp.c,
	sunrpc/svc_udp.c, time/zdump.c, time/zic.c: Mark translatable
	strings.
Sat Nov 25 02:48:47 1995  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* assert/assert-perr.c, assert/assert.c, inet/rcmd.c,
	malloc/mcheck.c, malloc/vm-limit.c, posix/getconf.c, posix/id.c,
	resolv/herror.c, sunrpc/auth_unix.c, sunrpc/clnt_perr.c,
	sunrpc/clnt_raw.c, sunrpc/get_myaddr.c, sunrpc/pmap_clnt.c,
	sunrpc/pmap_rmt.c, sunrpc/portmap.c, sunrpc/rpc_main.c,
	sunrpc/rpc_parse.c, sunrpc/rpc_scan.c, sunrpc/rpc_util.c,
	sunrpc/rpcinfo.c, sunrpc/svc_simple.c, sunrpc/svc_tcp.c,
	sunrpc/svc_udp.c, time/zdump.c, time/zic.c: Mark translatable
	strings.
This commit is contained in:
Roland McGrath
1995-11-26 17:37:11 +00:00
parent fbaad1494f
commit cbd3dceb39
24 changed files with 412 additions and 397 deletions

View File

@ -1,3 +1,15 @@
Sat Nov 25 02:48:47 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* assert/assert-perr.c, assert/assert.c, inet/rcmd.c,
malloc/mcheck.c, malloc/vm-limit.c, posix/getconf.c, posix/id.c,
resolv/herror.c, sunrpc/auth_unix.c, sunrpc/clnt_perr.c,
sunrpc/clnt_raw.c, sunrpc/get_myaddr.c, sunrpc/pmap_clnt.c,
sunrpc/pmap_rmt.c, sunrpc/portmap.c, sunrpc/rpc_main.c,
sunrpc/rpc_parse.c, sunrpc/rpc_scan.c, sunrpc/rpc_util.c,
sunrpc/rpcinfo.c, sunrpc/svc_simple.c, sunrpc/svc_tcp.c,
sunrpc/svc_udp.c, time/zdump.c, time/zic.c: Mark translatable
strings.
Sun Nov 26 02:00:02 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu> Sun Nov 26 02:00:02 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio. * misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio.

View File

@ -43,7 +43,7 @@ __assert_perror_fail (int errnum,
#endif #endif
/* Print the message. */ /* Print the message. */
(void) fprintf (stderr, "%s%s%s:%u: %s%sUnexpected error: %s.\n", (void) fprintf (stderr, _("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
__assert_program_name ? __assert_program_name : "", __assert_program_name ? __assert_program_name : "",
__assert_program_name ? ": " : "", __assert_program_name ? ": " : "",
file, line, file, line,

View File

@ -38,14 +38,14 @@ CONST char *__assert_program_name;
void void
DEFUN(__assert_fail, (assertion, file, line, function), DEFUN(__assert_fail, (assertion, file, line, function),
CONST char *assertion AND CONST char *assertion AND
CONST char *file AND unsigned int line AND CONST char *function) CONST char *file AND unsigned int line AND CONST char *function)
{ {
#ifdef FATAL_PREPARE #ifdef FATAL_PREPARE
FATAL_PREPARE; FATAL_PREPARE;
#endif #endif
/* Print the message. */ /* Print the message. */
(void) fprintf (stderr, "%s%s%s:%u: %s%sAssertion `%s' failed.\n", (void) fprintf (stderr, _("%s%s%s:%u: %s%sAssertion `%s' failed.\n"),
__assert_program_name ? __assert_program_name : "", __assert_program_name ? __assert_program_name : "",
__assert_program_name ? ": " : "", __assert_program_name ? ": " : "",
file, line, file, line,

View File

@ -83,7 +83,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
if (s < 0) { if (s < 0) {
if (errno == EAGAIN) if (errno == EAGAIN)
(void)fprintf(stderr, (void)fprintf(stderr,
"rcmd: socket: All ports in use\n"); _("rcmd: socket: All ports in use\n"));
else else
(void)fprintf(stderr, "rcmd: socket: %s\n", (void)fprintf(stderr, "rcmd: socket: %s\n",
strerror(errno)); strerror(errno));
@ -109,13 +109,13 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
if (hp->h_addr_list[1] != NULL) { if (hp->h_addr_list[1] != NULL) {
int oerrno = errno; int oerrno = errno;
(void)fprintf(stderr, "connect to address %s: ", (void)fprintf(stderr, _("connect to address %s: "),
inet_ntoa(sin.sin_addr)); inet_ntoa(sin.sin_addr));
errno = oerrno; errno = oerrno;
perror(0); perror(0);
hp->h_addr_list++; hp->h_addr_list++;
bcopy(hp->h_addr_list[0], &sin.sin_addr, hp->h_length); bcopy(hp->h_addr_list[0], &sin.sin_addr, hp->h_length);
(void)fprintf(stderr, "Trying %s...\n", (void)fprintf(stderr, _("Trying %s...\n"),
inet_ntoa(sin.sin_addr)); inet_ntoa(sin.sin_addr));
continue; continue;
} }
@ -138,7 +138,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
(void)snprintf(num, sizeof(num), "%d", lport); (void)snprintf(num, sizeof(num), "%d", lport);
if (write(s, num, strlen(num)+1) != strlen(num)+1) { if (write(s, num, strlen(num)+1) != strlen(num)+1) {
(void)fprintf(stderr, (void)fprintf(stderr,
"rcmd: write (setting up stderr): %s\n", _("rcmd: write (setting up stderr): %s\n"),
strerror(errno)); strerror(errno));
(void)close(s2); (void)close(s2);
goto bad; goto bad;
@ -151,11 +151,11 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
!FD_ISSET(s2, &reads)) { !FD_ISSET(s2, &reads)) {
if (errno != 0) if (errno != 0)
(void)fprintf(stderr, (void)fprintf(stderr,
"rcmd: select (setting up stderr): %s\n", _("rcmd: select (setting up stderr): %s\n"),
strerror(errno)); strerror(errno));
else else
(void)fprintf(stderr, (void)fprintf(stderr,
"select: protocol failure in circuit setup\n"); _("select: protocol failure in circuit setup\n"));
(void)close(s2); (void)close(s2);
goto bad; goto bad;
} }
@ -173,7 +173,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
from.sin_port >= IPPORT_RESERVED || from.sin_port >= IPPORT_RESERVED ||
from.sin_port < IPPORT_RESERVED / 2) { from.sin_port < IPPORT_RESERVED / 2) {
(void)fprintf(stderr, (void)fprintf(stderr,
"socket: protocol failure in circuit setup.\n"); _("socket: protocol failure in circuit setup.\n"));
goto bad2; goto bad2;
} }
} }
@ -318,15 +318,15 @@ again:
*/ */
cp = NULL; cp = NULL;
if (lstat(pbuf, &sbuf) < 0) if (lstat(pbuf, &sbuf) < 0)
cp = ".rhosts lstat failed"; cp = _(".rhosts lstat failed");
else if (!S_ISREG(sbuf.st_mode)) else if (!S_ISREG(sbuf.st_mode))
cp = ".rhosts not regular file"; cp = _(".rhosts not regular file");
else if (fstat(fileno(hostf), &sbuf) < 0) else if (fstat(fileno(hostf), &sbuf) < 0)
cp = ".rhosts fstat failed"; cp = _(".rhosts fstat failed");
else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid) else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
cp = "bad .rhosts owner"; cp = _("bad .rhosts owner");
else if (sbuf.st_mode & (S_IWGRP|S_IWOTH)) else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
cp = ".rhosts writeable by other than owner"; cp = _(".rhosts writeable by other than owner");
/* If there were any problems, quit. */ /* If there were any problems, quit. */
if (cp) { if (cp) {
__rcmd_errstr = cp; __rcmd_errstr = cp;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. /* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -61,7 +61,7 @@ static CONST char *program;
static void static void
DEFUN_VOID(usage) DEFUN_VOID(usage)
{ {
fprintf (stderr, "Usage: %s variable_name [pathname]\n", program); fprintf (stderr, _("Usage: %s variable_name [pathname]\n"), program);
exit (2); exit (2);
} }
@ -129,6 +129,6 @@ DEFUN(main, (argc, argv), int argc AND char **argv)
} }
} }
fprintf (stderr, "%s: Unrecognized variable `%s'\n", program, argv[1]); fprintf (stderr, _("%s: Unrecognized variable `%s'\n"), program, argv[1]);
exit (2); exit (2);
} }

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991 Free Software Foundation, Inc. /* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -37,7 +37,7 @@ DEFUN(print_grpname, (id, parens),
return; return;
else else
{ {
fprintf(stderr, "Couldn't find name for group %d\n", id); fprintf(stderr, _("Couldn't find name for group %d\n"), id);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
@ -59,7 +59,7 @@ DEFUN(print_pwdname, (id, parens),
return; return;
else else
{ {
fprintf(stderr, "Couldn't find name for user %d\n", (int) id); fprintf(stderr, _("Couldn't find name for user %d\n"), (int) id);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
@ -109,7 +109,7 @@ DEFUN(main, (argc, argv), int argc AND char **argv)
if (error || argc != optind) if (error || argc != optind)
{ {
fputs("Usage: id [-gurn]\n", stderr); fputs(_("Usage: id [-gurn]\n"), stderr);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }

View File

@ -3,7 +3,7 @@
* - * -
* Copyright (c) 1987, 1993 * Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
@ -19,7 +19,7 @@
* 4. Neither the name of the University nor the names of its contributors * 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -33,14 +33,14 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* - * -
* Portions Copyright (c) 1993 by Digital Equipment Corporation. * Portions Copyright (c) 1993 by Digital Equipment Corporation.
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that * copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or * the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without * publicity pertaining to distribution of the document or software without
* specific, written prior permission. * specific, written prior permission.
* *
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -69,11 +69,11 @@ static char rcsid[] = "$Id$";
#endif #endif
const char *h_errlist[] = { const char *h_errlist[] = {
"Resolver Error 0 (no error)", N_("Resolver Error 0 (no error)"),
"Unknown host", /* 1 HOST_NOT_FOUND */ N_("Unknown host"), /* 1 HOST_NOT_FOUND */
"Host name lookup failure", /* 2 TRY_AGAIN */ N_("Host name lookup failure"), /* 2 TRY_AGAIN */
"Unknown server error", /* 3 NO_RECOVERY */ N_("Unknown server error"), /* 3 NO_RECOVERY */
"No address associated with name", /* 4 NO_ADDRESS */ N_("No address associated with name"), /* 4 NO_ADDRESS */
}; };
int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] }; int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
@ -111,8 +111,8 @@ hstrerror(err)
int err; int err;
{ {
if (err < 0) if (err < 0)
return ("Resolver internal error"); return _("Resolver internal error");
else if (err < h_nerr) else if (err < h_nerr)
return (h_errlist[err]); return _(h_errlist[err]);
return ("Unknown resolver error"); return _("Unknown resolver error");
} }

View File

@ -6,11 +6,11 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
@ -18,11 +18,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,8 +32,8 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
#endif #endif
/* /*
* auth_unix.c, Implements UNIX style authentication parameters. * auth_unix.c, Implements UNIX style authentication parameters.
* *
* Copyright (C) 1984, Sun Microsystems, Inc. * Copyright (C) 1984, Sun Microsystems, Inc.
* *
* The system is very weak. The client uses no encryption for it's * The system is very weak. The client uses no encryption for it's
@ -138,7 +138,7 @@ authunix_create(machname, uid, gid, len, aup_gids)
* Serialize the parameters into origcred * Serialize the parameters into origcred
*/ */
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
if (! xdr_authunix_parms(&xdrs, &aup)) if (! xdr_authunix_parms(&xdrs, &aup))
abort(); abort();
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs); au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX; au->au_origcred.oa_flavor = AUTH_UNIX;
@ -256,7 +256,7 @@ authunix_refresh(auth)
xdrmem_create(&xdrs, au->au_origcred.oa_base, xdrmem_create(&xdrs, au->au_origcred.oa_base,
au->au_origcred.oa_length, XDR_DECODE); au->au_origcred.oa_length, XDR_DECODE);
stat = xdr_authunix_parms(&xdrs, &aup); stat = xdr_authunix_parms(&xdrs, &aup);
if (! stat) if (! stat)
goto done; goto done;
/* update the time and serialize in place */ /* update the time and serialize in place */
@ -311,7 +311,7 @@ marshal_new_auth(auth)
xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) || if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
(! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) { (! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {
perror("auth_none.c - Fatal marshalling problem"); perror(_("auth_none.c - Fatal marshalling problem"));
} else { } else {
au->au_mpos = XDR_GETPOS(xdrs); au->au_mpos = XDR_GETPOS(xdrs);
} }

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -78,17 +78,17 @@ clnt_sperror(rpch, s)
return (0); return (0);
CLNT_GETERR(rpch, &e); CLNT_GETERR(rpch, &e);
(void) sprintf(str, "%s: ", s); (void) sprintf(str, "%s: ", s);
str += strlen(str); str += strlen(str);
(void) strcpy(str, clnt_sperrno(e.re_status)); (void) strcpy(str, clnt_sperrno(e.re_status));
str += strlen(str); str += strlen(str);
switch (e.re_status) { switch (e.re_status) {
case RPC_SUCCESS: case RPC_SUCCESS:
case RPC_CANTENCODEARGS: case RPC_CANTENCODEARGS:
case RPC_CANTDECODERES: case RPC_CANTDECODERES:
case RPC_TIMEDOUT: case RPC_TIMEDOUT:
case RPC_PROGUNAVAIL: case RPC_PROGUNAVAIL:
case RPC_PROCUNAVAIL: case RPC_PROCUNAVAIL:
case RPC_CANTDECODEARGS: case RPC_CANTDECODEARGS:
@ -103,41 +103,41 @@ clnt_sperror(rpch, s)
case RPC_CANTSEND: case RPC_CANTSEND:
case RPC_CANTRECV: case RPC_CANTRECV:
(void) sprintf(str, "; errno = %s", (void) sprintf(str, "; errno = %s",
sys_errlist[e.re_errno]); sys_errlist[e.re_errno]);
str += strlen(str); str += strlen(str);
break; break;
case RPC_VERSMISMATCH: case RPC_VERSMISMATCH:
(void) sprintf(str, (void) sprintf(str,
"; low version = %lu, high version = %lu", _("; low version = %lu, high version = %lu"),
e.re_vers.low, e.re_vers.high); e.re_vers.low, e.re_vers.high);
str += strlen(str); str += strlen(str);
break; break;
case RPC_AUTHERROR: case RPC_AUTHERROR:
err = auth_errmsg(e.re_why); err = auth_errmsg(e.re_why);
(void) sprintf(str,"; why = "); (void) sprintf(str,_("; why = "));
str += strlen(str); str += strlen(str);
if (err != NULL) { if (err != NULL) {
(void) sprintf(str, "%s",err); (void) sprintf(str, "%s",err);
} else { } else {
(void) sprintf(str, (void) sprintf(str,
"(unknown authentication error - %d)", _("(unknown authentication error - %d)"),
(int) e.re_why); (int) e.re_why);
} }
str += strlen(str); str += strlen(str);
break; break;
case RPC_PROGVERSMISMATCH: case RPC_PROGVERSMISMATCH:
(void) sprintf(str, (void) sprintf(str,
"; low version = %lu, high version = %lu", _("; low version = %lu, high version = %lu"),
e.re_vers.low, e.re_vers.high); e.re_vers.low, e.re_vers.high);
str += strlen(str); str += strlen(str);
break; break;
default: /* unknown */ default: /* unknown */
(void) sprintf(str, (void) sprintf(str,
"; s1 = %lu, s2 = %lu", "; s1 = %lu, s2 = %lu",
e.re_lb.s1, e.re_lb.s2); e.re_lb.s1, e.re_lb.s2);
str += strlen(str); str += strlen(str);
break; break;
@ -161,42 +161,42 @@ struct rpc_errtab {
}; };
static struct rpc_errtab rpc_errlist[] = { static struct rpc_errtab rpc_errlist[] = {
{ RPC_SUCCESS, { RPC_SUCCESS,
"RPC: Success" }, N_("RPC: Success") },
{ RPC_CANTENCODEARGS, { RPC_CANTENCODEARGS,
"RPC: Can't encode arguments" }, N_("RPC: Can't encode arguments") },
{ RPC_CANTDECODERES, { RPC_CANTDECODERES,
"RPC: Can't decode result" }, N_("RPC: Can't decode result") },
{ RPC_CANTSEND, { RPC_CANTSEND,
"RPC: Unable to send" }, N_("RPC: Unable to send") },
{ RPC_CANTRECV, { RPC_CANTRECV,
"RPC: Unable to receive" }, N_("RPC: Unable to receive") },
{ RPC_TIMEDOUT, { RPC_TIMEDOUT,
"RPC: Timed out" }, N_("RPC: Timed out") },
{ RPC_VERSMISMATCH, { RPC_VERSMISMATCH,
"RPC: Incompatible versions of RPC" }, N_("RPC: Incompatible versions of RPC") },
{ RPC_AUTHERROR, { RPC_AUTHERROR,
"RPC: Authentication error" }, N_("RPC: Authentication error") },
{ RPC_PROGUNAVAIL, { RPC_PROGUNAVAIL,
"RPC: Program unavailable" }, N_("RPC: Program unavailable") },
{ RPC_PROGVERSMISMATCH, { RPC_PROGVERSMISMATCH,
"RPC: Program/version mismatch" }, N_("RPC: Program/version mismatch") },
{ RPC_PROCUNAVAIL, { RPC_PROCUNAVAIL,
"RPC: Procedure unavailable" }, N_("RPC: Procedure unavailable") },
{ RPC_CANTDECODEARGS, { RPC_CANTDECODEARGS,
"RPC: Server can't decode arguments" }, N_("RPC: Server can't decode arguments") },
{ RPC_SYSTEMERROR, { RPC_SYSTEMERROR,
"RPC: Remote system error" }, N_("RPC: Remote system error") },
{ RPC_UNKNOWNHOST, { RPC_UNKNOWNHOST,
"RPC: Unknown host" }, N_("RPC: Unknown host") },
{ RPC_UNKNOWNPROTO, { RPC_UNKNOWNPROTO,
"RPC: Unknown protocol" }, N_("RPC: Unknown protocol") },
{ RPC_PMAPFAILURE, { RPC_PMAPFAILURE,
"RPC: Port mapper failure" }, N_("RPC: Port mapper failure") },
{ RPC_PROGNOTREGISTERED, { RPC_PROGNOTREGISTERED,
"RPC: Program not registered"}, N_("RPC: Program not registered") },
{ RPC_FAILED, { RPC_FAILED,
"RPC: Failed (unspecified error)"} N_("RPC: Failed (unspecified error)") }
}; };
@ -211,10 +211,10 @@ clnt_sperrno(stat)
for (i = 0; i < sizeof(rpc_errlist)/sizeof(struct rpc_errtab); i++) { for (i = 0; i < sizeof(rpc_errlist)/sizeof(struct rpc_errtab); i++) {
if (rpc_errlist[i].status == stat) { if (rpc_errlist[i].status == stat) {
return (rpc_errlist[i].message); return _(rpc_errlist[i].message);
} }
} }
return ("RPC: (unknown error code)"); return _("RPC: (unknown error code)");
} }
void void
@ -251,7 +251,7 @@ clnt_spcreateerror(s)
(void) strcat(str, (void) strcat(str,
sys_errlist[rpc_createerr.cf_error.re_errno]); sys_errlist[rpc_createerr.cf_error.re_errno]);
else else
(void) sprintf(&str[strlen(str)], "Error %d", (void) sprintf(&str[strlen(str)], _("Error %d"),
rpc_createerr.cf_error.re_errno); rpc_createerr.cf_error.re_errno);
break; break;
} }
@ -267,27 +267,27 @@ clnt_pcreateerror(s)
} }
struct auth_errtab { struct auth_errtab {
enum auth_stat status; enum auth_stat status;
char *message; char *message;
}; };
static struct auth_errtab auth_errlist[] = { static struct auth_errtab auth_errlist[] = {
{ AUTH_OK, { AUTH_OK,
"Authentication OK" }, N_("Authentication OK") },
{ AUTH_BADCRED, { AUTH_BADCRED,
"Invalid client credential" }, N_("Invalid client credential") },
{ AUTH_REJECTEDCRED, { AUTH_REJECTEDCRED,
"Server rejected credential" }, N_("Server rejected credential") },
{ AUTH_BADVERF, { AUTH_BADVERF,
"Invalid client verifier" }, N_("Invalid client verifier") },
{ AUTH_REJECTEDVERF, { AUTH_REJECTEDVERF,
"Server rejected verifier" }, N_("Server rejected verifier") },
{ AUTH_TOOWEAK, { AUTH_TOOWEAK,
"Client credential too weak" }, N_("Client credential too weak") },
{ AUTH_INVALIDRESP, { AUTH_INVALIDRESP,
"Invalid server verifier" }, N_("Invalid server verifier") },
{ AUTH_FAILED, { AUTH_FAILED,
"Failed (unspecified error)" }, N_("Failed (unspecified error)") },
}; };
static char * static char *
@ -298,7 +298,7 @@ auth_errmsg(stat)
for (i = 0; i < sizeof(auth_errlist)/sizeof(struct auth_errtab); i++) { for (i = 0; i < sizeof(auth_errlist)/sizeof(struct auth_errtab); i++) {
if (auth_errlist[i].status == stat) { if (auth_errlist[i].status == stat) {
return(auth_errlist[i].message); return _(auth_errlist[i].message);
} }
} }
return(NULL); return(NULL);

View File

@ -6,11 +6,11 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
@ -18,11 +18,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -101,9 +101,9 @@ clntraw_create(prog, vers)
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_prog = prog;
call_msg.rm_call.cb_vers = vers; call_msg.rm_call.cb_vers = vers;
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
if (! xdr_callhdr(xdrs, &call_msg)) { if (! xdr_callhdr(xdrs, &call_msg)) {
perror("clnt_raw.c - Fatal header serialization error."); perror(_("clnt_raw.c - Fatal header serialization error."));
} }
clp->mcnt = XDR_GETPOS(xdrs); clp->mcnt = XDR_GETPOS(xdrs);
XDR_DESTROY(xdrs); XDR_DESTROY(xdrs);
@ -121,7 +121,7 @@ clntraw_create(prog, vers)
return (client); return (client);
} }
static enum clnt_stat static enum clnt_stat
clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout) clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
CLIENT *h; CLIENT *h;
u_long proc; u_long proc;

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -50,7 +50,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
/* /*
* don't use gethostbyname, which would invoke yellow pages * don't use gethostbyname, which would invoke yellow pages
*/ */
get_myaddress(addr) get_myaddress(addr)
@ -69,7 +69,8 @@ get_myaddress(addr)
ifc.ifc_len = sizeof (buf); ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf; ifc.ifc_buf = buf;
if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) { if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
perror("get_myaddress: ioctl (get interface configuration)"); perror(
_("get_myaddress: ioctl (get interface configuration)"));
exit(1); exit(1);
} }
ifr = ifc.ifc_req; ifr = ifc.ifc_req;

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -76,7 +76,7 @@ pmap_set(program, version, protocol, port)
parms.pm_port = port; parms.pm_port = port;
if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, &parms, xdr_bool, &rslt, if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, &parms, xdr_bool, &rslt,
tottimeout) != RPC_SUCCESS) { tottimeout) != RPC_SUCCESS) {
clnt_perror(client, "Cannot register service"); clnt_perror(client, _("Cannot register service"));
return (FALSE); return (FALSE);
} }
CLNT_DESTROY(client); CLNT_DESTROY(client);

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -156,7 +156,7 @@ xdr_rmtcallres(xdrs, crp)
/* /*
* The following is kludged-up support for simple rpc broadcasts. * The following is kludged-up support for simple rpc broadcasts.
* Someday a large, complicated system will replace these trivial * Someday a large, complicated system will replace these trivial
* routines which only support udp/ip . * routines which only support udp/ip .
*/ */
@ -174,14 +174,14 @@ getbroadcastnets(addrs, sock, buf)
ifc.ifc_len = UDPMSGSIZE; ifc.ifc_len = UDPMSGSIZE;
ifc.ifc_buf = buf; ifc.ifc_buf = buf;
if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0) { if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0) {
perror("broadcast: ioctl (get interface configuration)"); perror(_("broadcast: ioctl (get interface configuration)"));
return (0); return (0);
} }
ifr = ifc.ifc_req; ifr = ifc.ifc_req;
for (i = 0, n = ifc.ifc_len/sizeof (struct ifreq); n > 0; n--, ifr++) { for (i = 0, n = ifc.ifc_len/sizeof (struct ifreq); n > 0; n--, ifr++) {
ifreq = *ifr; ifreq = *ifr;
if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifreq) < 0) { if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
perror("broadcast: ioctl (get interface flags)"); perror(_("broadcast: ioctl (get interface flags)"));
continue; continue;
} }
if ((ifreq.ifr_flags & IFF_BROADCAST) && if ((ifreq.ifr_flags & IFF_BROADCAST) &&
@ -209,7 +209,7 @@ getbroadcastnets(addrs, sock, buf)
typedef bool_t (*resultproc_t)(); typedef bool_t (*resultproc_t)();
enum clnt_stat enum clnt_stat
clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
u_long prog; /* program number */ u_long prog; /* program number */
u_long vers; /* version number */ u_long vers; /* version number */
@ -243,7 +243,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
struct rmtcallargs a; struct rmtcallargs a;
struct rmtcallres r; struct rmtcallres r;
struct rpc_msg msg; struct rpc_msg msg;
struct timeval t; struct timeval t;
char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE]; char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
/* /*
@ -251,13 +251,13 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
* preserialize the arguments into a send buffer. * preserialize the arguments into a send buffer.
*/ */
if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
perror("Cannot create socket for broadcast rpc"); perror(_("Cannot create socket for broadcast rpc"));
stat = RPC_CANTSEND; stat = RPC_CANTSEND;
goto done_broad; goto done_broad;
} }
#ifdef SO_BROADCAST #ifdef SO_BROADCAST
if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) { if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) {
perror("Cannot set socket option SO_BROADCAST"); perror(_("Cannot set socket option SO_BROADCAST"));
stat = RPC_CANTSEND; stat = RPC_CANTSEND;
goto done_broad; goto done_broad;
} }
@ -309,7 +309,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
if (sendto(sock, outbuf, outlen, 0, if (sendto(sock, outbuf, outlen, 0,
(struct sockaddr *)&baddr, (struct sockaddr *)&baddr,
sizeof (struct sockaddr)) != outlen) { sizeof (struct sockaddr)) != outlen) {
perror("Cannot send broadcast packet"); perror(_("Cannot send broadcast packet"));
stat = RPC_CANTSEND; stat = RPC_CANTSEND;
goto done_broad; goto done_broad;
} }
@ -323,7 +323,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
msg.acpted_rply.ar_results.where = (caddr_t)&r; msg.acpted_rply.ar_results.where = (caddr_t)&r;
msg.acpted_rply.ar_results.proc = xdr_rmtcallres; msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask; readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL, switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
(int *)NULL, &t)) { (int *)NULL, &t)) {
case 0: /* timed out */ case 0: /* timed out */
@ -333,7 +333,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
case -1: /* some kind of error */ case -1: /* some kind of error */
if (errno == EINTR) if (errno == EINTR)
goto recv_again; goto recv_again;
perror("Broadcast select problem"); perror(_("Broadcast select problem"));
stat = RPC_CANTRECV; stat = RPC_CANTRECV;
goto done_broad; goto done_broad;
@ -345,7 +345,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
if (inlen < 0) { if (inlen < 0) {
if (errno == EINTR) if (errno == EINTR)
goto try_again; goto try_again;
perror("Cannot receive reply to broadcast"); perror(_("Cannot receive reply to broadcast"));
stat = RPC_CANTRECV; stat = RPC_CANTRECV;
goto done_broad; goto done_broad;
} }

View File

@ -19,23 +19,23 @@ static char sccsid[] = "@(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun Micro";
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -84,7 +84,7 @@ main()
} }
#endif #endif
if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
perror("portmap cannot create socket"); perror(_("portmap cannot create socket"));
exit(1); exit(1);
} }
@ -92,12 +92,12 @@ main()
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
addr.sin_port = htons(PMAPPORT); addr.sin_port = htons(PMAPPORT);
if (bind(sock, (struct sockaddr *)&addr, len) != 0) { if (bind(sock, (struct sockaddr *)&addr, len) != 0) {
perror("portmap cannot bind"); perror(_("portmap cannot bind"));
exit(1); exit(1);
} }
if ((xprt = svcudp_create(sock)) == (SVCXPRT *)NULL) { if ((xprt = svcudp_create(sock)) == (SVCXPRT *)NULL) {
fprintf(stderr, "couldn't do udp_create\n"); fprintf(stderr, _("couldn't do udp_create\n"));
exit(1); exit(1);
} }
/* make an entry for ourself */ /* make an entry for ourself */
@ -110,16 +110,16 @@ main()
pmaplist = pml; pmaplist = pml;
if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
perror("portmap cannot create socket"); perror(_("portmap cannot create socket"));
exit(1); exit(1);
} }
if (bind(sock, (struct sockaddr *)&addr, len) != 0) { if (bind(sock, (struct sockaddr *)&addr, len) != 0) {
perror("portmap cannot bind"); perror(_("portmap cannot bind"));
exit(1); exit(1);
} }
if ((xprt = svctcp_create(sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE)) if ((xprt = svctcp_create(sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE))
== (SVCXPRT *)NULL) { == (SVCXPRT *)NULL) {
fprintf(stderr, "couldn't do tcp_create\n"); fprintf(stderr, _("couldn't do tcp_create\n"));
exit(1); exit(1);
} }
/* make an entry for ourself */ /* make an entry for ourself */
@ -135,7 +135,7 @@ main()
(void)signal(SIGCHLD, reap); (void)signal(SIGCHLD, reap);
svc_run(); svc_run();
fprintf(stderr, "run_svc returned unexpectedly\n"); fprintf(stderr, _("run_svc returned unexpectedly\n"));
abort(); abort();
} }
@ -158,7 +158,7 @@ find_service(prog, vers, prot)
return (hit); return (hit);
} }
/* /*
* 1 OK, 0 not * 1 OK, 0 not
*/ */
reg_service(rqstp, xprt) reg_service(rqstp, xprt)
@ -169,7 +169,7 @@ reg_service(rqstp, xprt)
struct pmaplist *pml, *prevpml, *fnd; struct pmaplist *pml, *prevpml, *fnd;
int ans, port; int ans, port;
caddr_t t; caddr_t t;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "server: about do a switch\n"); fprintf(stderr, "server: about do a switch\n");
#endif #endif
@ -207,7 +207,7 @@ reg_service(rqstp, xprt)
goto done; goto done;
} }
} else { } else {
/* /*
* add to END of list * add to END of list
*/ */
pml = (struct pmaplist *) pml = (struct pmaplist *)
@ -306,7 +306,7 @@ reg_service(rqstp, xprt)
* Calls a procedure on the local machine. If the requested * Calls a procedure on the local machine. If the requested
* procedure is not registered this procedure does not return * procedure is not registered this procedure does not return
* error information!! * error information!!
* This procedure is only supported on rpc/udp and calls via * This procedure is only supported on rpc/udp and calls via
* rpc/udp. It passes null authentication parameters. * rpc/udp. It passes null authentication parameters.
*/ */
callit(rqstp, xprt); callit(rqstp, xprt);
@ -418,7 +418,7 @@ xdr_len_opaque_parms(xdrs, cap)
* a machine should shut-up instead of complain, less the requestor be * a machine should shut-up instead of complain, less the requestor be
* overrun with complaints at the expense of not hearing a valid reply ... * overrun with complaints at the expense of not hearing a valid reply ...
* *
* This now forks so that the program & process that it calls can call * This now forks so that the program & process that it calls can call
* back to the portmapper. * back to the portmapper.
*/ */
static static
@ -449,7 +449,7 @@ callit(rqstp, xprt)
*/ */
if ((pid = fork()) != 0) { if ((pid = fork()) != 0) {
if (debugging && (pid < 0)) { if (debugging && (pid < 0)) {
fprintf(stderr, "portmap CALLIT: cannot fork.\n"); fprintf(stderr, _("portmap CALLIT: cannot fork.\n"));
} }
return; return;
} }

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_main.c 1.7 87/06/24 (C) 1987 SMI";
#endif #endif
/* /*
* rpc_main.c, Top level of the RPC protocol compiler. * rpc_main.c, Top level of the RPC protocol compiler.
* Copyright (C) 1987, Sun Microsystems, Inc. * Copyright (C) 1987, Sun Microsystems, Inc.
*/ */
#include <stdio.h> #include <stdio.h>
@ -72,12 +72,12 @@ main(argc, argv)
if (!parseargs(argc, argv, &cmd)) { if (!parseargs(argc, argv, &cmd)) {
f_print(stderr, f_print(stderr,
"usage: %s infile\n", cmdname); _("usage: %s infile\n"), cmdname);
f_print(stderr, f_print(stderr,
" %s [-c | -h | -l | -m] [-o outfile] [infile]\n", _(" %s [-c | -h | -l | -m] [-o outfile] [infile]\n"),
cmdname); cmdname);
f_print(stderr, f_print(stderr,
" %s [-s udp|tcp]* [-o outfile] [infile]\n", _(" %s [-s udp|tcp]* [-o outfile] [infile]\n"),
cmdname); cmdname);
exit(1); exit(1);
} }
@ -104,7 +104,7 @@ main(argc, argv)
} }
/* /*
* add extension to filename * add extension to filename
*/ */
static char * static char *
extendfile(file, ext) extendfile(file, ext)
@ -128,7 +128,7 @@ extendfile(file, ext)
} }
/* /*
* Open output file with given extension * Open output file with given extension
*/ */
static static
open_output(infile, outfile) open_output(infile, outfile)
@ -140,13 +140,13 @@ open_output(infile, outfile)
return; return;
} }
if (infile != NULL && streq(outfile, infile)) { if (infile != NULL && streq(outfile, infile)) {
f_print(stderr, "%s: output would overwrite %s\n", cmdname, f_print(stderr, _("%s: output would overwrite %s\n"), cmdname,
infile); infile);
crash(); crash();
} }
fout = fopen(outfile, "w"); fout = fopen(outfile, "w");
if (fout == NULL) { if (fout == NULL) {
f_print(stderr, "%s: unable to open ", cmdname); f_print(stderr, _("%s: unable to open "), cmdname);
perror(outfile); perror(outfile);
crash(); crash();
} }
@ -154,7 +154,7 @@ open_output(infile, outfile)
} }
/* /*
* Open input file with given define for C-preprocessor * Open input file with given define for C-preprocessor
*/ */
static static
open_input(infile, define) open_input(infile, define)
@ -201,7 +201,7 @@ c_output(infile, define, extend, outfile)
char *outfilename; char *outfilename;
long tell; long tell;
open_input(infile, define); open_input(infile, define);
outfilename = extend ? extendfile(infile, outfile) : outfile; outfilename = extend ? extendfile(infile, outfile) : outfile;
open_output(infile, outfilename); open_output(infile, outfilename);
f_print(fout, "#include <rpc/rpc.h>\n"); f_print(fout, "#include <rpc/rpc.h>\n");
@ -321,7 +321,7 @@ l_output(infile, define, extend, outfile)
} }
/* /*
* Perform registrations for service output * Perform registrations for service output
*/ */
static static
do_registers(argc, argv) do_registers(argc, argv)
@ -340,7 +340,7 @@ do_registers(argc, argv)
} }
/* /*
* Parse command line arguments * Parse command line arguments
*/ */
static static
parseargs(argc, argv, cmd) parseargs(argc, argv, cmd)
@ -387,7 +387,7 @@ parseargs(argc, argv, cmd)
break; break;
case 'o': case 'o':
case 's': case 's':
if (argv[i][j - 1] != '-' || if (argv[i][j - 1] != '-' ||
argv[i][j + 1] != 0) { argv[i][j + 1] != 0) {
return (0); return (0);
} }

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,7 +32,7 @@ static char sccsid[] = "@(#)rpc_parse.c 1.4 87/04/28 (C) 1987 SMI";
#endif #endif
/* /*
* rpc_parse.c, Parser for the RPC protocol compiler * rpc_parse.c, Parser for the RPC protocol compiler
* Copyright (C) 1987 Sun Microsystems, Inc. * Copyright (C) 1987 Sun Microsystems, Inc.
*/ */
#include <stdio.h> #include <stdio.h>
@ -74,7 +74,7 @@ get_definition()
return (NULL); return (NULL);
break; break;
default: default:
error("definition keyword expected"); error(_("definition keyword expected"));
} }
scan(TOK_SEMICOLON, &tok); scan(TOK_SEMICOLON, &tok);
isdefined(defp); isdefined(defp);
@ -143,7 +143,7 @@ def_program(defp)
plist = ALLOC(proc_list); plist = ALLOC(proc_list);
get_type(&plist->res_prefix, &plist->res_type, DEF_PROGRAM); get_type(&plist->res_prefix, &plist->res_type, DEF_PROGRAM);
if (streq(plist->res_type, "opaque")) { if (streq(plist->res_type, "opaque")) {
error("illegal result type"); error(_("illegal result type"));
} }
scan(TOK_IDENT, &tok); scan(TOK_IDENT, &tok);
plist->proc_name = tok.str; plist->proc_name = tok.str;
@ -302,7 +302,7 @@ get_declaration(dec, dkind)
dec->name = tok.str; dec->name = tok.str;
if (peekscan(TOK_LBRACKET, &tok)) { if (peekscan(TOK_LBRACKET, &tok)) {
if (dec->rel == REL_POINTER) { if (dec->rel == REL_POINTER) {
error("no array-of-pointer declarations -- use typedef"); error(_("no array-of-pointer declarations -- use typedef"));
} }
dec->rel = REL_VECTOR; dec->rel = REL_VECTOR;
scan_num(&tok); scan_num(&tok);
@ -310,7 +310,7 @@ get_declaration(dec, dkind)
scan(TOK_RBRACKET, &tok); scan(TOK_RBRACKET, &tok);
} else if (peekscan(TOK_LANGLE, &tok)) { } else if (peekscan(TOK_LANGLE, &tok)) {
if (dec->rel == REL_POINTER) { if (dec->rel == REL_POINTER) {
error("no array-of-pointer declarations -- use typedef"); error(_("no array-of-pointer declarations -- use typedef"));
} }
dec->rel = REL_ARRAY; dec->rel = REL_ARRAY;
if (peekscan(TOK_RANGLE, &tok)) { if (peekscan(TOK_RANGLE, &tok)) {
@ -323,11 +323,11 @@ get_declaration(dec, dkind)
} }
if (streq(dec->type, "opaque")) { if (streq(dec->type, "opaque")) {
if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) {
error("array declaration expected"); error(_("array declaration expected"));
} }
} else if (streq(dec->type, "string")) { } else if (streq(dec->type, "string")) {
if (dec->rel != REL_ARRAY) { if (dec->rel != REL_ARRAY) {
error("variable-length array declaration expected"); error(_("variable-length array declaration expected"));
} }
} }
} }
@ -367,7 +367,7 @@ get_type(prefixp, typep, dkind)
break; break;
case TOK_VOID: case TOK_VOID:
if (dkind != DEF_UNION && dkind != DEF_PROGRAM) { if (dkind != DEF_UNION && dkind != DEF_PROGRAM) {
error("voids allowed only inside union and program definitions"); error(_("voids allowed only inside union and program definitions"));
} }
*typep = tok.str; *typep = tok.str;
break; break;
@ -381,7 +381,7 @@ get_type(prefixp, typep, dkind)
*typep = tok.str; *typep = tok.str;
break; break;
default: default:
error("expected type specifier"); error(_("expected type specifier"));
} }
} }

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_scan.c 1.6 87/06/24 (C) 1987 SMI";
#endif #endif
/* /*
* rpc_scan.c, Scanner for the RPC protocol compiler * rpc_scan.c, Scanner for the RPC protocol compiler
* Copyright (C) 1987, Sun Microsystems, Inc. * Copyright (C) 1987, Sun Microsystems, Inc.
*/ */
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
@ -48,7 +48,7 @@ static int pushed = 0; /* is a token pushed */
static token lasttok; /* last token, if pushed */ static token lasttok; /* last token, if pushed */
/* /*
* scan expecting 1 given token * scan expecting 1 given token
*/ */
void void
scan(expect, tokp) scan(expect, tokp)
@ -62,7 +62,7 @@ scan(expect, tokp)
} }
/* /*
* scan expecting 2 given tokens * scan expecting 2 given tokens
*/ */
void void
scan2(expect1, expect2, tokp) scan2(expect1, expect2, tokp)
@ -77,7 +77,7 @@ scan2(expect1, expect2, tokp)
} }
/* /*
* scan expecting 3 given token * scan expecting 3 given token
*/ */
void void
scan3(expect1, expect2, expect3, tokp) scan3(expect1, expect2, expect3, tokp)
@ -95,7 +95,7 @@ scan3(expect1, expect2, expect3, tokp)
/* /*
* scan expecting a constant, possibly symbolic * scan expecting a constant, possibly symbolic
*/ */
void void
scan_num(tokp) scan_num(tokp)
@ -106,13 +106,13 @@ scan_num(tokp)
case TOK_IDENT: case TOK_IDENT:
break; break;
default: default:
error("constant or identifier expected"); error(_("constant or identifier expected"));
} }
} }
/* /*
* Peek at the next token * Peek at the next token
*/ */
void void
peek(tokp) peek(tokp)
@ -124,7 +124,7 @@ peek(tokp)
/* /*
* Peek at the next token and scan it if it matches what you expect * Peek at the next token and scan it if it matches what you expect
*/ */
int int
peekscan(expect, tokp) peekscan(expect, tokp)
@ -142,7 +142,7 @@ peekscan(expect, tokp)
/* /*
* Get the next token, printing out any directive that are encountered. * Get the next token, printing out any directive that are encountered.
*/ */
void void
get_token(tokp) get_token(tokp)
@ -168,7 +168,7 @@ get_token(tokp)
if (commenting) { if (commenting) {
break; break;
} else if (cppline(curline)) { } else if (cppline(curline)) {
docppline(curline, &linenum, docppline(curline, &linenum,
&infilename); &infilename);
} else if (directive(curline)) { } else if (directive(curline)) {
printdirective(curline); printdirective(curline);
@ -196,7 +196,7 @@ get_token(tokp)
} }
/* /*
* 'where' is not whitespace, comment or directive Must be a token! * 'where' is not whitespace, comment or directive Must be a token!
*/ */
switch (*where) { switch (*where) {
case ':': case ':':
@ -278,7 +278,7 @@ get_token(tokp)
char buf[100]; char buf[100];
char *p; char *p;
s_print(buf, "illegal character in file: "); s_print(buf, _("illegal character in file: "));
p = buf + strlen(buf); p = buf + strlen(buf);
if (isprint(*where)) { if (isprint(*where)) {
s_print(p, "%c", *where); s_print(p, "%c", *where);
@ -316,7 +316,7 @@ findstrconst(str, val)
*p++; *p++;
} while (*p && *p != '"'); } while (*p && *p != '"');
if (*p == 0) { if (*p == 0) {
error("unterminated string constant"); error(_("unterminated string constant"));
} }
p++; p++;
size = p - *str; size = p - *str;
@ -453,7 +453,7 @@ docppline(line, lineno, fname)
line++; line++;
} }
if (*line != '"') { if (*line != '"') {
error("preprocessor error"); error(_("preprocessor error"));
} }
line++; line++;
p = file = alloc(strlen(line) + 1); p = file = alloc(strlen(line) + 1);
@ -461,7 +461,7 @@ docppline(line, lineno, fname)
*p++ = *line++; *p++ = *line++;
} }
if (*line == 0) { if (*line == 0) {
error("preprocessor error"); error(_("preprocessor error"));
} }
*p = 0; *p = 0;
if (*file == 0) { if (*file == 0) {

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_util.c 1.5 87/06/24 (C) 1987 SMI";
#endif #endif
/* /*
* rpc_util.c, Utility routines for the RPC protocol compiler * rpc_util.c, Utility routines for the RPC protocol compiler
* Copyright (C) 1987, Sun Microsystems, Inc. * Copyright (C) 1987, Sun Microsystems, Inc.
*/ */
#include <stdio.h> #include <stdio.h>
#include "rpc_scan.h" #include "rpc_scan.h"
@ -56,7 +56,7 @@ FILE *fin; /* file pointer of current input */
list *defined; /* list of defined things */ list *defined; /* list of defined things */
/* /*
* Reinitialize the world * Reinitialize the world
*/ */
reinitialize() reinitialize()
{ {
@ -67,7 +67,7 @@ reinitialize()
} }
/* /*
* string equality * string equality
*/ */
streq(a, b) streq(a, b)
char *a; char *a;
@ -77,7 +77,7 @@ streq(a, b)
} }
/* /*
* find a value in a list * find a value in a list
*/ */
char * char *
findval(lst, val, cmp) findval(lst, val, cmp)
@ -95,7 +95,7 @@ findval(lst, val, cmp)
} }
/* /*
* store a value in a list * store a value in a list
*/ */
void void
storeval(lstp, val) storeval(lstp, val)
@ -248,21 +248,21 @@ pvname(pname, vnum)
/* /*
* print a useful (?) error message, and then die * print a useful (?) error message, and then die
*/ */
void void
error(msg) error(msg)
char *msg; char *msg;
{ {
printwhere(); printwhere();
f_print(stderr, "%s, line %d: ", infilename, linenum); f_print(stderr, _("%s, line %d: "), infilename, linenum);
f_print(stderr, "%s\n", msg); f_print(stderr, "%s\n", msg);
crash(); crash();
} }
/* /*
* Something went wrong, unlink any files that we may have created and then * Something went wrong, unlink any files that we may have created and then
* die. * die.
*/ */
crash() crash()
{ {
@ -282,7 +282,7 @@ record_open(file)
if (nfiles < NFILES) { if (nfiles < NFILES) {
outfiles[nfiles++] = file; outfiles[nfiles++] = file;
} else { } else {
f_print(stderr, "too many files!\n"); f_print(stderr, _("too many files!\n"));
crash(); crash();
} }
} }
@ -291,38 +291,38 @@ static char expectbuf[100];
static char *toktostr(); static char *toktostr();
/* /*
* error, token encountered was not the expected one * error, token encountered was not the expected one
*/ */
void void
expected1(exp1) expected1(exp1)
tok_kind exp1; tok_kind exp1;
{ {
s_print(expectbuf, "expected '%s'", s_print(expectbuf, _("expected '%s'"),
toktostr(exp1)); toktostr(exp1));
error(expectbuf); error(expectbuf);
} }
/* /*
* error, token encountered was not one of two expected ones * error, token encountered was not one of two expected ones
*/ */
void void
expected2(exp1, exp2) expected2(exp1, exp2)
tok_kind exp1, exp2; tok_kind exp1, exp2;
{ {
s_print(expectbuf, "expected '%s' or '%s'", s_print(expectbuf, _("expected '%s' or '%s'"),
toktostr(exp1), toktostr(exp1),
toktostr(exp2)); toktostr(exp2));
error(expectbuf); error(expectbuf);
} }
/* /*
* error, token encountered was not one of 3 expected ones * error, token encountered was not one of 3 expected ones
*/ */
void void
expected3(exp1, exp2, exp3) expected3(exp1, exp2, exp3)
tok_kind exp1, exp2, exp3; tok_kind exp1, exp2, exp3;
{ {
s_print(expectbuf, "expected '%s', '%s' or '%s'", s_print(expectbuf, _("expected '%s', '%s' or '%s'"),
toktostr(exp1), toktostr(exp1),
toktostr(exp2), toktostr(exp2),
toktostr(exp3)); toktostr(exp3));

View File

@ -19,23 +19,23 @@ static char sccsid[] = "@(#)rpcinfo.c 1.22 87/08/12 SMI";
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -179,7 +179,7 @@ main(argc, argv)
return (0); return (0);
} }
static void static void
udpping(portnum, argc, argv) udpping(portnum, argc, argv)
u_short portnum; u_short portnum;
@ -194,7 +194,7 @@ udpping(portnum, argc, argv)
int sock = RPC_ANYSOCK; int sock = RPC_ANYSOCK;
struct rpc_err rpcerr; struct rpc_err rpcerr;
int failure; int failure;
if (argc < 2 || argc > 3) { if (argc < 2 || argc > 3) {
usage(); usage();
exit(1); exit(1);
@ -219,7 +219,7 @@ udpping(portnum, argc, argv)
if ((client = clntudp_create(&addr, prognum, (u_long)0, if ((client = clntudp_create(&addr, prognum, (u_long)0,
to, &sock)) == NULL) { to, &sock)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu is not available\n", printf(_("program %lu is not available\n"),
prognum); prognum);
exit(1); exit(1);
} }
@ -242,7 +242,7 @@ udpping(portnum, argc, argv)
if ((client = clntudp_create(&addr, prognum, MAX_VERS, if ((client = clntudp_create(&addr, prognum, MAX_VERS,
to, &sock)) == NULL) { to, &sock)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, MAX_VERS); prognum, MAX_VERS);
exit(1); exit(1);
} }
@ -279,7 +279,7 @@ udpping(portnum, argc, argv)
if ((client = clntudp_create(&addr, prognum, vers, if ((client = clntudp_create(&addr, prognum, vers,
to, &sock)) == NULL) { to, &sock)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, vers); prognum, vers);
exit(1); exit(1);
} }
@ -347,7 +347,7 @@ tcpping(portnum, argc, argv)
if ((client = clnttcp_create(&addr, prognum, MIN_VERS, if ((client = clnttcp_create(&addr, prognum, MIN_VERS,
&sock, 0, 0)) == NULL) { &sock, 0, 0)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu is not available\n", printf(_("program %lu is not available\n"),
prognum); prognum);
exit(1); exit(1);
} }
@ -368,7 +368,7 @@ tcpping(portnum, argc, argv)
if ((client = clnttcp_create(&addr, prognum, MAX_VERS, if ((client = clnttcp_create(&addr, prognum, MAX_VERS,
&sock, 0, 0)) == NULL) { &sock, 0, 0)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, MAX_VERS); prognum, MAX_VERS);
exit(1); exit(1);
} }
@ -405,7 +405,7 @@ tcpping(portnum, argc, argv)
if ((client = clnttcp_create(&addr, prognum, vers, if ((client = clnttcp_create(&addr, prognum, vers,
&sock, 0, 0)) == NULL) { &sock, 0, 0)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, vers); prognum, vers);
exit(1); exit(1);
} }
@ -426,7 +426,7 @@ tcpping(portnum, argc, argv)
if ((client = clnttcp_create(&addr, prognum, vers, &sock, if ((client = clnttcp_create(&addr, prognum, vers, &sock,
0, 0)) == NULL) { 0, 0)) == NULL) {
clnt_pcreateerror("rpcinfo"); clnt_pcreateerror("rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, vers); prognum, vers);
exit(1); exit(1);
} }
@ -459,11 +459,11 @@ pstatus(client, prognum, vers)
clnt_geterr(client, &rpcerr); clnt_geterr(client, &rpcerr);
if (rpcerr.re_status != RPC_SUCCESS) { if (rpcerr.re_status != RPC_SUCCESS) {
clnt_perror(client, "rpcinfo"); clnt_perror(client, "rpcinfo");
printf("program %lu version %lu is not available\n", printf(_("program %lu version %lu is not available\n"),
prognum, vers); prognum, vers);
return (-1); return (-1);
} else { } else {
printf("program %lu version %lu ready and waiting\n", printf(_("program %lu version %lu ready and waiting\n"),
prognum, vers); prognum, vers);
return (0); return (0);
} }
@ -481,7 +481,7 @@ pmapdump(argc, argv)
struct timeval minutetimeout; struct timeval minutetimeout;
register CLIENT *client; register CLIENT *client;
struct rpcent *rpc; struct rpcent *rpc;
if (argc > 1) { if (argc > 1) {
usage(); usage();
exit(1); exit(1);
@ -502,19 +502,19 @@ pmapdump(argc, argv)
server_addr.sin_port = htons(PMAPPORT); server_addr.sin_port = htons(PMAPPORT);
if ((client = clnttcp_create(&server_addr, PMAPPROG, if ((client = clnttcp_create(&server_addr, PMAPPROG,
PMAPVERS, &socket, 50, 500)) == NULL) { PMAPVERS, &socket, 50, 500)) == NULL) {
clnt_pcreateerror("rpcinfo: can't contact portmapper"); clnt_pcreateerror(_("rpcinfo: can't contact portmapper"));
exit(1); exit(1);
} }
if (clnt_call(client, PMAPPROC_DUMP, xdr_void, NULL, if (clnt_call(client, PMAPPROC_DUMP, xdr_void, NULL,
xdr_pmaplist, &head, minutetimeout) != RPC_SUCCESS) { xdr_pmaplist, &head, minutetimeout) != RPC_SUCCESS) {
fprintf(stderr, "rpcinfo: can't contact portmapper: "); fprintf(stderr, _("rpcinfo: can't contact portmapper: "));
clnt_perror(client, "rpcinfo"); clnt_perror(client, "rpcinfo");
exit(1); exit(1);
} }
if (head == NULL) { if (head == NULL) {
printf("No remote programs registered.\n"); printf(_("No remote programs registered.\n"));
} else { } else {
printf(" program vers proto port\n"); printf(_(" program vers proto port\n"));
for (; head != NULL; head = head->pml_next) { for (; head != NULL; head = head->pml_next) {
printf("%10ld%5ld", printf("%10ld%5ld",
head->pml_map.pm_prog, head->pml_map.pm_prog,
@ -535,8 +535,8 @@ pmapdump(argc, argv)
} }
} }
/* /*
* reply_proc collects replies from the broadcast. * reply_proc collects replies from the broadcast.
* to get a unique list of responses the output of rpcinfo should * to get a unique list of responses the output of rpcinfo should
* be piped through sort(1) and then uniq(1). * be piped through sort(1) and then uniq(1).
*/ */
@ -552,7 +552,7 @@ reply_proc(res, who)
hp = gethostbyaddr((char *) &who->sin_addr, sizeof who->sin_addr, hp = gethostbyaddr((char *) &who->sin_addr, sizeof who->sin_addr,
AF_INET); AF_INET);
printf("%s %s\n", inet_ntoa(who->sin_addr), printf("%s %s\n", inet_ntoa(who->sin_addr),
(hp == NULL) ? "(unknown)" : hp->h_name); (hp == NULL) ? _("(unknown)") : hp->h_name);
return(FALSE); return(FALSE);
} }
@ -573,7 +573,7 @@ brdcst(argc, argv)
rpc_stat = clnt_broadcast(prognum, vers, NULLPROC, xdr_void, rpc_stat = clnt_broadcast(prognum, vers, NULLPROC, xdr_void,
(char *)NULL, xdr_void, (char *)NULL, reply_proc); (char *)NULL, xdr_void, (char *)NULL, reply_proc);
if ((rpc_stat != RPC_SUCCESS) && (rpc_stat != RPC_TIMEDOUT)) { if ((rpc_stat != RPC_SUCCESS) && (rpc_stat != RPC_TIMEDOUT)) {
fprintf(stderr, "rpcinfo: broadcast failed: %s\n", fprintf(stderr, _("rpcinfo: broadcast failed: %s\n"),
clnt_sperrno(rpc_stat)); clnt_sperrno(rpc_stat));
exit(1); exit(1);
} }
@ -597,7 +597,7 @@ deletereg(argc, argv)
prog_num = getprognum(argv[0]); prog_num = getprognum(argv[0]);
version_num = getvers(argv[1]); version_num = getvers(argv[1]);
if ((pmap_unset(prog_num, version_num)) == 0) { if ((pmap_unset(prog_num, version_num)) == 0) {
fprintf(stderr, "rpcinfo: Could not delete registration for prog %s version %s\n", fprintf(stderr, _("rpcinfo: Could not delete registration for prog %s version %s\n"),
argv[0], argv[1]) ; argv[0], argv[1]) ;
exit(1) ; exit(1) ;
} }
@ -606,11 +606,11 @@ deletereg(argc, argv)
static void static void
usage() usage()
{ {
fprintf(stderr, "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"); fprintf(stderr, _("Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"));
fprintf(stderr, " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"); fprintf(stderr, _(" rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"));
fprintf(stderr, " rpcinfo -p [ host ]\n"); fprintf(stderr, _(" rpcinfo -p [ host ]\n"));
fprintf(stderr, " rpcinfo -b prognum versnum\n"); fprintf(stderr, _(" rpcinfo -b prognum versnum\n"));
fprintf(stderr, " rpcinfo -d prognum versnum\n") ; fprintf(stderr, _(" rpcinfo -d prognum versnum\n")) ;
} }
static u_long static u_long
@ -623,7 +623,7 @@ getprognum(arg)
if (isalpha(*arg)) { if (isalpha(*arg)) {
rpc = getrpcbyname(arg); rpc = getrpcbyname(arg);
if (rpc == NULL) { if (rpc == NULL) {
fprintf(stderr, "rpcinfo: %s is unknown service\n", fprintf(stderr, _("rpcinfo: %s is unknown service\n"),
arg); arg);
exit(1); exit(1);
} }
@ -656,7 +656,8 @@ get_inet_address(addr, host)
addr->sin_addr.s_addr = (u_long) inet_addr(host); addr->sin_addr.s_addr = (u_long) inet_addr(host);
if (addr->sin_addr.s_addr == -1 || addr->sin_addr.s_addr == 0) { if (addr->sin_addr.s_addr == -1 || addr->sin_addr.s_addr == 0) {
if ((hp = gethostbyname(host)) == NULL) { if ((hp = gethostbyname(host)) == NULL) {
fprintf(stderr, "rpcinfo: %s is unknown host\n", host); fprintf(stderr, _("rpcinfo: %s is unknown host\n"),
host);
exit(1); exit(1);
} }
bcopy(hp->h_addr, (char *)&addr->sin_addr, hp->h_length); bcopy(hp->h_addr, (char *)&addr->sin_addr, hp->h_length);

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -31,7 +31,7 @@
static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
#endif #endif
/* /*
* svc_simple.c * svc_simple.c
* Simplified front end to rpc. * Simplified front end to rpc.
* *
@ -58,29 +58,29 @@ registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
char *(*progname)(); char *(*progname)();
xdrproc_t inproc, outproc; xdrproc_t inproc, outproc;
{ {
if (procnum == NULLPROC) { if (procnum == NULLPROC) {
(void) fprintf(stderr, (void) fprintf(stderr,
"can't reassign procedure number %d\n", NULLPROC); _("can't reassign procedure number %d\n"), NULLPROC);
return (-1); return (-1);
} }
if (transp == 0) { if (transp == 0) {
transp = svcudp_create(RPC_ANYSOCK); transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL) { if (transp == NULL) {
(void) fprintf(stderr, "couldn't create an rpc server\n"); (void) fprintf(stderr, _("couldn't create an rpc server\n"));
return (-1); return (-1);
} }
} }
(void) pmap_unset((u_long)prognum, (u_long)versnum); (void) pmap_unset((u_long)prognum, (u_long)versnum);
if (!svc_register(transp, (u_long)prognum, (u_long)versnum, if (!svc_register(transp, (u_long)prognum, (u_long)versnum,
universal, IPPROTO_UDP)) { universal, IPPROTO_UDP)) {
(void) fprintf(stderr, "couldn't register prog %d vers %d\n", (void) fprintf(stderr, _("couldn't register prog %d vers %d\n"),
prognum, versnum); prognum, versnum);
return (-1); return (-1);
} }
pl = (struct proglst *)malloc(sizeof(struct proglst)); pl = (struct proglst *)malloc(sizeof(struct proglst));
if (pl == NULL) { if (pl == NULL) {
(void) fprintf(stderr, "registerrpc: out of memory\n"); (void) fprintf(stderr, _("registerrpc: out of memory\n"));
return (-1); return (-1);
} }
pl->p_progname = progname; pl->p_progname = progname;
@ -103,7 +103,7 @@ universal(rqstp, transp)
char xdrbuf[UDPMSGSIZE]; char xdrbuf[UDPMSGSIZE];
struct proglst *pl; struct proglst *pl;
/* /*
* enforce "procnum 0 is echo" convention * enforce "procnum 0 is echo" convention
*/ */
if (rqstp->rq_proc == NULLPROC) { if (rqstp->rq_proc == NULLPROC) {
@ -129,7 +129,7 @@ universal(rqstp, transp)
return; return;
if (!svc_sendreply(transp, pl->p_outproc, outdata)) { if (!svc_sendreply(transp, pl->p_outproc, outdata)) {
(void) fprintf(stderr, (void) fprintf(stderr,
"trouble replying to prog %d\n", _("trouble replying to prog %d\n"),
pl->p_prognum); pl->p_prognum);
exit(1); exit(1);
} }
@ -137,7 +137,7 @@ universal(rqstp, transp)
(void)svc_freeargs(transp, pl->p_inproc, xdrbuf); (void)svc_freeargs(transp, pl->p_inproc, xdrbuf);
return; return;
} }
(void) fprintf(stderr, "never registered prog %d\n", prog); (void) fprintf(stderr, _("never registered prog %d\n"), prog);
exit(1); exit(1);
} }

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -32,7 +32,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
#endif #endif
/* /*
* svc_tcp.c, Server side for TCP/IP based RPC. * svc_tcp.c, Server side for TCP/IP based RPC.
* *
* Copyright (C) 1984, Sun Microsystems, Inc. * Copyright (C) 1984, Sun Microsystems, Inc.
* *
@ -131,7 +131,7 @@ svctcp_create(sock, sendsize, recvsize)
if (sock == RPC_ANYSOCK) { if (sock == RPC_ANYSOCK) {
if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
perror("svctcp_.c - udp socket creation problem"); perror(_("svctcp_.c - udp socket creation problem"));
return ((SVCXPRT *)NULL); return ((SVCXPRT *)NULL);
} }
madesock = TRUE; madesock = TRUE;
@ -144,21 +144,21 @@ svctcp_create(sock, sendsize, recvsize)
} }
if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) || if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) ||
(listen(sock, 2) != 0)) { (listen(sock, 2) != 0)) {
perror("svctcp_.c - cannot getsockname or listen"); perror(_("svctcp_.c - cannot getsockname or listen"));
if (madesock) if (madesock)
(void)close(sock); (void)close(sock);
return ((SVCXPRT *)NULL); return ((SVCXPRT *)NULL);
} }
r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r)); r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r));
if (r == NULL) { if (r == NULL) {
(void) fprintf(stderr, "svctcp_create: out of memory\n"); (void) fprintf(stderr, _("svctcp_create: out of memory\n"));
return (NULL); return (NULL);
} }
r->sendsize = sendsize; r->sendsize = sendsize;
r->recvsize = recvsize; r->recvsize = recvsize;
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
if (xprt == NULL) { if (xprt == NULL) {
(void) fprintf(stderr, "svctcp_create: out of memory\n"); (void) fprintf(stderr, _("svctcp_create: out of memory\n"));
return (NULL); return (NULL);
} }
xprt->xp_p2 = NULL; xprt->xp_p2 = NULL;
@ -193,15 +193,15 @@ makefd_xprt(fd, sendsize, recvsize)
{ {
register SVCXPRT *xprt; register SVCXPRT *xprt;
register struct tcp_conn *cd; register struct tcp_conn *cd;
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
if (xprt == (SVCXPRT *)NULL) { if (xprt == (SVCXPRT *)NULL) {
(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); (void) fprintf(stderr, _("svc_tcp: makefd_xprt: out of memory\n"));
goto done; goto done;
} }
cd = (struct tcp_conn *)mem_alloc(sizeof(struct tcp_conn)); cd = (struct tcp_conn *)mem_alloc(sizeof(struct tcp_conn));
if (cd == (struct tcp_conn *)NULL) { if (cd == (struct tcp_conn *)NULL) {
(void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); (void) fprintf(stderr, _("svc_tcp: makefd_xprt: out of memory\n"));
mem_free((char *) xprt, sizeof(SVCXPRT)); mem_free((char *) xprt, sizeof(SVCXPRT));
xprt = (SVCXPRT *)NULL; xprt = (SVCXPRT *)NULL;
goto done; goto done;
@ -304,7 +304,7 @@ readtcp(xprt, buf, len)
#endif /* def FD_SETSIZE */ #endif /* def FD_SETSIZE */
do { do {
readfds = mask; readfds = mask;
if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL, if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL,
&wait_per_try) <= 0) { &wait_per_try) <= 0) {
if (errno == EINTR) { if (errno == EINTR) {
continue; continue;

View File

@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized * may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or * to license or distribute it to anyone else except as part of a product or
* program developed by the user. * program developed by the user.
* *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
* *
* Sun RPC is provided with no support and without any obligation on the * Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction, * part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement. * modification or enhancement.
* *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF. * OR ANY PART THEREOF.
* *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue * In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if * or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages. * Sun has been advised of the possibility of such damages.
* *
* Sun Microsystems, Inc. * Sun Microsystems, Inc.
* 2550 Garcia Avenue * 2550 Garcia Avenue
* Mountain View, California 94043 * Mountain View, California 94043
@ -104,7 +104,7 @@ svcudp_bufcreate(sock, sendsz, recvsz)
if (sock == RPC_ANYSOCK) { if (sock == RPC_ANYSOCK) {
if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
perror("svcudp_create: socket creation problem"); perror(_("svcudp_create: socket creation problem"));
return ((SVCXPRT *)NULL); return ((SVCXPRT *)NULL);
} }
madesock = TRUE; madesock = TRUE;
@ -116,7 +116,7 @@ svcudp_bufcreate(sock, sendsz, recvsz)
(void)bind(sock, (struct sockaddr *)&addr, len); (void)bind(sock, (struct sockaddr *)&addr, len);
} }
if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) { if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) {
perror("svcudp_create - cannot getsockname"); perror(_("svcudp_create - cannot getsockname"));
if (madesock) if (madesock)
(void)close(sock); (void)close(sock);
return ((SVCXPRT *)NULL); return ((SVCXPRT *)NULL);
@ -161,7 +161,7 @@ svcudp_stat(xprt)
SVCXPRT *xprt; SVCXPRT *xprt;
{ {
return (XPRT_IDLE); return (XPRT_IDLE);
} }
static bool_t static bool_t
@ -200,8 +200,8 @@ svcudp_recv(xprt, msg)
static bool_t static bool_t
svcudp_reply(xprt, msg) svcudp_reply(xprt, msg)
register SVCXPRT *xprt; register SVCXPRT *xprt;
struct rpc_msg *msg; struct rpc_msg *msg;
{ {
register struct svcudp_data *su = su_data(xprt); register struct svcudp_data *su = su_data(xprt);
register XDR *xdrs = &(su->su_xdrs); register XDR *xdrs = &(su->su_xdrs);
@ -279,7 +279,7 @@ svcudp_destroy(xprt)
(type *) mem_alloc((unsigned) (sizeof(type) * (size))) (type *) mem_alloc((unsigned) (sizeof(type) * (size)))
#define BZERO(addr, type, size) \ #define BZERO(addr, type, size) \
bzero((char *) addr, sizeof(type) * (int) (size)) bzero((char *) addr, sizeof(type) * (int) (size))
/* /*
* An entry in the cache * An entry in the cache
@ -302,7 +302,7 @@ struct cache_node {
/* /*
* Next node on the list, if there is a collision * Next node on the list, if there is a collision
*/ */
cache_ptr cache_next; cache_ptr cache_next;
}; };
@ -326,11 +326,11 @@ struct udp_cache {
* the hashing function * the hashing function
*/ */
#define CACHE_LOC(transp, xid) \ #define CACHE_LOC(transp, xid) \
(xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size)) (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
/* /*
* Enable use of the cache. * Enable use of the cache.
* Note: there is no disable. * Note: there is no disable.
*/ */
svcudp_enablecache(transp, size) svcudp_enablecache(transp, size)
@ -341,25 +341,25 @@ svcudp_enablecache(transp, size)
struct udp_cache *uc; struct udp_cache *uc;
if (su->su_cache != NULL) { if (su->su_cache != NULL) {
CACHE_PERROR("enablecache: cache already enabled"); CACHE_PERROR(_("enablecache: cache already enabled"));
return(0); return(0);
} }
uc = ALLOC(struct udp_cache, 1); uc = ALLOC(struct udp_cache, 1);
if (uc == NULL) { if (uc == NULL) {
CACHE_PERROR("enablecache: could not allocate cache"); CACHE_PERROR(_("enablecache: could not allocate cache"));
return(0); return(0);
} }
uc->uc_size = size; uc->uc_size = size;
uc->uc_nextvictim = 0; uc->uc_nextvictim = 0;
uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS); uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS);
if (uc->uc_entries == NULL) { if (uc->uc_entries == NULL) {
CACHE_PERROR("enablecache: could not allocate cache data"); CACHE_PERROR(_("enablecache: could not allocate cache data"));
return(0); return(0);
} }
BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS); BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS);
uc->uc_fifo = ALLOC(cache_ptr, size); uc->uc_fifo = ALLOC(cache_ptr, size);
if (uc->uc_fifo == NULL) { if (uc->uc_fifo == NULL) {
CACHE_PERROR("enablecache: could not allocate cache fifo"); CACHE_PERROR(_("enablecache: could not allocate cache fifo"));
return(0); return(0);
} }
BZERO(uc->uc_fifo, cache_ptr, size); BZERO(uc->uc_fifo, cache_ptr, size);
@ -374,9 +374,9 @@ svcudp_enablecache(transp, size)
static static
cache_set(xprt, replylen) cache_set(xprt, replylen)
SVCXPRT *xprt; SVCXPRT *xprt;
u_long replylen; u_long replylen;
{ {
register cache_ptr victim; register cache_ptr victim;
register cache_ptr *vicp; register cache_ptr *vicp;
register struct svcudp_data *su = su_data(xprt); register struct svcudp_data *su = su_data(xprt);
struct udp_cache *uc = (struct udp_cache *) su->su_cache; struct udp_cache *uc = (struct udp_cache *) su->su_cache;
@ -390,12 +390,12 @@ cache_set(xprt, replylen)
victim = uc->uc_fifo[uc->uc_nextvictim]; victim = uc->uc_fifo[uc->uc_nextvictim];
if (victim != NULL) { if (victim != NULL) {
loc = CACHE_LOC(xprt, victim->cache_xid); loc = CACHE_LOC(xprt, victim->cache_xid);
for (vicp = &uc->uc_entries[loc]; for (vicp = &uc->uc_entries[loc];
*vicp != NULL && *vicp != victim; *vicp != NULL && *vicp != victim;
vicp = &(*vicp)->cache_next) vicp = &(*vicp)->cache_next)
; ;
if (*vicp == NULL) { if (*vicp == NULL) {
CACHE_PERROR("cache_set: victim not found"); CACHE_PERROR(_("cache_set: victim not found"));
return; return;
} }
*vicp = victim->cache_next; /* remote from cache */ *vicp = victim->cache_next; /* remote from cache */
@ -426,7 +426,7 @@ cache_set(xprt, replylen)
victim->cache_prog = uc->uc_prog; victim->cache_prog = uc->uc_prog;
victim->cache_addr = uc->uc_addr; victim->cache_addr = uc->uc_addr;
loc = CACHE_LOC(xprt, victim->cache_xid); loc = CACHE_LOC(xprt, victim->cache_xid);
victim->cache_next = uc->uc_entries[loc]; victim->cache_next = uc->uc_entries[loc];
uc->uc_entries[loc] = victim; uc->uc_entries[loc] = victim;
uc->uc_fifo[uc->uc_nextvictim++] = victim; uc->uc_fifo[uc->uc_nextvictim++] = victim;
uc->uc_nextvictim %= uc->uc_size; uc->uc_nextvictim %= uc->uc_size;

View File

@ -132,7 +132,7 @@ char * argv[];
if (c != EOF || if (c != EOF ||
(optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n", _("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"),
argv[0], argv[0]); argv[0], argv[0]);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -224,9 +224,9 @@ char * argv[];
show(argv[i], t, TRUE); show(argv[i], t, TRUE);
} }
if (fflush(stdout) || ferror(stdout)) { if (fflush(stdout) || ferror(stdout)) {
(void) fprintf(stderr, "%s: Error writing standard output ", (void) fprintf(stderr, _("%s: Error writing standard output "),
argv[0]); argv[0]);
(void) perror("standard output"); (void) perror(_("standard output"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);

View File

@ -386,10 +386,10 @@ const char * const string;
** zic ... 2>&1 | error -t "*" -v ** zic ... 2>&1 | error -t "*" -v
** on BSD systems. ** on BSD systems.
*/ */
(void) fprintf(stderr, "\"%s\", line %d: %s", (void) fprintf(stderr, _("\"%s\", line %d: %s"),
filename, linenum, string); filename, linenum, string);
if (rfilename != NULL) if (rfilename != NULL)
(void) fprintf(stderr, " (rule from \"%s\", line %d)", (void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),
rfilename, rlinenum); rfilename, rlinenum);
(void) fprintf(stderr, "\n"); (void) fprintf(stderr, "\n");
++errors; ++errors;
@ -398,9 +398,9 @@ const char * const string;
static void static void
usage P((void)) usage P((void))
{ {
(void) fprintf(stderr, "%s: usage is %s \ (void) fprintf(stderr, _("%s: usage is %s \
[ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n\ [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n\
\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n", \t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"),
progname, progname); progname, progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -434,7 +434,7 @@ char * argv[];
directory = optarg; directory = optarg;
else { else {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: More than one -d option specified\n", _("%s: More than one -d option specified\n"),
progname); progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -444,7 +444,7 @@ char * argv[];
lcltime = optarg; lcltime = optarg;
else { else {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: More than one -l option specified\n", _("%s: More than one -l option specified\n"),
progname); progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -454,7 +454,7 @@ char * argv[];
psxrules = optarg; psxrules = optarg;
else { else {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: More than one -p option specified\n", _("%s: More than one -p option specified\n"),
progname); progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -464,7 +464,7 @@ char * argv[];
yitcommand = optarg; yitcommand = optarg;
else { else {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: More than one -y option specified\n", _("%s: More than one -y option specified\n"),
progname); progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -474,7 +474,7 @@ char * argv[];
leapsec = optarg; leapsec = optarg;
else { else {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: More than one -L option specified\n", _("%s: More than one -L option specified\n"),
progname); progname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -557,7 +557,7 @@ const char * const tofile;
if (mkdirs(toname) != 0) if (mkdirs(toname) != 0)
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
if (link(fromname, toname) != 0) { if (link(fromname, toname) != 0) {
(void) fprintf(stderr, "%s: Can't link from %s to ", (void) fprintf(stderr, _("%s: Can't link from %s to "),
progname, fromname); progname, fromname);
(void) perror(toname); (void) perror(toname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
@ -672,7 +672,7 @@ associate P((void))
** a '%s' in the format is a bad thing. ** a '%s' in the format is a bad thing.
*/ */
if (strchr(zp->z_format, '%') != 0) if (strchr(zp->z_format, '%') != 0)
error("%s in ruleless zone"); error(_("%s in ruleless zone"));
} }
} }
if (errors) if (errors)
@ -693,10 +693,10 @@ const char * name;
char buf[BUFSIZ]; char buf[BUFSIZ];
if (strcmp(name, "-") == 0) { if (strcmp(name, "-") == 0) {
name = "standard input"; name = _("standard input");
fp = stdin; fp = stdin;
} else if ((fp = fopen(name, "r")) == NULL) { } else if ((fp = fopen(name, "r")) == NULL) {
(void) fprintf(stderr, "%s: Can't open ", progname); (void) fprintf(stderr, _("%s: Can't open "), progname);
(void) perror(name); (void) perror(name);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -707,7 +707,7 @@ const char * name;
break; break;
cp = strchr(buf, '\n'); cp = strchr(buf, '\n');
if (cp == NULL) { if (cp == NULL) {
error("line too long"); error(_("line too long"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
*cp = '\0'; *cp = '\0';
@ -727,7 +727,7 @@ const char * name;
} else { } else {
lp = byword(fields[0], line_codes); lp = byword(fields[0], line_codes);
if (lp == NULL) if (lp == NULL)
error("input line of unknown type"); error(_("input line of unknown type"));
else switch ((int) (lp->l_value)) { else switch ((int) (lp->l_value)) {
case LC_RULE: case LC_RULE:
inrule(fields, nfields); inrule(fields, nfields);
@ -743,14 +743,14 @@ const char * name;
case LC_LEAP: case LC_LEAP:
if (name != leapsec) if (name != leapsec)
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: Leap line in non leap seconds file %s\n", _("%s: Leap line in non leap seconds file %s\n"),
progname, name); progname, name);
else inleap(fields, nfields); else inleap(fields, nfields);
wantcont = FALSE; wantcont = FALSE;
break; break;
default: /* "cannot happen" */ default: /* "cannot happen" */
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: panic: Invalid l_value %d\n", _("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value); progname, lp->l_value);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -758,17 +758,17 @@ const char * name;
ifree((char *) fields); ifree((char *) fields);
} }
if (ferror(fp)) { if (ferror(fp)) {
(void) fprintf(stderr, "%s: Error reading ", progname); (void) fprintf(stderr, _("%s: Error reading "), progname);
(void) perror(filename); (void) perror(filename);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
if (fp != stdin && fclose(fp)) { if (fp != stdin && fclose(fp)) {
(void) fprintf(stderr, "%s: Error closing ", progname); (void) fprintf(stderr, _("%s: Error closing "), progname);
(void) perror(filename); (void) perror(filename);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
if (wantcont) if (wantcont)
error("expected continuation line not found"); error(_("expected continuation line not found"));
} }
/* /*
@ -823,16 +823,16 @@ const int nfields;
static struct rule r; static struct rule r;
if (nfields != RULE_FIELDS) { if (nfields != RULE_FIELDS) {
error("wrong number of fields on Rule line"); error(_("wrong number of fields on Rule line"));
return; return;
} }
if (*fields[RF_NAME] == '\0') { if (*fields[RF_NAME] == '\0') {
error("nameless rule"); error(_("nameless rule"));
return; return;
} }
r.r_filename = filename; r.r_filename = filename;
r.r_linenum = linenum; r.r_linenum = linenum;
r.r_stdoff = gethms(fields[RF_STDOFF], "invalid saved time", TRUE); r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), TRUE);
rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND], rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND],
fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]); fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
r.r_name = ecpyalloc(fields[RF_NAME]); r.r_name = ecpyalloc(fields[RF_NAME]);
@ -851,13 +851,13 @@ const int nfields;
static char * buf; static char * buf;
if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) { if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) {
error("wrong number of fields on Zone line"); error(_("wrong number of fields on Zone line"));
return FALSE; return FALSE;
} }
if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) { if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) {
buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT))); buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT)));
(void) sprintf(buf, (void) sprintf(buf,
"\"Zone %s\" line and -l option are mutually exclusive", _("\"Zone %s\" line and -l option are mutually exclusive"),
TZDEFAULT); TZDEFAULT);
error(buf); error(buf);
return FALSE; return FALSE;
@ -865,7 +865,7 @@ const int nfields;
if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) { if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {
buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES))); buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES)));
(void) sprintf(buf, (void) sprintf(buf,
"\"Zone %s\" line and -p option are mutually exclusive", _("\"Zone %s\" line and -p option are mutually exclusive"),
TZDEFRULES); TZDEFRULES);
error(buf); error(buf);
return FALSE; return FALSE;
@ -877,7 +877,7 @@ const int nfields;
strlen(fields[ZF_NAME]) + strlen(fields[ZF_NAME]) +
strlen(zones[i].z_filename))); strlen(zones[i].z_filename)));
(void) sprintf(buf, (void) sprintf(buf,
"duplicate zone name %s (file \"%s\", line %d)", _("duplicate zone name %s (file \"%s\", line %d)"),
fields[ZF_NAME], fields[ZF_NAME],
zones[i].z_filename, zones[i].z_filename,
zones[i].z_linenum); zones[i].z_linenum);
@ -893,7 +893,7 @@ register char ** const fields;
const int nfields; const int nfields;
{ {
if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) { if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) {
error("wrong number of fields on Zone continuation line"); error(_("wrong number of fields on Zone continuation line"));
return FALSE; return FALSE;
} }
return inzsub(fields, nfields, TRUE); return inzsub(fields, nfields, TRUE);
@ -933,10 +933,10 @@ const int iscont;
} }
z.z_filename = filename; z.z_filename = filename;
z.z_linenum = linenum; z.z_linenum = linenum;
z.z_gmtoff = gethms(fields[i_gmtoff], "invalid GMT offset", TRUE); z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid GMT offset"), TRUE);
if ((cp = strchr(fields[i_format], '%')) != 0) { if ((cp = strchr(fields[i_format], '%')) != 0) {
if (*++cp != 's' || strchr(cp, '%') != 0) { if (*++cp != 's' || strchr(cp, '%') != 0) {
error("invalid abbreviation format"); error(_("invalid abbreviation format"));
return FALSE; return FALSE;
} }
} }
@ -962,8 +962,8 @@ const int iscont;
zones[nzones - 1].z_untiltime > min_time && zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time && zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) { zones[nzones - 1].z_untiltime >= z.z_untiltime) {
error("Zone continuation line end time is not \ error(_("Zone continuation line end time is \
after end time of previous line"); not after end time of previous line"));
return FALSE; return FALSE;
} }
} }
@ -990,7 +990,7 @@ const int nfields;
time_t t; time_t t;
if (nfields != LEAP_FIELDS) { if (nfields != LEAP_FIELDS) {
error("wrong number of fields on Leap line"); error(_("wrong number of fields on Leap line"));
return; return;
} }
dayoff = 0; dayoff = 0;
@ -999,7 +999,7 @@ const int nfields;
/* /*
* Leapin' Lizards! * Leapin' Lizards!
*/ */
error("invalid leaping year"); error(_("invalid leaping year"));
return; return;
} }
j = EPOCH_YEAR; j = EPOCH_YEAR;
@ -1014,7 +1014,7 @@ const int nfields;
dayoff = oadd(dayoff, eitol(i)); dayoff = oadd(dayoff, eitol(i));
} }
if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) { if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) {
error("invalid month name"); error(_("invalid month name"));
return; return;
} }
month = lp->l_value; month = lp->l_value;
@ -1027,12 +1027,12 @@ const int nfields;
cp = fields[LP_DAY]; cp = fields[LP_DAY];
if (sscanf(cp, scheck(cp, "%d"), &day) != 1 || if (sscanf(cp, scheck(cp, "%d"), &day) != 1 ||
day <= 0 || day > len_months[isleap(year)][month]) { day <= 0 || day > len_months[isleap(year)][month]) {
error("invalid day of month"); error(_("invalid day of month"));
return; return;
} }
dayoff = oadd(dayoff, eitol(day - 1)); dayoff = oadd(dayoff, eitol(day - 1));
if (dayoff < 0 && !tt_signed) { if (dayoff < 0 && !tt_signed) {
error("time before zero"); error(_("time before zero"));
return; return;
} }
t = (time_t) dayoff * SECSPERDAY; t = (time_t) dayoff * SECSPERDAY;
@ -1040,7 +1040,7 @@ const int nfields;
** Cheap overflow check. ** Cheap overflow check.
*/ */
if (t / SECSPERDAY != dayoff) { if (t / SECSPERDAY != dayoff) {
error("time overflow"); error(_("time overflow"));
return; return;
} }
tod = gethms(fields[LP_TIME], "invalid time of day", FALSE); tod = gethms(fields[LP_TIME], "invalid time of day", FALSE);
@ -1062,11 +1062,11 @@ const int nfields;
positive = TRUE; positive = TRUE;
count = 2; count = 2;
} else { } else {
error("illegal CORRECTION field on Leap line"); error(_("illegal CORRECTION field on Leap line"));
return; return;
} }
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) { if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
error("illegal Rolling/Stationary field on Leap line"); error(_("illegal Rolling/Stationary field on Leap line"));
return; return;
} }
leapadd(tadd(t, tod), positive, lp->l_value, count); leapadd(tadd(t, tod), positive, lp->l_value, count);
@ -1081,15 +1081,15 @@ const int nfields;
struct link l; struct link l;
if (nfields != LINK_FIELDS) { if (nfields != LINK_FIELDS) {
error("wrong number of fields on Link line"); error(_("wrong number of fields on Link line"));
return; return;
} }
if (*fields[LF_FROM] == '\0') { if (*fields[LF_FROM] == '\0') {
error("blank FROM field on Link line"); error(_("blank FROM field on Link line"));
return; return;
} }
if (*fields[LF_TO] == '\0') { if (*fields[LF_TO] == '\0') {
error("blank TO field on Link line"); error(_("blank TO field on Link line"));
return; return;
} }
l.l_filename = filename; l.l_filename = filename;
@ -1117,7 +1117,7 @@ const char * const timep;
register char * ep; register char * ep;
if ((lp = byword(monthp, mon_names)) == NULL) { if ((lp = byword(monthp, mon_names)) == NULL) {
error("invalid month name"); error(_("invalid month name"));
return; return;
} }
rp->r_month = lp->l_value; rp->r_month = lp->l_value;
@ -1161,11 +1161,11 @@ const char * const timep;
break; break;
default: /* "cannot happen" */ default: /* "cannot happen" */
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: panic: Invalid l_value %d\n", _("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value); progname, lp->l_value);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) { } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
error("invalid starting year"); error(_("invalid starting year"));
return; return;
} }
cp = hiyearp; cp = hiyearp;
@ -1181,22 +1181,22 @@ const char * const timep;
break; break;
default: /* "cannot happen" */ default: /* "cannot happen" */
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: panic: Invalid l_value %d\n", _("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value); progname, lp->l_value);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) { } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
error("invalid ending year"); error(_("invalid ending year"));
return; return;
} }
if (rp->r_loyear > rp->r_hiyear) { if (rp->r_loyear > rp->r_hiyear) {
error("starting year greater than ending year"); error(_("starting year greater than ending year"));
return; return;
} }
if (*typep == '\0') if (*typep == '\0')
rp->r_yrtype = NULL; rp->r_yrtype = NULL;
else { else {
if (rp->r_loyear == rp->r_hiyear) { if (rp->r_loyear == rp->r_hiyear) {
error("typed single year"); error(_("typed single year"));
return; return;
} }
rp->r_yrtype = ecpyalloc(typep); rp->r_yrtype = ecpyalloc(typep);
@ -1226,12 +1226,12 @@ const char * const timep;
if (rp->r_dycode != DC_DOM) { if (rp->r_dycode != DC_DOM) {
*ep++ = 0; *ep++ = 0;
if (*ep++ != '=') { if (*ep++ != '=') {
error("invalid day of month"); error(_("invalid day of month"));
ifree(dp); ifree(dp);
return; return;
} }
if ((lp = byword(dp, wday_names)) == NULL) { if ((lp = byword(dp, wday_names)) == NULL) {
error("invalid weekday name"); error(_("invalid weekday name"));
ifree(dp); ifree(dp);
return; return;
} }
@ -1240,7 +1240,7 @@ const char * const timep;
if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 || if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 ||
rp->r_dayofmonth <= 0 || rp->r_dayofmonth <= 0 ||
(rp->r_dayofmonth > len_months[1][rp->r_month])) { (rp->r_dayofmonth > len_months[1][rp->r_month])) {
error("invalid day of month"); error(_("invalid day of month"));
ifree(dp); ifree(dp);
return; return;
} }
@ -1287,7 +1287,8 @@ const char * const name;
if (mkdirs(fullname) != 0) if (mkdirs(fullname) != 0)
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
if ((fp = fopen(fullname, "wb")) == NULL) { if ((fp = fopen(fullname, "wb")) == NULL) {
(void) fprintf(stderr, "%s: Can't create ", progname); (void) fprintf(stderr, _("%s: Can't create "),
progname);
(void) perror(fullname); (void) perror(fullname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -1352,7 +1353,7 @@ const char * const name;
for (i = 0; i < typecnt; ++i) for (i = 0; i < typecnt; ++i)
(void) putc(ttisgmts[i], fp); (void) putc(ttisgmts[i], fp);
if (ferror(fp) || fclose(fp)) { if (ferror(fp) || fclose(fp)) {
(void) fprintf(stderr, "%s: Write error on ", progname); (void) fprintf(stderr, _("%s: Write error on "), progname);
(void) perror(fullname); (void) perror(fullname);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
@ -1570,7 +1571,7 @@ const int type;
if (timecnt == 0 && type == 0 && isdsts[0] == 0) if (timecnt == 0 && type == 0 && isdsts[0] == 0)
return; /* handled by default rule */ return; /* handled by default rule */
if (timecnt >= TZ_MAX_TIMES) { if (timecnt >= TZ_MAX_TIMES) {
error("too many transitions?!"); error(_("too many transitions?!"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
ats[timecnt] = starttime; ats[timecnt] = starttime;
@ -1604,7 +1605,7 @@ const int ttisgmt;
** many. ** many.
*/ */
if (typecnt >= TZ_MAX_TYPES) { if (typecnt >= TZ_MAX_TYPES) {
error("too many local time types"); error(_("too many local time types"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
gmtoffs[i] = gmtoff; gmtoffs[i] = gmtoff;
@ -1632,13 +1633,13 @@ int count;
register int i, j; register int i, j;
if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) { if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
error("too many leap seconds"); error(_("too many leap seconds"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
for (i = 0; i < leapcnt; ++i) for (i = 0; i < leapcnt; ++i)
if (t <= trans[i]) { if (t <= trans[i]) {
if (t == trans[i]) { if (t == trans[i]) {
error("repeated leap second moment"); error(_("repeated leap second moment"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
break; break;
@ -1688,8 +1689,8 @@ const char * const type;
return TRUE; return TRUE;
if (result == (1 << 8)) if (result == (1 << 8))
return FALSE; return FALSE;
error("Wild result from command execution"); error(_("Wild result from command execution"));
(void) fprintf(stderr, "%s: command was '%s', result was %d\n", (void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
progname, buf, result); progname, buf, result);
for ( ; ; ) for ( ; ; )
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
@ -1781,7 +1782,7 @@ register char * cp;
else while ((*dp = *cp++) != '"') else while ((*dp = *cp++) != '"')
if (*dp != '\0') if (*dp != '\0')
++dp; ++dp;
else error("Odd number of quotation marks"); else error(_("Odd number of quotation marks"));
} while (*cp != '\0' && *cp != '#' && } while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace(*cp))); (!isascii(*cp) || !isspace(*cp)));
if (isascii(*cp) && isspace(*cp)) if (isascii(*cp) && isspace(*cp))
@ -1801,7 +1802,7 @@ const long t2;
t = t1 + t2; t = t1 + t2;
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) { if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
error("time overflow"); error(_("time overflow"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
return t; return t;
@ -1820,7 +1821,7 @@ const long t2;
return min_time; return min_time;
t = t1 + t2; t = t1 + t2;
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) { if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
error("time overflow"); error(_("time overflow"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
return t; return t;
@ -1867,7 +1868,7 @@ register const int wantedy;
if (rp->r_dycode == DC_DOWLEQ) if (rp->r_dycode == DC_DOWLEQ)
--i; --i;
else { else {
error("use of 2/29 in non leap-year"); error(_("use of 2/29 in non leap-year"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
} }
@ -1901,7 +1902,7 @@ register const int wantedy;
--i; --i;
} }
if (i < 0 || i >= len_months[isleap(y)][m]) { if (i < 0 || i >= len_months[isleap(y)][m]) {
error("no day in month matches rule"); error(_("no day in month matches rule"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
} }
@ -1924,7 +1925,7 @@ const char * const string;
i = strlen(string) + 1; i = strlen(string) + 1;
if (charcnt + i > TZ_MAX_CHARS) { if (charcnt + i > TZ_MAX_CHARS) {
error("too many, or too long, time zone abbreviations"); error(_("too many, or too long, time zone abbreviations"));
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }
(void) strcpy(&chars[charcnt], string); (void) strcpy(&chars[charcnt], string);
@ -1959,7 +1960,7 @@ char * const argname;
*/ */
if (mkdir(name, 0755) != 0) { if (mkdir(name, 0755) != 0) {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: Can't create directory ", _("%s: Can't create directory "),
progname); progname);
(void) perror(name); (void) perror(name);
ifree(name); ifree(name);
@ -1981,7 +1982,7 @@ const int i;
l = i; l = i;
if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) { if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) {
(void) fprintf(stderr, (void) fprintf(stderr,
"%s: %d did not sign extend correctly\n", _("%s: %d did not sign extend correctly\n"),
progname, i); progname, i);
(void) exit(EXIT_FAILURE); (void) exit(EXIT_FAILURE);
} }