mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-20 01:40:26 +00: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:
parent
fbaad1494f
commit
cbd3dceb39
12
ChangeLog
12
ChangeLog
@ -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>
|
||||
|
||||
* misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio.
|
||||
|
@ -43,7 +43,7 @@ __assert_perror_fail (int errnum,
|
||||
#endif
|
||||
|
||||
/* 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 ? ": " : "",
|
||||
file, line,
|
||||
|
@ -45,7 +45,7 @@ DEFUN(__assert_fail, (assertion, file, line, function),
|
||||
#endif
|
||||
|
||||
/* 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 ? ": " : "",
|
||||
file, line,
|
||||
|
24
inet/rcmd.c
24
inet/rcmd.c
@ -83,7 +83,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
if (s < 0) {
|
||||
if (errno == EAGAIN)
|
||||
(void)fprintf(stderr,
|
||||
"rcmd: socket: All ports in use\n");
|
||||
_("rcmd: socket: All ports in use\n"));
|
||||
else
|
||||
(void)fprintf(stderr, "rcmd: socket: %s\n",
|
||||
strerror(errno));
|
||||
@ -109,13 +109,13 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
if (hp->h_addr_list[1] != NULL) {
|
||||
int oerrno = errno;
|
||||
|
||||
(void)fprintf(stderr, "connect to address %s: ",
|
||||
(void)fprintf(stderr, _("connect to address %s: "),
|
||||
inet_ntoa(sin.sin_addr));
|
||||
errno = oerrno;
|
||||
perror(0);
|
||||
hp->h_addr_list++;
|
||||
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));
|
||||
continue;
|
||||
}
|
||||
@ -138,7 +138,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
(void)snprintf(num, sizeof(num), "%d", lport);
|
||||
if (write(s, num, strlen(num)+1) != strlen(num)+1) {
|
||||
(void)fprintf(stderr,
|
||||
"rcmd: write (setting up stderr): %s\n",
|
||||
_("rcmd: write (setting up stderr): %s\n"),
|
||||
strerror(errno));
|
||||
(void)close(s2);
|
||||
goto bad;
|
||||
@ -151,11 +151,11 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
!FD_ISSET(s2, &reads)) {
|
||||
if (errno != 0)
|
||||
(void)fprintf(stderr,
|
||||
"rcmd: select (setting up stderr): %s\n",
|
||||
_("rcmd: select (setting up stderr): %s\n"),
|
||||
strerror(errno));
|
||||
else
|
||||
(void)fprintf(stderr,
|
||||
"select: protocol failure in circuit setup\n");
|
||||
_("select: protocol failure in circuit setup\n"));
|
||||
(void)close(s2);
|
||||
goto bad;
|
||||
}
|
||||
@ -173,7 +173,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
from.sin_port >= IPPORT_RESERVED ||
|
||||
from.sin_port < IPPORT_RESERVED / 2) {
|
||||
(void)fprintf(stderr,
|
||||
"socket: protocol failure in circuit setup.\n");
|
||||
_("socket: protocol failure in circuit setup.\n"));
|
||||
goto bad2;
|
||||
}
|
||||
}
|
||||
@ -318,15 +318,15 @@ again:
|
||||
*/
|
||||
cp = NULL;
|
||||
if (lstat(pbuf, &sbuf) < 0)
|
||||
cp = ".rhosts lstat failed";
|
||||
cp = _(".rhosts lstat failed");
|
||||
else if (!S_ISREG(sbuf.st_mode))
|
||||
cp = ".rhosts not regular file";
|
||||
cp = _(".rhosts not regular file");
|
||||
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)
|
||||
cp = "bad .rhosts owner";
|
||||
cp = _("bad .rhosts owner");
|
||||
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 (cp) {
|
||||
__rcmd_errstr = cp;
|
||||
|
@ -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.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -61,7 +61,7 @@ static CONST char *program;
|
||||
static void
|
||||
DEFUN_VOID(usage)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s variable_name [pathname]\n", program);
|
||||
fprintf (stderr, _("Usage: %s variable_name [pathname]\n"), program);
|
||||
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);
|
||||
}
|
||||
|
@ -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.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -37,7 +37,7 @@ DEFUN(print_grpname, (id, parens),
|
||||
return;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -59,7 +59,7 @@ DEFUN(print_pwdname, (id, parens),
|
||||
return;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -109,7 +109,7 @@ DEFUN(main, (argc, argv), int argc AND char **argv)
|
||||
|
||||
if (error || argc != optind)
|
||||
{
|
||||
fputs("Usage: id [-gurn]\n", stderr);
|
||||
fputs(_("Usage: id [-gurn]\n"), stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -69,11 +69,11 @@ static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
const char *h_errlist[] = {
|
||||
"Resolver Error 0 (no error)",
|
||||
"Unknown host", /* 1 HOST_NOT_FOUND */
|
||||
"Host name lookup failure", /* 2 TRY_AGAIN */
|
||||
"Unknown server error", /* 3 NO_RECOVERY */
|
||||
"No address associated with name", /* 4 NO_ADDRESS */
|
||||
N_("Resolver Error 0 (no error)"),
|
||||
N_("Unknown host"), /* 1 HOST_NOT_FOUND */
|
||||
N_("Host name lookup failure"), /* 2 TRY_AGAIN */
|
||||
N_("Unknown server error"), /* 3 NO_RECOVERY */
|
||||
N_("No address associated with name"), /* 4 NO_ADDRESS */
|
||||
};
|
||||
int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
|
||||
|
||||
@ -111,8 +111,8 @@ hstrerror(err)
|
||||
int err;
|
||||
{
|
||||
if (err < 0)
|
||||
return ("Resolver internal error");
|
||||
return _("Resolver internal error");
|
||||
else if (err < h_nerr)
|
||||
return (h_errlist[err]);
|
||||
return ("Unknown resolver error");
|
||||
return _(h_errlist[err]);
|
||||
return _("Unknown resolver error");
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ marshal_new_auth(auth)
|
||||
xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
|
||||
if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
|
||||
(! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {
|
||||
perror("auth_none.c - Fatal marshalling problem");
|
||||
perror(_("auth_none.c - Fatal marshalling problem"));
|
||||
} else {
|
||||
au->au_mpos = XDR_GETPOS(xdrs);
|
||||
}
|
||||
|
@ -109,20 +109,20 @@ clnt_sperror(rpch, s)
|
||||
|
||||
case RPC_VERSMISMATCH:
|
||||
(void) sprintf(str,
|
||||
"; low version = %lu, high version = %lu",
|
||||
_("; low version = %lu, high version = %lu"),
|
||||
e.re_vers.low, e.re_vers.high);
|
||||
str += strlen(str);
|
||||
break;
|
||||
|
||||
case RPC_AUTHERROR:
|
||||
err = auth_errmsg(e.re_why);
|
||||
(void) sprintf(str,"; why = ");
|
||||
(void) sprintf(str,_("; why = "));
|
||||
str += strlen(str);
|
||||
if (err != NULL) {
|
||||
(void) sprintf(str, "%s",err);
|
||||
} else {
|
||||
(void) sprintf(str,
|
||||
"(unknown authentication error - %d)",
|
||||
_("(unknown authentication error - %d)"),
|
||||
(int) e.re_why);
|
||||
}
|
||||
str += strlen(str);
|
||||
@ -130,7 +130,7 @@ clnt_sperror(rpch, s)
|
||||
|
||||
case RPC_PROGVERSMISMATCH:
|
||||
(void) sprintf(str,
|
||||
"; low version = %lu, high version = %lu",
|
||||
_("; low version = %lu, high version = %lu"),
|
||||
e.re_vers.low, e.re_vers.high);
|
||||
str += strlen(str);
|
||||
break;
|
||||
@ -162,41 +162,41 @@ struct rpc_errtab {
|
||||
|
||||
static struct rpc_errtab rpc_errlist[] = {
|
||||
{ RPC_SUCCESS,
|
||||
"RPC: Success" },
|
||||
N_("RPC: Success") },
|
||||
{ RPC_CANTENCODEARGS,
|
||||
"RPC: Can't encode arguments" },
|
||||
N_("RPC: Can't encode arguments") },
|
||||
{ RPC_CANTDECODERES,
|
||||
"RPC: Can't decode result" },
|
||||
N_("RPC: Can't decode result") },
|
||||
{ RPC_CANTSEND,
|
||||
"RPC: Unable to send" },
|
||||
N_("RPC: Unable to send") },
|
||||
{ RPC_CANTRECV,
|
||||
"RPC: Unable to receive" },
|
||||
N_("RPC: Unable to receive") },
|
||||
{ RPC_TIMEDOUT,
|
||||
"RPC: Timed out" },
|
||||
N_("RPC: Timed out") },
|
||||
{ RPC_VERSMISMATCH,
|
||||
"RPC: Incompatible versions of RPC" },
|
||||
N_("RPC: Incompatible versions of RPC") },
|
||||
{ RPC_AUTHERROR,
|
||||
"RPC: Authentication error" },
|
||||
N_("RPC: Authentication error") },
|
||||
{ RPC_PROGUNAVAIL,
|
||||
"RPC: Program unavailable" },
|
||||
N_("RPC: Program unavailable") },
|
||||
{ RPC_PROGVERSMISMATCH,
|
||||
"RPC: Program/version mismatch" },
|
||||
N_("RPC: Program/version mismatch") },
|
||||
{ RPC_PROCUNAVAIL,
|
||||
"RPC: Procedure unavailable" },
|
||||
N_("RPC: Procedure unavailable") },
|
||||
{ RPC_CANTDECODEARGS,
|
||||
"RPC: Server can't decode arguments" },
|
||||
N_("RPC: Server can't decode arguments") },
|
||||
{ RPC_SYSTEMERROR,
|
||||
"RPC: Remote system error" },
|
||||
N_("RPC: Remote system error") },
|
||||
{ RPC_UNKNOWNHOST,
|
||||
"RPC: Unknown host" },
|
||||
N_("RPC: Unknown host") },
|
||||
{ RPC_UNKNOWNPROTO,
|
||||
"RPC: Unknown protocol" },
|
||||
N_("RPC: Unknown protocol") },
|
||||
{ RPC_PMAPFAILURE,
|
||||
"RPC: Port mapper failure" },
|
||||
N_("RPC: Port mapper failure") },
|
||||
{ RPC_PROGNOTREGISTERED,
|
||||
"RPC: Program not registered"},
|
||||
N_("RPC: Program not registered") },
|
||||
{ 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++) {
|
||||
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
|
||||
@ -251,7 +251,7 @@ clnt_spcreateerror(s)
|
||||
(void) strcat(str,
|
||||
sys_errlist[rpc_createerr.cf_error.re_errno]);
|
||||
else
|
||||
(void) sprintf(&str[strlen(str)], "Error %d",
|
||||
(void) sprintf(&str[strlen(str)], _("Error %d"),
|
||||
rpc_createerr.cf_error.re_errno);
|
||||
break;
|
||||
}
|
||||
@ -273,21 +273,21 @@ struct auth_errtab {
|
||||
|
||||
static struct auth_errtab auth_errlist[] = {
|
||||
{ AUTH_OK,
|
||||
"Authentication OK" },
|
||||
N_("Authentication OK") },
|
||||
{ AUTH_BADCRED,
|
||||
"Invalid client credential" },
|
||||
N_("Invalid client credential") },
|
||||
{ AUTH_REJECTEDCRED,
|
||||
"Server rejected credential" },
|
||||
N_("Server rejected credential") },
|
||||
{ AUTH_BADVERF,
|
||||
"Invalid client verifier" },
|
||||
N_("Invalid client verifier") },
|
||||
{ AUTH_REJECTEDVERF,
|
||||
"Server rejected verifier" },
|
||||
N_("Server rejected verifier") },
|
||||
{ AUTH_TOOWEAK,
|
||||
"Client credential too weak" },
|
||||
N_("Client credential too weak") },
|
||||
{ AUTH_INVALIDRESP,
|
||||
"Invalid server verifier" },
|
||||
N_("Invalid server verifier") },
|
||||
{ AUTH_FAILED,
|
||||
"Failed (unspecified error)" },
|
||||
N_("Failed (unspecified error)") },
|
||||
};
|
||||
|
||||
static char *
|
||||
@ -298,7 +298,7 @@ auth_errmsg(stat)
|
||||
|
||||
for (i = 0; i < sizeof(auth_errlist)/sizeof(struct auth_errtab); i++) {
|
||||
if (auth_errlist[i].status == stat) {
|
||||
return(auth_errlist[i].message);
|
||||
return _(auth_errlist[i].message);
|
||||
}
|
||||
}
|
||||
return(NULL);
|
||||
|
@ -103,7 +103,7 @@ clntraw_create(prog, vers)
|
||||
call_msg.rm_call.cb_vers = vers;
|
||||
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
|
||||
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);
|
||||
XDR_DESTROY(xdrs);
|
||||
|
@ -69,7 +69,8 @@ get_myaddress(addr)
|
||||
ifc.ifc_len = sizeof (buf);
|
||||
ifc.ifc_buf = buf;
|
||||
if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
|
||||
perror("get_myaddress: ioctl (get interface configuration)");
|
||||
perror(
|
||||
_("get_myaddress: ioctl (get interface configuration)"));
|
||||
exit(1);
|
||||
}
|
||||
ifr = ifc.ifc_req;
|
||||
|
@ -76,7 +76,7 @@ pmap_set(program, version, protocol, port)
|
||||
parms.pm_port = port;
|
||||
if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, &parms, xdr_bool, &rslt,
|
||||
tottimeout) != RPC_SUCCESS) {
|
||||
clnt_perror(client, "Cannot register service");
|
||||
clnt_perror(client, _("Cannot register service"));
|
||||
return (FALSE);
|
||||
}
|
||||
CLNT_DESTROY(client);
|
||||
|
@ -174,14 +174,14 @@ getbroadcastnets(addrs, sock, buf)
|
||||
ifc.ifc_len = UDPMSGSIZE;
|
||||
ifc.ifc_buf = buf;
|
||||
if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0) {
|
||||
perror("broadcast: ioctl (get interface configuration)");
|
||||
perror(_("broadcast: ioctl (get interface configuration)"));
|
||||
return (0);
|
||||
}
|
||||
ifr = ifc.ifc_req;
|
||||
for (i = 0, n = ifc.ifc_len/sizeof (struct ifreq); n > 0; n--, ifr++) {
|
||||
ifreq = *ifr;
|
||||
if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
|
||||
perror("broadcast: ioctl (get interface flags)");
|
||||
perror(_("broadcast: ioctl (get interface flags)"));
|
||||
continue;
|
||||
}
|
||||
if ((ifreq.ifr_flags & IFF_BROADCAST) &&
|
||||
@ -251,13 +251,13 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
* preserialize the arguments into a send buffer.
|
||||
*/
|
||||
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;
|
||||
goto done_broad;
|
||||
}
|
||||
#ifdef SO_BROADCAST
|
||||
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;
|
||||
goto done_broad;
|
||||
}
|
||||
@ -309,7 +309,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
if (sendto(sock, outbuf, outlen, 0,
|
||||
(struct sockaddr *)&baddr,
|
||||
sizeof (struct sockaddr)) != outlen) {
|
||||
perror("Cannot send broadcast packet");
|
||||
perror(_("Cannot send broadcast packet"));
|
||||
stat = RPC_CANTSEND;
|
||||
goto done_broad;
|
||||
}
|
||||
@ -333,7 +333,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
case -1: /* some kind of error */
|
||||
if (errno == EINTR)
|
||||
goto recv_again;
|
||||
perror("Broadcast select problem");
|
||||
perror(_("Broadcast select problem"));
|
||||
stat = RPC_CANTRECV;
|
||||
goto done_broad;
|
||||
|
||||
@ -345,7 +345,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
if (inlen < 0) {
|
||||
if (errno == EINTR)
|
||||
goto try_again;
|
||||
perror("Cannot receive reply to broadcast");
|
||||
perror(_("Cannot receive reply to broadcast"));
|
||||
stat = RPC_CANTRECV;
|
||||
goto done_broad;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ main()
|
||||
}
|
||||
#endif
|
||||
if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
|
||||
perror("portmap cannot create socket");
|
||||
perror(_("portmap cannot create socket"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -92,12 +92,12 @@ main()
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_port = htons(PMAPPORT);
|
||||
if (bind(sock, (struct sockaddr *)&addr, len) != 0) {
|
||||
perror("portmap cannot bind");
|
||||
perror(_("portmap cannot bind"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
/* make an entry for ourself */
|
||||
@ -110,16 +110,16 @@ main()
|
||||
pmaplist = pml;
|
||||
|
||||
if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
|
||||
perror("portmap cannot create socket");
|
||||
perror(_("portmap cannot create socket"));
|
||||
exit(1);
|
||||
}
|
||||
if (bind(sock, (struct sockaddr *)&addr, len) != 0) {
|
||||
perror("portmap cannot bind");
|
||||
perror(_("portmap cannot bind"));
|
||||
exit(1);
|
||||
}
|
||||
if ((xprt = svctcp_create(sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE))
|
||||
== (SVCXPRT *)NULL) {
|
||||
fprintf(stderr, "couldn't do tcp_create\n");
|
||||
fprintf(stderr, _("couldn't do tcp_create\n"));
|
||||
exit(1);
|
||||
}
|
||||
/* make an entry for ourself */
|
||||
@ -135,7 +135,7 @@ main()
|
||||
|
||||
(void)signal(SIGCHLD, reap);
|
||||
svc_run();
|
||||
fprintf(stderr, "run_svc returned unexpectedly\n");
|
||||
fprintf(stderr, _("run_svc returned unexpectedly\n"));
|
||||
abort();
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ callit(rqstp, xprt)
|
||||
*/
|
||||
if ((pid = fork()) != 0) {
|
||||
if (debugging && (pid < 0)) {
|
||||
fprintf(stderr, "portmap CALLIT: cannot fork.\n");
|
||||
fprintf(stderr, _("portmap CALLIT: cannot fork.\n"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -72,12 +72,12 @@ main(argc, argv)
|
||||
|
||||
if (!parseargs(argc, argv, &cmd)) {
|
||||
f_print(stderr,
|
||||
"usage: %s infile\n", cmdname);
|
||||
_("usage: %s infile\n"), cmdname);
|
||||
f_print(stderr,
|
||||
" %s [-c | -h | -l | -m] [-o outfile] [infile]\n",
|
||||
_(" %s [-c | -h | -l | -m] [-o outfile] [infile]\n"),
|
||||
cmdname);
|
||||
f_print(stderr,
|
||||
" %s [-s udp|tcp]* [-o outfile] [infile]\n",
|
||||
_(" %s [-s udp|tcp]* [-o outfile] [infile]\n"),
|
||||
cmdname);
|
||||
exit(1);
|
||||
}
|
||||
@ -140,13 +140,13 @@ open_output(infile, outfile)
|
||||
return;
|
||||
}
|
||||
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);
|
||||
crash();
|
||||
}
|
||||
fout = fopen(outfile, "w");
|
||||
if (fout == NULL) {
|
||||
f_print(stderr, "%s: unable to open ", cmdname);
|
||||
f_print(stderr, _("%s: unable to open "), cmdname);
|
||||
perror(outfile);
|
||||
crash();
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ get_definition()
|
||||
return (NULL);
|
||||
break;
|
||||
default:
|
||||
error("definition keyword expected");
|
||||
error(_("definition keyword expected"));
|
||||
}
|
||||
scan(TOK_SEMICOLON, &tok);
|
||||
isdefined(defp);
|
||||
@ -143,7 +143,7 @@ def_program(defp)
|
||||
plist = ALLOC(proc_list);
|
||||
get_type(&plist->res_prefix, &plist->res_type, DEF_PROGRAM);
|
||||
if (streq(plist->res_type, "opaque")) {
|
||||
error("illegal result type");
|
||||
error(_("illegal result type"));
|
||||
}
|
||||
scan(TOK_IDENT, &tok);
|
||||
plist->proc_name = tok.str;
|
||||
@ -302,7 +302,7 @@ get_declaration(dec, dkind)
|
||||
dec->name = tok.str;
|
||||
if (peekscan(TOK_LBRACKET, &tok)) {
|
||||
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;
|
||||
scan_num(&tok);
|
||||
@ -310,7 +310,7 @@ get_declaration(dec, dkind)
|
||||
scan(TOK_RBRACKET, &tok);
|
||||
} else if (peekscan(TOK_LANGLE, &tok)) {
|
||||
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;
|
||||
if (peekscan(TOK_RANGLE, &tok)) {
|
||||
@ -323,11 +323,11 @@ get_declaration(dec, dkind)
|
||||
}
|
||||
if (streq(dec->type, "opaque")) {
|
||||
if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) {
|
||||
error("array declaration expected");
|
||||
error(_("array declaration expected"));
|
||||
}
|
||||
} else if (streq(dec->type, "string")) {
|
||||
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;
|
||||
case TOK_VOID:
|
||||
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;
|
||||
break;
|
||||
@ -381,7 +381,7 @@ get_type(prefixp, typep, dkind)
|
||||
*typep = tok.str;
|
||||
break;
|
||||
default:
|
||||
error("expected type specifier");
|
||||
error(_("expected type specifier"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ scan_num(tokp)
|
||||
case TOK_IDENT:
|
||||
break;
|
||||
default:
|
||||
error("constant or identifier expected");
|
||||
error(_("constant or identifier expected"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ get_token(tokp)
|
||||
char buf[100];
|
||||
char *p;
|
||||
|
||||
s_print(buf, "illegal character in file: ");
|
||||
s_print(buf, _("illegal character in file: "));
|
||||
p = buf + strlen(buf);
|
||||
if (isprint(*where)) {
|
||||
s_print(p, "%c", *where);
|
||||
@ -316,7 +316,7 @@ findstrconst(str, val)
|
||||
*p++;
|
||||
} while (*p && *p != '"');
|
||||
if (*p == 0) {
|
||||
error("unterminated string constant");
|
||||
error(_("unterminated string constant"));
|
||||
}
|
||||
p++;
|
||||
size = p - *str;
|
||||
@ -453,7 +453,7 @@ docppline(line, lineno, fname)
|
||||
line++;
|
||||
}
|
||||
if (*line != '"') {
|
||||
error("preprocessor error");
|
||||
error(_("preprocessor error"));
|
||||
}
|
||||
line++;
|
||||
p = file = alloc(strlen(line) + 1);
|
||||
@ -461,7 +461,7 @@ docppline(line, lineno, fname)
|
||||
*p++ = *line++;
|
||||
}
|
||||
if (*line == 0) {
|
||||
error("preprocessor error");
|
||||
error(_("preprocessor error"));
|
||||
}
|
||||
*p = 0;
|
||||
if (*file == 0) {
|
||||
|
@ -255,7 +255,7 @@ error(msg)
|
||||
char *msg;
|
||||
{
|
||||
printwhere();
|
||||
f_print(stderr, "%s, line %d: ", infilename, linenum);
|
||||
f_print(stderr, _("%s, line %d: "), infilename, linenum);
|
||||
f_print(stderr, "%s\n", msg);
|
||||
crash();
|
||||
}
|
||||
@ -282,7 +282,7 @@ record_open(file)
|
||||
if (nfiles < NFILES) {
|
||||
outfiles[nfiles++] = file;
|
||||
} else {
|
||||
f_print(stderr, "too many files!\n");
|
||||
f_print(stderr, _("too many files!\n"));
|
||||
crash();
|
||||
}
|
||||
}
|
||||
@ -297,7 +297,7 @@ void
|
||||
expected1(exp1)
|
||||
tok_kind exp1;
|
||||
{
|
||||
s_print(expectbuf, "expected '%s'",
|
||||
s_print(expectbuf, _("expected '%s'"),
|
||||
toktostr(exp1));
|
||||
error(expectbuf);
|
||||
}
|
||||
@ -309,7 +309,7 @@ void
|
||||
expected2(exp1, exp2)
|
||||
tok_kind exp1, exp2;
|
||||
{
|
||||
s_print(expectbuf, "expected '%s' or '%s'",
|
||||
s_print(expectbuf, _("expected '%s' or '%s'"),
|
||||
toktostr(exp1),
|
||||
toktostr(exp2));
|
||||
error(expectbuf);
|
||||
@ -322,7 +322,7 @@ void
|
||||
expected3(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(exp2),
|
||||
toktostr(exp3));
|
||||
|
@ -219,7 +219,7 @@ udpping(portnum, argc, argv)
|
||||
if ((client = clntudp_create(&addr, prognum, (u_long)0,
|
||||
to, &sock)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu is not available\n",
|
||||
printf(_("program %lu is not available\n"),
|
||||
prognum);
|
||||
exit(1);
|
||||
}
|
||||
@ -242,7 +242,7 @@ udpping(portnum, argc, argv)
|
||||
if ((client = clntudp_create(&addr, prognum, MAX_VERS,
|
||||
to, &sock)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, MAX_VERS);
|
||||
exit(1);
|
||||
}
|
||||
@ -279,7 +279,7 @@ udpping(portnum, argc, argv)
|
||||
if ((client = clntudp_create(&addr, prognum, vers,
|
||||
to, &sock)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, vers);
|
||||
exit(1);
|
||||
}
|
||||
@ -347,7 +347,7 @@ tcpping(portnum, argc, argv)
|
||||
if ((client = clnttcp_create(&addr, prognum, MIN_VERS,
|
||||
&sock, 0, 0)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu is not available\n",
|
||||
printf(_("program %lu is not available\n"),
|
||||
prognum);
|
||||
exit(1);
|
||||
}
|
||||
@ -368,7 +368,7 @@ tcpping(portnum, argc, argv)
|
||||
if ((client = clnttcp_create(&addr, prognum, MAX_VERS,
|
||||
&sock, 0, 0)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, MAX_VERS);
|
||||
exit(1);
|
||||
}
|
||||
@ -405,7 +405,7 @@ tcpping(portnum, argc, argv)
|
||||
if ((client = clnttcp_create(&addr, prognum, vers,
|
||||
&sock, 0, 0)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, vers);
|
||||
exit(1);
|
||||
}
|
||||
@ -426,7 +426,7 @@ tcpping(portnum, argc, argv)
|
||||
if ((client = clnttcp_create(&addr, prognum, vers, &sock,
|
||||
0, 0)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, vers);
|
||||
exit(1);
|
||||
}
|
||||
@ -459,11 +459,11 @@ pstatus(client, prognum, vers)
|
||||
clnt_geterr(client, &rpcerr);
|
||||
if (rpcerr.re_status != RPC_SUCCESS) {
|
||||
clnt_perror(client, "rpcinfo");
|
||||
printf("program %lu version %lu is not available\n",
|
||||
printf(_("program %lu version %lu is not available\n"),
|
||||
prognum, vers);
|
||||
return (-1);
|
||||
} else {
|
||||
printf("program %lu version %lu ready and waiting\n",
|
||||
printf(_("program %lu version %lu ready and waiting\n"),
|
||||
prognum, vers);
|
||||
return (0);
|
||||
}
|
||||
@ -502,19 +502,19 @@ pmapdump(argc, argv)
|
||||
server_addr.sin_port = htons(PMAPPORT);
|
||||
if ((client = clnttcp_create(&server_addr, PMAPPROG,
|
||||
PMAPVERS, &socket, 50, 500)) == NULL) {
|
||||
clnt_pcreateerror("rpcinfo: can't contact portmapper");
|
||||
clnt_pcreateerror(_("rpcinfo: can't contact portmapper"));
|
||||
exit(1);
|
||||
}
|
||||
if (clnt_call(client, PMAPPROC_DUMP, xdr_void, NULL,
|
||||
xdr_pmaplist, &head, minutetimeout) != RPC_SUCCESS) {
|
||||
fprintf(stderr, "rpcinfo: can't contact portmapper: ");
|
||||
fprintf(stderr, _("rpcinfo: can't contact portmapper: "));
|
||||
clnt_perror(client, "rpcinfo");
|
||||
exit(1);
|
||||
}
|
||||
if (head == NULL) {
|
||||
printf("No remote programs registered.\n");
|
||||
printf(_("No remote programs registered.\n"));
|
||||
} else {
|
||||
printf(" program vers proto port\n");
|
||||
printf(_(" program vers proto port\n"));
|
||||
for (; head != NULL; head = head->pml_next) {
|
||||
printf("%10ld%5ld",
|
||||
head->pml_map.pm_prog,
|
||||
@ -552,7 +552,7 @@ reply_proc(res, who)
|
||||
hp = gethostbyaddr((char *) &who->sin_addr, sizeof who->sin_addr,
|
||||
AF_INET);
|
||||
printf("%s %s\n", inet_ntoa(who->sin_addr),
|
||||
(hp == NULL) ? "(unknown)" : hp->h_name);
|
||||
(hp == NULL) ? _("(unknown)") : hp->h_name);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ brdcst(argc, argv)
|
||||
rpc_stat = clnt_broadcast(prognum, vers, NULLPROC, xdr_void,
|
||||
(char *)NULL, xdr_void, (char *)NULL, reply_proc);
|
||||
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));
|
||||
exit(1);
|
||||
}
|
||||
@ -597,7 +597,7 @@ deletereg(argc, argv)
|
||||
prog_num = getprognum(argv[0]);
|
||||
version_num = getvers(argv[1]);
|
||||
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]) ;
|
||||
exit(1) ;
|
||||
}
|
||||
@ -606,11 +606,11 @@ deletereg(argc, argv)
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n");
|
||||
fprintf(stderr, " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n");
|
||||
fprintf(stderr, " rpcinfo -p [ host ]\n");
|
||||
fprintf(stderr, " rpcinfo -b prognum versnum\n");
|
||||
fprintf(stderr, " rpcinfo -d 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 -p [ host ]\n"));
|
||||
fprintf(stderr, _(" rpcinfo -b prognum versnum\n"));
|
||||
fprintf(stderr, _(" rpcinfo -d prognum versnum\n")) ;
|
||||
}
|
||||
|
||||
static u_long
|
||||
@ -623,7 +623,7 @@ getprognum(arg)
|
||||
if (isalpha(*arg)) {
|
||||
rpc = getrpcbyname(arg);
|
||||
if (rpc == NULL) {
|
||||
fprintf(stderr, "rpcinfo: %s is unknown service\n",
|
||||
fprintf(stderr, _("rpcinfo: %s is unknown service\n"),
|
||||
arg);
|
||||
exit(1);
|
||||
}
|
||||
@ -656,7 +656,8 @@ get_inet_address(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 ((hp = gethostbyname(host)) == NULL) {
|
||||
fprintf(stderr, "rpcinfo: %s is unknown host\n", host);
|
||||
fprintf(stderr, _("rpcinfo: %s is unknown host\n"),
|
||||
host);
|
||||
exit(1);
|
||||
}
|
||||
bcopy(hp->h_addr, (char *)&addr->sin_addr, hp->h_length);
|
||||
|
@ -61,26 +61,26 @@ registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
|
||||
|
||||
if (procnum == NULLPROC) {
|
||||
(void) fprintf(stderr,
|
||||
"can't reassign procedure number %d\n", NULLPROC);
|
||||
_("can't reassign procedure number %d\n"), NULLPROC);
|
||||
return (-1);
|
||||
}
|
||||
if (transp == 0) {
|
||||
transp = svcudp_create(RPC_ANYSOCK);
|
||||
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);
|
||||
}
|
||||
}
|
||||
(void) pmap_unset((u_long)prognum, (u_long)versnum);
|
||||
if (!svc_register(transp, (u_long)prognum, (u_long)versnum,
|
||||
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);
|
||||
return (-1);
|
||||
}
|
||||
pl = (struct proglst *)malloc(sizeof(struct proglst));
|
||||
if (pl == NULL) {
|
||||
(void) fprintf(stderr, "registerrpc: out of memory\n");
|
||||
(void) fprintf(stderr, _("registerrpc: out of memory\n"));
|
||||
return (-1);
|
||||
}
|
||||
pl->p_progname = progname;
|
||||
@ -129,7 +129,7 @@ universal(rqstp, transp)
|
||||
return;
|
||||
if (!svc_sendreply(transp, pl->p_outproc, outdata)) {
|
||||
(void) fprintf(stderr,
|
||||
"trouble replying to prog %d\n",
|
||||
_("trouble replying to prog %d\n"),
|
||||
pl->p_prognum);
|
||||
exit(1);
|
||||
}
|
||||
@ -137,7 +137,7 @@ universal(rqstp, transp)
|
||||
(void)svc_freeargs(transp, pl->p_inproc, xdrbuf);
|
||||
return;
|
||||
}
|
||||
(void) fprintf(stderr, "never registered prog %d\n", prog);
|
||||
(void) fprintf(stderr, _("never registered prog %d\n"), prog);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ svctcp_create(sock, sendsize, recvsize)
|
||||
|
||||
if (sock == RPC_ANYSOCK) {
|
||||
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);
|
||||
}
|
||||
madesock = TRUE;
|
||||
@ -144,21 +144,21 @@ svctcp_create(sock, sendsize, recvsize)
|
||||
}
|
||||
if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) ||
|
||||
(listen(sock, 2) != 0)) {
|
||||
perror("svctcp_.c - cannot getsockname or listen");
|
||||
perror(_("svctcp_.c - cannot getsockname or listen"));
|
||||
if (madesock)
|
||||
(void)close(sock);
|
||||
return ((SVCXPRT *)NULL);
|
||||
}
|
||||
r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r));
|
||||
if (r == NULL) {
|
||||
(void) fprintf(stderr, "svctcp_create: out of memory\n");
|
||||
(void) fprintf(stderr, _("svctcp_create: out of memory\n"));
|
||||
return (NULL);
|
||||
}
|
||||
r->sendsize = sendsize;
|
||||
r->recvsize = recvsize;
|
||||
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
|
||||
if (xprt == NULL) {
|
||||
(void) fprintf(stderr, "svctcp_create: out of memory\n");
|
||||
(void) fprintf(stderr, _("svctcp_create: out of memory\n"));
|
||||
return (NULL);
|
||||
}
|
||||
xprt->xp_p2 = NULL;
|
||||
@ -196,12 +196,12 @@ makefd_xprt(fd, sendsize, recvsize)
|
||||
|
||||
xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
|
||||
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;
|
||||
}
|
||||
cd = (struct tcp_conn *)mem_alloc(sizeof(struct tcp_conn));
|
||||
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));
|
||||
xprt = (SVCXPRT *)NULL;
|
||||
goto done;
|
||||
|
@ -104,7 +104,7 @@ svcudp_bufcreate(sock, sendsz, recvsz)
|
||||
|
||||
if (sock == RPC_ANYSOCK) {
|
||||
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);
|
||||
}
|
||||
madesock = TRUE;
|
||||
@ -116,7 +116,7 @@ svcudp_bufcreate(sock, sendsz, recvsz)
|
||||
(void)bind(sock, (struct sockaddr *)&addr, len);
|
||||
}
|
||||
if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) {
|
||||
perror("svcudp_create - cannot getsockname");
|
||||
perror(_("svcudp_create - cannot getsockname"));
|
||||
if (madesock)
|
||||
(void)close(sock);
|
||||
return ((SVCXPRT *)NULL);
|
||||
@ -341,25 +341,25 @@ svcudp_enablecache(transp, size)
|
||||
struct udp_cache *uc;
|
||||
|
||||
if (su->su_cache != NULL) {
|
||||
CACHE_PERROR("enablecache: cache already enabled");
|
||||
CACHE_PERROR(_("enablecache: cache already enabled"));
|
||||
return(0);
|
||||
}
|
||||
uc = ALLOC(struct udp_cache, 1);
|
||||
if (uc == NULL) {
|
||||
CACHE_PERROR("enablecache: could not allocate cache");
|
||||
CACHE_PERROR(_("enablecache: could not allocate cache"));
|
||||
return(0);
|
||||
}
|
||||
uc->uc_size = size;
|
||||
uc->uc_nextvictim = 0;
|
||||
uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS);
|
||||
if (uc->uc_entries == NULL) {
|
||||
CACHE_PERROR("enablecache: could not allocate cache data");
|
||||
CACHE_PERROR(_("enablecache: could not allocate cache data"));
|
||||
return(0);
|
||||
}
|
||||
BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS);
|
||||
uc->uc_fifo = ALLOC(cache_ptr, size);
|
||||
if (uc->uc_fifo == NULL) {
|
||||
CACHE_PERROR("enablecache: could not allocate cache fifo");
|
||||
CACHE_PERROR(_("enablecache: could not allocate cache fifo"));
|
||||
return(0);
|
||||
}
|
||||
BZERO(uc->uc_fifo, cache_ptr, size);
|
||||
@ -395,7 +395,7 @@ cache_set(xprt, replylen)
|
||||
vicp = &(*vicp)->cache_next)
|
||||
;
|
||||
if (*vicp == NULL) {
|
||||
CACHE_PERROR("cache_set: victim not found");
|
||||
CACHE_PERROR(_("cache_set: victim not found"));
|
||||
return;
|
||||
}
|
||||
*vicp = victim->cache_next; /* remote from cache */
|
||||
|
@ -132,7 +132,7 @@ char * argv[];
|
||||
if (c != EOF ||
|
||||
(optind == argc - 1 && strcmp(argv[optind], "=") == 0)) {
|
||||
(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]);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -224,9 +224,9 @@ char * argv[];
|
||||
show(argv[i], t, TRUE);
|
||||
}
|
||||
if (fflush(stdout) || ferror(stdout)) {
|
||||
(void) fprintf(stderr, "%s: Error writing standard output ",
|
||||
(void) fprintf(stderr, _("%s: Error writing standard output "),
|
||||
argv[0]);
|
||||
(void) perror("standard output");
|
||||
(void) perror(_("standard output"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
|
139
time/zic.c
139
time/zic.c
@ -386,10 +386,10 @@ const char * const string;
|
||||
** zic ... 2>&1 | error -t "*" -v
|
||||
** on BSD systems.
|
||||
*/
|
||||
(void) fprintf(stderr, "\"%s\", line %d: %s",
|
||||
(void) fprintf(stderr, _("\"%s\", line %d: %s"),
|
||||
filename, linenum, string);
|
||||
if (rfilename != NULL)
|
||||
(void) fprintf(stderr, " (rule from \"%s\", line %d)",
|
||||
(void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),
|
||||
rfilename, rlinenum);
|
||||
(void) fprintf(stderr, "\n");
|
||||
++errors;
|
||||
@ -398,9 +398,9 @@ const char * const string;
|
||||
static 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\
|
||||
\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n",
|
||||
\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"),
|
||||
progname, progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -434,7 +434,7 @@ char * argv[];
|
||||
directory = optarg;
|
||||
else {
|
||||
(void) fprintf(stderr,
|
||||
"%s: More than one -d option specified\n",
|
||||
_("%s: More than one -d option specified\n"),
|
||||
progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -444,7 +444,7 @@ char * argv[];
|
||||
lcltime = optarg;
|
||||
else {
|
||||
(void) fprintf(stderr,
|
||||
"%s: More than one -l option specified\n",
|
||||
_("%s: More than one -l option specified\n"),
|
||||
progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -454,7 +454,7 @@ char * argv[];
|
||||
psxrules = optarg;
|
||||
else {
|
||||
(void) fprintf(stderr,
|
||||
"%s: More than one -p option specified\n",
|
||||
_("%s: More than one -p option specified\n"),
|
||||
progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -464,7 +464,7 @@ char * argv[];
|
||||
yitcommand = optarg;
|
||||
else {
|
||||
(void) fprintf(stderr,
|
||||
"%s: More than one -y option specified\n",
|
||||
_("%s: More than one -y option specified\n"),
|
||||
progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -474,7 +474,7 @@ char * argv[];
|
||||
leapsec = optarg;
|
||||
else {
|
||||
(void) fprintf(stderr,
|
||||
"%s: More than one -L option specified\n",
|
||||
_("%s: More than one -L option specified\n"),
|
||||
progname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -557,7 +557,7 @@ const char * const tofile;
|
||||
if (mkdirs(toname) != 0)
|
||||
(void) exit(EXIT_FAILURE);
|
||||
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);
|
||||
(void) perror(toname);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
@ -672,7 +672,7 @@ associate P((void))
|
||||
** a '%s' in the format is a bad thing.
|
||||
*/
|
||||
if (strchr(zp->z_format, '%') != 0)
|
||||
error("%s in ruleless zone");
|
||||
error(_("%s in ruleless zone"));
|
||||
}
|
||||
}
|
||||
if (errors)
|
||||
@ -693,10 +693,10 @@ const char * name;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
if (strcmp(name, "-") == 0) {
|
||||
name = "standard input";
|
||||
name = _("standard input");
|
||||
fp = stdin;
|
||||
} 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) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -707,7 +707,7 @@ const char * name;
|
||||
break;
|
||||
cp = strchr(buf, '\n');
|
||||
if (cp == NULL) {
|
||||
error("line too long");
|
||||
error(_("line too long"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
*cp = '\0';
|
||||
@ -727,7 +727,7 @@ const char * name;
|
||||
} else {
|
||||
lp = byword(fields[0], line_codes);
|
||||
if (lp == NULL)
|
||||
error("input line of unknown type");
|
||||
error(_("input line of unknown type"));
|
||||
else switch ((int) (lp->l_value)) {
|
||||
case LC_RULE:
|
||||
inrule(fields, nfields);
|
||||
@ -743,14 +743,14 @@ const char * name;
|
||||
case LC_LEAP:
|
||||
if (name != leapsec)
|
||||
(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);
|
||||
else inleap(fields, nfields);
|
||||
wantcont = FALSE;
|
||||
break;
|
||||
default: /* "cannot happen" */
|
||||
(void) fprintf(stderr,
|
||||
"%s: panic: Invalid l_value %d\n",
|
||||
_("%s: panic: Invalid l_value %d\n"),
|
||||
progname, lp->l_value);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -758,17 +758,17 @@ const char * name;
|
||||
ifree((char *) fields);
|
||||
}
|
||||
if (ferror(fp)) {
|
||||
(void) fprintf(stderr, "%s: Error reading ", progname);
|
||||
(void) fprintf(stderr, _("%s: Error reading "), progname);
|
||||
(void) perror(filename);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
if (fp != stdin && fclose(fp)) {
|
||||
(void) fprintf(stderr, "%s: Error closing ", progname);
|
||||
(void) fprintf(stderr, _("%s: Error closing "), progname);
|
||||
(void) perror(filename);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
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;
|
||||
|
||||
if (nfields != RULE_FIELDS) {
|
||||
error("wrong number of fields on Rule line");
|
||||
error(_("wrong number of fields on Rule line"));
|
||||
return;
|
||||
}
|
||||
if (*fields[RF_NAME] == '\0') {
|
||||
error("nameless rule");
|
||||
error(_("nameless rule"));
|
||||
return;
|
||||
}
|
||||
r.r_filename = filename;
|
||||
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],
|
||||
fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
|
||||
r.r_name = ecpyalloc(fields[RF_NAME]);
|
||||
@ -851,13 +851,13 @@ const int nfields;
|
||||
static char * buf;
|
||||
|
||||
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;
|
||||
}
|
||||
if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) {
|
||||
buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT)));
|
||||
(void) sprintf(buf,
|
||||
"\"Zone %s\" line and -l option are mutually exclusive",
|
||||
_("\"Zone %s\" line and -l option are mutually exclusive"),
|
||||
TZDEFAULT);
|
||||
error(buf);
|
||||
return FALSE;
|
||||
@ -865,7 +865,7 @@ const int nfields;
|
||||
if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {
|
||||
buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES)));
|
||||
(void) sprintf(buf,
|
||||
"\"Zone %s\" line and -p option are mutually exclusive",
|
||||
_("\"Zone %s\" line and -p option are mutually exclusive"),
|
||||
TZDEFRULES);
|
||||
error(buf);
|
||||
return FALSE;
|
||||
@ -877,7 +877,7 @@ const int nfields;
|
||||
strlen(fields[ZF_NAME]) +
|
||||
strlen(zones[i].z_filename)));
|
||||
(void) sprintf(buf,
|
||||
"duplicate zone name %s (file \"%s\", line %d)",
|
||||
_("duplicate zone name %s (file \"%s\", line %d)"),
|
||||
fields[ZF_NAME],
|
||||
zones[i].z_filename,
|
||||
zones[i].z_linenum);
|
||||
@ -893,7 +893,7 @@ register char ** const fields;
|
||||
const int nfields;
|
||||
{
|
||||
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 inzsub(fields, nfields, TRUE);
|
||||
@ -933,10 +933,10 @@ const int iscont;
|
||||
}
|
||||
z.z_filename = filename;
|
||||
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 != 's' || strchr(cp, '%') != 0) {
|
||||
error("invalid abbreviation format");
|
||||
error(_("invalid abbreviation format"));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -962,8 +962,8 @@ const int iscont;
|
||||
zones[nzones - 1].z_untiltime > min_time &&
|
||||
zones[nzones - 1].z_untiltime < max_time &&
|
||||
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
|
||||
error("Zone continuation line end time is not \
|
||||
after end time of previous line");
|
||||
error(_("Zone continuation line end time is \
|
||||
not after end time of previous line"));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -990,7 +990,7 @@ const int nfields;
|
||||
time_t t;
|
||||
|
||||
if (nfields != LEAP_FIELDS) {
|
||||
error("wrong number of fields on Leap line");
|
||||
error(_("wrong number of fields on Leap line"));
|
||||
return;
|
||||
}
|
||||
dayoff = 0;
|
||||
@ -999,7 +999,7 @@ const int nfields;
|
||||
/*
|
||||
* Leapin' Lizards!
|
||||
*/
|
||||
error("invalid leaping year");
|
||||
error(_("invalid leaping year"));
|
||||
return;
|
||||
}
|
||||
j = EPOCH_YEAR;
|
||||
@ -1014,7 +1014,7 @@ const int nfields;
|
||||
dayoff = oadd(dayoff, eitol(i));
|
||||
}
|
||||
if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) {
|
||||
error("invalid month name");
|
||||
error(_("invalid month name"));
|
||||
return;
|
||||
}
|
||||
month = lp->l_value;
|
||||
@ -1027,12 +1027,12 @@ const int nfields;
|
||||
cp = fields[LP_DAY];
|
||||
if (sscanf(cp, scheck(cp, "%d"), &day) != 1 ||
|
||||
day <= 0 || day > len_months[isleap(year)][month]) {
|
||||
error("invalid day of month");
|
||||
error(_("invalid day of month"));
|
||||
return;
|
||||
}
|
||||
dayoff = oadd(dayoff, eitol(day - 1));
|
||||
if (dayoff < 0 && !tt_signed) {
|
||||
error("time before zero");
|
||||
error(_("time before zero"));
|
||||
return;
|
||||
}
|
||||
t = (time_t) dayoff * SECSPERDAY;
|
||||
@ -1040,7 +1040,7 @@ const int nfields;
|
||||
** Cheap overflow check.
|
||||
*/
|
||||
if (t / SECSPERDAY != dayoff) {
|
||||
error("time overflow");
|
||||
error(_("time overflow"));
|
||||
return;
|
||||
}
|
||||
tod = gethms(fields[LP_TIME], "invalid time of day", FALSE);
|
||||
@ -1062,11 +1062,11 @@ const int nfields;
|
||||
positive = TRUE;
|
||||
count = 2;
|
||||
} else {
|
||||
error("illegal CORRECTION field on Leap line");
|
||||
error(_("illegal CORRECTION field on Leap line"));
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
leapadd(tadd(t, tod), positive, lp->l_value, count);
|
||||
@ -1081,15 +1081,15 @@ const int nfields;
|
||||
struct link l;
|
||||
|
||||
if (nfields != LINK_FIELDS) {
|
||||
error("wrong number of fields on Link line");
|
||||
error(_("wrong number of fields on Link line"));
|
||||
return;
|
||||
}
|
||||
if (*fields[LF_FROM] == '\0') {
|
||||
error("blank FROM field on Link line");
|
||||
error(_("blank FROM field on Link line"));
|
||||
return;
|
||||
}
|
||||
if (*fields[LF_TO] == '\0') {
|
||||
error("blank TO field on Link line");
|
||||
error(_("blank TO field on Link line"));
|
||||
return;
|
||||
}
|
||||
l.l_filename = filename;
|
||||
@ -1117,7 +1117,7 @@ const char * const timep;
|
||||
register char * ep;
|
||||
|
||||
if ((lp = byword(monthp, mon_names)) == NULL) {
|
||||
error("invalid month name");
|
||||
error(_("invalid month name"));
|
||||
return;
|
||||
}
|
||||
rp->r_month = lp->l_value;
|
||||
@ -1161,11 +1161,11 @@ const char * const timep;
|
||||
break;
|
||||
default: /* "cannot happen" */
|
||||
(void) fprintf(stderr,
|
||||
"%s: panic: Invalid l_value %d\n",
|
||||
_("%s: panic: Invalid l_value %d\n"),
|
||||
progname, lp->l_value);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
|
||||
error("invalid starting year");
|
||||
error(_("invalid starting year"));
|
||||
return;
|
||||
}
|
||||
cp = hiyearp;
|
||||
@ -1181,22 +1181,22 @@ const char * const timep;
|
||||
break;
|
||||
default: /* "cannot happen" */
|
||||
(void) fprintf(stderr,
|
||||
"%s: panic: Invalid l_value %d\n",
|
||||
_("%s: panic: Invalid l_value %d\n"),
|
||||
progname, lp->l_value);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
|
||||
error("invalid ending year");
|
||||
error(_("invalid ending year"));
|
||||
return;
|
||||
}
|
||||
if (rp->r_loyear > rp->r_hiyear) {
|
||||
error("starting year greater than ending year");
|
||||
error(_("starting year greater than ending year"));
|
||||
return;
|
||||
}
|
||||
if (*typep == '\0')
|
||||
rp->r_yrtype = NULL;
|
||||
else {
|
||||
if (rp->r_loyear == rp->r_hiyear) {
|
||||
error("typed single year");
|
||||
error(_("typed single year"));
|
||||
return;
|
||||
}
|
||||
rp->r_yrtype = ecpyalloc(typep);
|
||||
@ -1226,12 +1226,12 @@ const char * const timep;
|
||||
if (rp->r_dycode != DC_DOM) {
|
||||
*ep++ = 0;
|
||||
if (*ep++ != '=') {
|
||||
error("invalid day of month");
|
||||
error(_("invalid day of month"));
|
||||
ifree(dp);
|
||||
return;
|
||||
}
|
||||
if ((lp = byword(dp, wday_names)) == NULL) {
|
||||
error("invalid weekday name");
|
||||
error(_("invalid weekday name"));
|
||||
ifree(dp);
|
||||
return;
|
||||
}
|
||||
@ -1240,7 +1240,7 @@ const char * const timep;
|
||||
if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 ||
|
||||
rp->r_dayofmonth <= 0 ||
|
||||
(rp->r_dayofmonth > len_months[1][rp->r_month])) {
|
||||
error("invalid day of month");
|
||||
error(_("invalid day of month"));
|
||||
ifree(dp);
|
||||
return;
|
||||
}
|
||||
@ -1287,7 +1287,8 @@ const char * const name;
|
||||
if (mkdirs(fullname) != 0)
|
||||
(void) exit(EXIT_FAILURE);
|
||||
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) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -1352,7 +1353,7 @@ const char * const name;
|
||||
for (i = 0; i < typecnt; ++i)
|
||||
(void) putc(ttisgmts[i], 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) exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -1570,7 +1571,7 @@ const int type;
|
||||
if (timecnt == 0 && type == 0 && isdsts[0] == 0)
|
||||
return; /* handled by default rule */
|
||||
if (timecnt >= TZ_MAX_TIMES) {
|
||||
error("too many transitions?!");
|
||||
error(_("too many transitions?!"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
ats[timecnt] = starttime;
|
||||
@ -1604,7 +1605,7 @@ const int ttisgmt;
|
||||
** many.
|
||||
*/
|
||||
if (typecnt >= TZ_MAX_TYPES) {
|
||||
error("too many local time types");
|
||||
error(_("too many local time types"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
gmtoffs[i] = gmtoff;
|
||||
@ -1632,13 +1633,13 @@ int count;
|
||||
register int i, j;
|
||||
|
||||
if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
|
||||
error("too many leap seconds");
|
||||
error(_("too many leap seconds"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
for (i = 0; i < leapcnt; ++i)
|
||||
if (t <= trans[i]) {
|
||||
if (t == trans[i]) {
|
||||
error("repeated leap second moment");
|
||||
error(_("repeated leap second moment"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
@ -1688,8 +1689,8 @@ const char * const type;
|
||||
return TRUE;
|
||||
if (result == (1 << 8))
|
||||
return FALSE;
|
||||
error("Wild result from command execution");
|
||||
(void) fprintf(stderr, "%s: command was '%s', result was %d\n",
|
||||
error(_("Wild result from command execution"));
|
||||
(void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
|
||||
progname, buf, result);
|
||||
for ( ; ; )
|
||||
(void) exit(EXIT_FAILURE);
|
||||
@ -1781,7 +1782,7 @@ register char * cp;
|
||||
else while ((*dp = *cp++) != '"')
|
||||
if (*dp != '\0')
|
||||
++dp;
|
||||
else error("Odd number of quotation marks");
|
||||
else error(_("Odd number of quotation marks"));
|
||||
} while (*cp != '\0' && *cp != '#' &&
|
||||
(!isascii(*cp) || !isspace(*cp)));
|
||||
if (isascii(*cp) && isspace(*cp))
|
||||
@ -1801,7 +1802,7 @@ const long t2;
|
||||
|
||||
t = t1 + t2;
|
||||
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
|
||||
error("time overflow");
|
||||
error(_("time overflow"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
return t;
|
||||
@ -1820,7 +1821,7 @@ const long t2;
|
||||
return min_time;
|
||||
t = t1 + t2;
|
||||
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
|
||||
error("time overflow");
|
||||
error(_("time overflow"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
return t;
|
||||
@ -1867,7 +1868,7 @@ register const int wantedy;
|
||||
if (rp->r_dycode == DC_DOWLEQ)
|
||||
--i;
|
||||
else {
|
||||
error("use of 2/29 in non leap-year");
|
||||
error(_("use of 2/29 in non leap-year"));
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@ -1901,7 +1902,7 @@ register const int wantedy;
|
||||
--i;
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1924,7 +1925,7 @@ const char * const string;
|
||||
|
||||
i = strlen(string) + 1;
|
||||
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) strcpy(&chars[charcnt], string);
|
||||
@ -1959,7 +1960,7 @@ char * const argname;
|
||||
*/
|
||||
if (mkdir(name, 0755) != 0) {
|
||||
(void) fprintf(stderr,
|
||||
"%s: Can't create directory ",
|
||||
_("%s: Can't create directory "),
|
||||
progname);
|
||||
(void) perror(name);
|
||||
ifree(name);
|
||||
@ -1981,7 +1982,7 @@ const int i;
|
||||
l = i;
|
||||
if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) {
|
||||
(void) fprintf(stderr,
|
||||
"%s: %d did not sign extend correctly\n",
|
||||
_("%s: %d did not sign extend correctly\n"),
|
||||
progname, i);
|
||||
(void) exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user