35c35,36
< static char rcsid[] = "$Id$";
---
> static const char rcsid[] =
> "$Id: rup.c,v 1.7 1997/02/22 19:56:48 peter Exp $";
37a39
> #include <err.h>
41a44
> #include <unistd.h>
45a49
> #include <rpc/pmap_clnt.h>
47d50
<
54,55d56
< char *argv0;
<
79,82c80,81
< if (!(hp = (struct host_list *)malloc(sizeof(struct host_list)))) {
< fprintf(stderr, "%s: no memory.\n", argv0);
< exit(1);
< }
---
> if (!(hp = (struct host_list *)malloc(sizeof(struct host_list))))
> errx(1, "no memory");
87a87
> int
152a153
> int
163,164c164
< fprintf(stderr, "%s: unknown host \"%s\"\n",
< argv0, host);
---
> warnx("unknown host \"%s\"", host);
170c170
< fprintf(stderr, "%s: %s %s", argv0, host, clnt_spcreateerror(""));
---
> warnx("%s %s", host, clnt_spcreateerror(""));
178c178
< fprintf(stderr, "%s: %s: %s\n", argv0, host, clnt_sperror(rstat_clnt, host));
---
> warnx("%s: %s", host, clnt_sperror(rstat_clnt, host));
183a184
> return (0);
185a187
> void
194,197c196,197
< if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) {
< fprintf(stderr, "%s: %s\n", argv0, clnt_sperrno(clnt_stat));
< exit(1);
< }
---
> if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
> errx(1, "%s", clnt_sperrno(clnt_stat));
199a200
> static void
202c203
< fprintf(stderr, "Usage: %s [hosts ...]\n", argv0);
---
> fprintf(stderr, "usage: rup [hosts ...]\n");
205a207
> int
211,215d212
< if (!(argv0 = rindex(argv[0], '/')))
< argv0 = argv[0];
< else
< argv0++;
<
< static char rcsid[] = "$Id$";
---
> static const char rcsid[] =
> "$Id: rup.c,v 1.7 1997/02/22 19:56:48 peter Exp $";
37a39
> #include <err.h>
41a44
> #include <unistd.h>
45a49
> #include <rpc/pmap_clnt.h>
47d50
<
54,55d56
< char *argv0;
<
79,82c80,81
< if (!(hp = (struct host_list *)malloc(sizeof(struct host_list)))) {
< fprintf(stderr, "%s: no memory.\n", argv0);
< exit(1);
< }
---
> if (!(hp = (struct host_list *)malloc(sizeof(struct host_list))))
> errx(1, "no memory");
87a87
> int
152a153
> int
163,164c164
< fprintf(stderr, "%s: unknown host \"%s\"\n",
< argv0, host);
---
> warnx("unknown host \"%s\"", host);
170c170
< fprintf(stderr, "%s: %s %s", argv0, host, clnt_spcreateerror(""));
---
> warnx("%s %s", host, clnt_spcreateerror(""));
178c178
< fprintf(stderr, "%s: %s: %s\n", argv0, host, clnt_sperror(rstat_clnt, host));
---
> warnx("%s: %s", host, clnt_sperror(rstat_clnt, host));
183a184
> return (0);
185a187
> void
194,197c196,197
< if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) {
< fprintf(stderr, "%s: %s\n", argv0, clnt_sperrno(clnt_stat));
< exit(1);
< }
---
> if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
> errx(1, "%s", clnt_sperrno(clnt_stat));
199a200
> static void
202c203
< fprintf(stderr, "Usage: %s [hosts ...]\n", argv0);
---
> fprintf(stderr, "usage: rup [hosts ...]\n");
205a207
> int
211,215d212
< if (!(argv0 = rindex(argv[0], '/')))
< argv0 = argv[0];
< else
< argv0++;
<