diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | assert/assert-perr.c | 2 | ||||
-rw-r--r-- | assert/assert.c | 4 | ||||
-rw-r--r-- | inet/rcmd.c | 26 | ||||
-rw-r--r-- | posix/getconf.c | 6 | ||||
-rw-r--r-- | posix/id.c | 8 | ||||
-rw-r--r-- | resolv/herror.c | 24 | ||||
-rw-r--r-- | sunrpc/auth_unix.c | 18 | ||||
-rw-r--r-- | sunrpc/clnt_perr.c | 128 | ||||
-rw-r--r-- | sunrpc/clnt_raw.c | 14 | ||||
-rw-r--r-- | sunrpc/get_myaddr.c | 15 | ||||
-rw-r--r-- | sunrpc/pmap_clnt.c | 12 | ||||
-rw-r--r-- | sunrpc/pmap_rmt.c | 32 | ||||
-rw-r--r-- | sunrpc/portmap.c | 36 | ||||
-rw-r--r-- | sunrpc/rpc_main.c | 38 | ||||
-rw-r--r-- | sunrpc/rpc_parse.c | 28 | ||||
-rw-r--r-- | sunrpc/rpc_scan.c | 42 | ||||
-rw-r--r-- | sunrpc/rpc_util.c | 42 | ||||
-rw-r--r-- | sunrpc/rpcinfo.c | 67 | ||||
-rw-r--r-- | sunrpc/svc_simple.c | 30 | ||||
-rw-r--r-- | sunrpc/svc_tcp.c | 28 | ||||
-rw-r--r-- | sunrpc/svc_udp.c | 52 | ||||
-rw-r--r-- | time/zdump.c | 6 | ||||
-rw-r--r-- | time/zic.c | 139 |
24 files changed, 412 insertions, 397 deletions
@@ -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. diff --git a/assert/assert-perr.c b/assert/assert-perr.c index b0436ad575..f9aeb895c4 100644 --- a/assert/assert-perr.c +++ b/assert/assert-perr.c @@ -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, diff --git a/assert/assert.c b/assert/assert.c index 9da9e22be4..0160b40bbc 100644 --- a/assert/assert.c +++ b/assert/assert.c @@ -38,14 +38,14 @@ CONST char *__assert_program_name; void DEFUN(__assert_fail, (assertion, file, line, function), 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 FATAL_PREPARE; #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, diff --git a/inet/rcmd.c b/inet/rcmd.c index e5b28c63f8..ae6e0b65c7 100644 --- a/inet/rcmd.c +++ b/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", - strerror(errno)); + _("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; diff --git a/posix/getconf.c b/posix/getconf.c index e42b909ed9..7423a77225 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -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); } diff --git a/posix/id.c b/posix/id.c index d886e68573..b08d2501fa 100644 --- a/posix/id.c +++ b/posix/id.c @@ -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); } diff --git a/resolv/herror.c b/resolv/herror.c index 988e52cbd9..f36126a0bd 100644 --- a/resolv/herror.c +++ b/resolv/herror.c @@ -3,7 +3,7 @@ * - * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -19,7 +19,7 @@ * 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 * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,14 +33,14 @@ * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * + * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT @@ -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"); } diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index 87ff2b648b..92703fbbc1 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -6,11 +6,11 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. @@ -18,11 +18,11 @@ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,8 +32,8 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro"; #endif /* - * auth_unix.c, Implements UNIX style authentication parameters. - * + * auth_unix.c, Implements UNIX style authentication parameters. + * * Copyright (C) 1984, Sun Microsystems, Inc. * * 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 */ xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); - if (! xdr_authunix_parms(&xdrs, &aup)) + if (! xdr_authunix_parms(&xdrs, &aup)) abort(); au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs); au->au_origcred.oa_flavor = AUTH_UNIX; @@ -256,7 +256,7 @@ authunix_refresh(auth) xdrmem_create(&xdrs, au->au_origcred.oa_base, au->au_origcred.oa_length, XDR_DECODE); stat = xdr_authunix_parms(&xdrs, &aup); - if (! stat) + if (! stat) goto done; /* 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); 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); } diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 4a8c084e13..147a5ea23c 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -78,17 +78,17 @@ clnt_sperror(rpch, s) return (0); CLNT_GETERR(rpch, &e); - (void) sprintf(str, "%s: ", s); + (void) sprintf(str, "%s: ", s); str += strlen(str); - (void) strcpy(str, clnt_sperrno(e.re_status)); + (void) strcpy(str, clnt_sperrno(e.re_status)); str += strlen(str); switch (e.re_status) { case RPC_SUCCESS: case RPC_CANTENCODEARGS: case RPC_CANTDECODERES: - case RPC_TIMEDOUT: + case RPC_TIMEDOUT: case RPC_PROGUNAVAIL: case RPC_PROCUNAVAIL: case RPC_CANTDECODEARGS: @@ -103,41 +103,41 @@ clnt_sperror(rpch, s) case RPC_CANTSEND: case RPC_CANTRECV: (void) sprintf(str, "; errno = %s", - sys_errlist[e.re_errno]); + sys_errlist[e.re_errno]); str += strlen(str); break; 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); break; case RPC_PROGVERSMISMATCH: - (void) sprintf(str, - "; low version = %lu, high version = %lu", + (void) sprintf(str, + _("; low version = %lu, high version = %lu"), e.re_vers.low, e.re_vers.high); str += strlen(str); break; default: /* unknown */ - (void) sprintf(str, - "; s1 = %lu, s2 = %lu", + (void) sprintf(str, + "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); str += strlen(str); break; @@ -161,42 +161,42 @@ struct rpc_errtab { }; static struct rpc_errtab rpc_errlist[] = { - { RPC_SUCCESS, - "RPC: Success" }, - { RPC_CANTENCODEARGS, - "RPC: Can't encode arguments" }, - { RPC_CANTDECODERES, - "RPC: Can't decode result" }, - { RPC_CANTSEND, - "RPC: Unable to send" }, - { RPC_CANTRECV, - "RPC: Unable to receive" }, - { RPC_TIMEDOUT, - "RPC: Timed out" }, - { RPC_VERSMISMATCH, - "RPC: Incompatible versions of RPC" }, - { RPC_AUTHERROR, - "RPC: Authentication error" }, - { RPC_PROGUNAVAIL, - "RPC: Program unavailable" }, - { RPC_PROGVERSMISMATCH, - "RPC: Program/version mismatch" }, - { RPC_PROCUNAVAIL, - "RPC: Procedure unavailable" }, - { RPC_CANTDECODEARGS, - "RPC: Server can't decode arguments" }, - { RPC_SYSTEMERROR, - "RPC: Remote system error" }, - { RPC_UNKNOWNHOST, - "RPC: Unknown host" }, + { RPC_SUCCESS, + N_("RPC: Success") }, + { RPC_CANTENCODEARGS, + N_("RPC: Can't encode arguments") }, + { RPC_CANTDECODERES, + N_("RPC: Can't decode result") }, + { RPC_CANTSEND, + N_("RPC: Unable to send") }, + { RPC_CANTRECV, + N_("RPC: Unable to receive") }, + { RPC_TIMEDOUT, + N_("RPC: Timed out") }, + { RPC_VERSMISMATCH, + N_("RPC: Incompatible versions of RPC") }, + { RPC_AUTHERROR, + N_("RPC: Authentication error") }, + { RPC_PROGUNAVAIL, + N_("RPC: Program unavailable") }, + { RPC_PROGVERSMISMATCH, + N_("RPC: Program/version mismatch") }, + { RPC_PROCUNAVAIL, + N_("RPC: Procedure unavailable") }, + { RPC_CANTDECODEARGS, + N_("RPC: Server can't decode arguments") }, + { RPC_SYSTEMERROR, + N_("RPC: Remote system error") }, + { RPC_UNKNOWNHOST, + N_("RPC: Unknown host") }, { RPC_UNKNOWNPROTO, - "RPC: Unknown protocol" }, - { RPC_PMAPFAILURE, - "RPC: Port mapper failure" }, - { RPC_PROGNOTREGISTERED, - "RPC: Program not registered"}, - { RPC_FAILED, - "RPC: Failed (unspecified error)"} + N_("RPC: Unknown protocol") }, + { RPC_PMAPFAILURE, + N_("RPC: Port mapper failure") }, + { RPC_PROGNOTREGISTERED, + N_("RPC: Program not registered") }, + { RPC_FAILED, + 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; } @@ -267,27 +267,27 @@ clnt_pcreateerror(s) } struct auth_errtab { - enum auth_stat status; + enum auth_stat status; char *message; }; 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); diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index 89059ae2da..7e9e6e9e29 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -6,11 +6,11 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. @@ -18,11 +18,11 @@ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * 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_prog = prog; 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)) { - perror("clnt_raw.c - Fatal header serialization error."); + perror(_("clnt_raw.c - Fatal header serialization error.")); } clp->mcnt = XDR_GETPOS(xdrs); XDR_DESTROY(xdrs); @@ -121,7 +121,7 @@ clntraw_create(prog, vers) return (client); } -static enum clnt_stat +static enum clnt_stat clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout) CLIENT *h; u_long proc; diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c index 9692f852f9..c0ff44efcf 100644 --- a/sunrpc/get_myaddr.c +++ b/sunrpc/get_myaddr.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * 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 <arpa/inet.h> -/* +/* * don't use gethostbyname, which would invoke yellow pages */ get_myaddress(addr) @@ -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; diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c index 09220e77b1..f93efaa94a 100644 --- a/sunrpc/pmap_clnt.c +++ b/sunrpc/pmap_clnt.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -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); diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index 32c829da2d..30af4f90c2 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -156,7 +156,7 @@ xdr_rmtcallres(xdrs, crp) /* * 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 . */ @@ -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) && @@ -209,7 +209,7 @@ getbroadcastnets(addrs, sock, buf) typedef bool_t (*resultproc_t)(); -enum clnt_stat +enum clnt_stat clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) u_long prog; /* program number */ u_long vers; /* version number */ @@ -243,7 +243,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) struct rmtcallargs a; struct rmtcallres r; struct rpc_msg msg; - struct timeval t; + struct timeval t; 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. */ 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; } @@ -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.proc = xdr_rmtcallres; readfds = mask; - switch (select(_rpc_dtablesize(), &readfds, (int *)NULL, + switch (select(_rpc_dtablesize(), &readfds, (int *)NULL, (int *)NULL, &t)) { case 0: /* timed out */ @@ -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; } diff --git a/sunrpc/portmap.c b/sunrpc/portmap.c index adfdef955e..7a362ae9b0 100644 --- a/sunrpc/portmap.c +++ b/sunrpc/portmap.c @@ -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 * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -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(); } @@ -158,7 +158,7 @@ find_service(prog, vers, prot) return (hit); } -/* +/* * 1 OK, 0 not */ reg_service(rqstp, xprt) @@ -169,7 +169,7 @@ reg_service(rqstp, xprt) struct pmaplist *pml, *prevpml, *fnd; int ans, port; caddr_t t; - + #ifdef DEBUG fprintf(stderr, "server: about do a switch\n"); #endif @@ -207,7 +207,7 @@ reg_service(rqstp, xprt) goto done; } } else { - /* + /* * add to END of list */ pml = (struct pmaplist *) @@ -306,7 +306,7 @@ reg_service(rqstp, xprt) * Calls a procedure on the local machine. If the requested * procedure is not registered this procedure does not return * 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. */ 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 * 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. */ static @@ -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; } diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c index 795bf2aa57..7313e6ebf6 100644 --- a/sunrpc/rpc_main.c +++ b/sunrpc/rpc_main.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_main.c 1.7 87/06/24 (C) 1987 SMI"; #endif /* - * rpc_main.c, Top level of the RPC protocol compiler. - * Copyright (C) 1987, Sun Microsystems, Inc. + * rpc_main.c, Top level of the RPC protocol compiler. + * Copyright (C) 1987, Sun Microsystems, Inc. */ #include <stdio.h> @@ -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); } @@ -104,7 +104,7 @@ main(argc, argv) } /* - * add extension to filename + * add extension to filename */ static char * extendfile(file, ext) @@ -128,7 +128,7 @@ extendfile(file, ext) } /* - * Open output file with given extension + * Open output file with given extension */ static open_output(infile, outfile) @@ -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(); } @@ -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 open_input(infile, define) @@ -201,7 +201,7 @@ c_output(infile, define, extend, outfile) char *outfilename; long tell; - open_input(infile, define); + open_input(infile, define); outfilename = extend ? extendfile(infile, outfile) : outfile; open_output(infile, outfilename); 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 do_registers(argc, argv) @@ -340,7 +340,7 @@ do_registers(argc, argv) } /* - * Parse command line arguments + * Parse command line arguments */ static parseargs(argc, argv, cmd) @@ -387,7 +387,7 @@ parseargs(argc, argv, cmd) break; case 'o': case 's': - if (argv[i][j - 1] != '-' || + if (argv[i][j - 1] != '-' || argv[i][j + 1] != 0) { return (0); } diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c index 9e4663fb36..325f75fbfc 100644 --- a/sunrpc/rpc_parse.c +++ b/sunrpc/rpc_parse.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)rpc_parse.c 1.4 87/04/28 (C) 1987 SMI"; #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. */ #include <stdio.h> @@ -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")); } } diff --git a/sunrpc/rpc_scan.c b/sunrpc/rpc_scan.c index e46a1b5f2b..41049b69ca 100644 --- a/sunrpc/rpc_scan.c +++ b/sunrpc/rpc_scan.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_scan.c 1.6 87/06/24 (C) 1987 SMI"; #endif /* - * rpc_scan.c, Scanner for the RPC protocol compiler - * Copyright (C) 1987, Sun Microsystems, Inc. + * rpc_scan.c, Scanner for the RPC protocol compiler + * Copyright (C) 1987, Sun Microsystems, Inc. */ #include <stdio.h> #include <ctype.h> @@ -48,7 +48,7 @@ static int pushed = 0; /* is a token pushed */ static token lasttok; /* last token, if pushed */ /* - * scan expecting 1 given token + * scan expecting 1 given token */ void scan(expect, tokp) @@ -62,7 +62,7 @@ scan(expect, tokp) } /* - * scan expecting 2 given tokens + * scan expecting 2 given tokens */ void scan2(expect1, expect2, tokp) @@ -77,7 +77,7 @@ scan2(expect1, expect2, tokp) } /* - * scan expecting 3 given token + * scan expecting 3 given token */ void 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 scan_num(tokp) @@ -106,13 +106,13 @@ scan_num(tokp) case TOK_IDENT: break; default: - error("constant or identifier expected"); + error(_("constant or identifier expected")); } } /* - * Peek at the next token + * Peek at the next token */ void 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 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 get_token(tokp) @@ -168,7 +168,7 @@ get_token(tokp) if (commenting) { break; } else if (cppline(curline)) { - docppline(curline, &linenum, + docppline(curline, &linenum, &infilename); } else if (directive(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) { case ':': @@ -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) { diff --git a/sunrpc/rpc_util.c b/sunrpc/rpc_util.c index 8136535b2f..ebb037a05e 100644 --- a/sunrpc/rpc_util.c +++ b/sunrpc/rpc_util.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,8 +32,8 @@ static char sccsid[] = "@(#)rpc_util.c 1.5 87/06/24 (C) 1987 SMI"; #endif /* - * rpc_util.c, Utility routines for the RPC protocol compiler - * Copyright (C) 1987, Sun Microsystems, Inc. + * rpc_util.c, Utility routines for the RPC protocol compiler + * Copyright (C) 1987, Sun Microsystems, Inc. */ #include <stdio.h> #include "rpc_scan.h" @@ -56,7 +56,7 @@ FILE *fin; /* file pointer of current input */ list *defined; /* list of defined things */ /* - * Reinitialize the world + * Reinitialize the world */ reinitialize() { @@ -67,7 +67,7 @@ reinitialize() } /* - * string equality + * string equality */ streq(a, b) char *a; @@ -77,7 +77,7 @@ streq(a, b) } /* - * find a value in a list + * find a value in a list */ char * 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 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 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(); } /* * Something went wrong, unlink any files that we may have created and then - * die. + * die. */ 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(); } } @@ -291,38 +291,38 @@ static char expectbuf[100]; static char *toktostr(); /* - * error, token encountered was not the expected one + * error, token encountered was not the expected one */ void expected1(exp1) tok_kind exp1; { - s_print(expectbuf, "expected '%s'", + s_print(expectbuf, _("expected '%s'"), toktostr(exp1)); error(expectbuf); } /* - * error, token encountered was not one of two expected ones + * error, token encountered was not one of two expected ones */ 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); } /* - * error, token encountered was not one of 3 expected ones + * error, token encountered was not one of 3 expected ones */ 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)); diff --git a/sunrpc/rpcinfo.c b/sunrpc/rpcinfo.c index 961f9b0b2d..0df991ae47 100644 --- a/sunrpc/rpcinfo.c +++ b/sunrpc/rpcinfo.c @@ -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 * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -179,7 +179,7 @@ main(argc, argv) return (0); } - + static void udpping(portnum, argc, argv) u_short portnum; @@ -194,7 +194,7 @@ udpping(portnum, argc, argv) int sock = RPC_ANYSOCK; struct rpc_err rpcerr; int failure; - + if (argc < 2 || argc > 3) { usage(); exit(1); @@ -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); } @@ -481,7 +481,7 @@ pmapdump(argc, argv) struct timeval minutetimeout; register CLIENT *client; struct rpcent *rpc; - + if (argc > 1) { usage(); exit(1); @@ -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, @@ -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 * 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, 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); diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index d6bcbd3c04..a18c8bce97 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -31,7 +31,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #endif -/* +/* * svc_simple.c * Simplified front end to rpc. * @@ -58,29 +58,29 @@ registerrpc(prognum, versnum, procnum, progname, inproc, outproc) char *(*progname)(); xdrproc_t 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, + 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; @@ -103,7 +103,7 @@ universal(rqstp, transp) char xdrbuf[UDPMSGSIZE]; struct proglst *pl; - /* + /* * enforce "procnum 0 is echo" convention */ if (rqstp->rq_proc == NULLPROC) { @@ -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); } diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 587e0f0d9b..9daa7cb984 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #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. * @@ -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; @@ -193,15 +193,15 @@ makefd_xprt(fd, sendsize, recvsize) { register SVCXPRT *xprt; register struct tcp_conn *cd; - + 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; @@ -304,7 +304,7 @@ readtcp(xprt, buf, len) #endif /* def FD_SETSIZE */ do { readfds = mask; - if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL, + if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL, &wait_per_try) <= 0) { if (errno == EINTR) { continue; diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 69ef7a1ce3..079502c508 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -6,23 +6,23 @@ * 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 * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * 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 * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -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); @@ -161,7 +161,7 @@ svcudp_stat(xprt) SVCXPRT *xprt; { - return (XPRT_IDLE); + return (XPRT_IDLE); } static bool_t @@ -200,8 +200,8 @@ svcudp_recv(xprt, msg) static bool_t svcudp_reply(xprt, msg) - register SVCXPRT *xprt; - struct rpc_msg *msg; + register SVCXPRT *xprt; + struct rpc_msg *msg; { register struct svcudp_data *su = su_data(xprt); register XDR *xdrs = &(su->su_xdrs); @@ -279,7 +279,7 @@ svcudp_destroy(xprt) (type *) mem_alloc((unsigned) (sizeof(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 @@ -302,7 +302,7 @@ struct cache_node { /* * 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 */ #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. */ svcudp_enablecache(transp, size) @@ -341,25 +341,25 @@ svcudp_enablecache(transp, size) struct udp_cache *uc; if (su->su_cache != NULL) { - CACHE_PERROR("enablecache: cache already enabled"); - return(0); + 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); @@ -374,9 +374,9 @@ svcudp_enablecache(transp, size) static cache_set(xprt, replylen) SVCXPRT *xprt; - u_long replylen; + u_long replylen; { - register cache_ptr victim; + register cache_ptr victim; register cache_ptr *vicp; register struct svcudp_data *su = su_data(xprt); 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]; if (victim != NULL) { loc = CACHE_LOC(xprt, victim->cache_xid); - for (vicp = &uc->uc_entries[loc]; - *vicp != NULL && *vicp != victim; - vicp = &(*vicp)->cache_next) + for (vicp = &uc->uc_entries[loc]; + *vicp != NULL && *vicp != victim; + 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 */ @@ -426,7 +426,7 @@ cache_set(xprt, replylen) victim->cache_prog = uc->uc_prog; victim->cache_addr = uc->uc_addr; 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_fifo[uc->uc_nextvictim++] = victim; uc->uc_nextvictim %= uc->uc_size; diff --git a/time/zdump.c b/time/zdump.c index 32882119f8..8aa7de069b 100644 --- a/time/zdump.c +++ b/time/zdump.c @@ -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); diff --git a/time/zic.c b/time/zic.c index fc1a16bff9..5ac24bc9b0 100644 --- a/time/zic.c +++ b/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); } |