Deleted Added
full compact
34a35
> #if 0
35a37,39
> #endif
> static const char rcsid[] =
> "$Id$";
38,41d41
< #ifdef sgi
< #ident "$Revision: 1.10 $"
< #endif
<
48a49
> #include <err.h>
106c107
< perror("sendto(sock)");
---
> warn("sendto(sock)");
116c117
< if (errno = EINTR)
---
> if (errno == EINTR)
118c119
< perror("select(date read)");
---
> warn("select(date read)");
127c128
< perror("recvfrom(date read)");
---
> warn("recvfrom(date read)");
133,134c134
< fprintf(stderr,
< "%s says it is before 1970: %lu",
---
> warnx("%s says it is before 1970: %lu",
146c146
< fprintf(stderr,"%s will not tell us the date\n", hostname);
---
> warnx("%s will not tell us the date", hostname);
184c184
< printf("Usage: clockdiff host ... \n");
---
> printf("usage: timedc clockdiff host ...\n");
193,194c193
< (void)fprintf(stderr, "%s/%s is an unknown service\n",
< DATE_PORT, DATE_PROTO);
---
> warnx("%s/%s is an unknown service", DATE_PORT, DATE_PROTO);
204,205c203
< fprintf(stderr, "timedc: %s: ", *argv);
< herror(0);
---
> warnx("%s: %s", *argv, hstrerror(h_errno));
288c286
< printf("Usage: msite [hostname]\n");
---
> printf("usage: timedc msite [host ...]\n");
294c292
< fprintf(stderr, "udp/timed: unknown service\n");
---
> warnx("udp/timed: unknown service");
306,307c304
< fprintf(stderr, "timedc: %s: ", tgtname);
< herror(0);
---
> warnx("%s: %s", tgtname, hstrerror(h_errno));
312c309,310
< (void)strcpy(msg.tsp_name, myname);
---
> (void)strncpy(msg.tsp_name, myname, sizeof msg.tsp_name-1);
> msg.tsp_name[sizeof msg.tsp_name-1] = '\0';
319c317
< perror("sendto");
---
> warn("sendto");
333c331
< perror("recvfrom");
---
> warn("recvfrom");
375c373
< printf("Usage: election host1 [host2 ...]\n");
---
> printf("usage: timedc election host1 [host2 ...]\n");
381c379
< fprintf(stderr, "udp/timed: unknown service\n");
---
> warnx("udp/timed: unknown service");
389,390c387
< fprintf(stderr, "timedc: %s: ", *argv);
< herror(0);
---
> warnx("%s: %s", *argv, hstrerror(h_errno));
406c403
< perror("sendto");
---
> warn("sendto");
431c428
< printf("Usage: tracing { on | off }\n");
---
> printf("usage: timedc trace { on | off }\n");
437c434
< fprintf(stderr, "udp/timed: unknown service\n");
---
> warnx("udp/timed: unknown service");
455c452,453
< (void)strcpy(msg.tsp_name, myname);
---
> (void)strncpy(msg.tsp_name, myname, sizeof msg.tsp_name-1);
> msg.tsp_name[sizeof msg.tsp_name-1] = '\0';
460c458
< perror("sendto");
---
> warn("sendto");
473c471
< perror("recvfrom");
---
> warn("recvfrom");
497c495
< perror("opening socket");
---
> warn("opening socket");
508c506
< perror("bind");
---
> warn("bind");
514c512
< fprintf(stderr, "all reserved ports in use\n");
---
> warnx("all reserved ports in use");
521c519
< perror("opening raw socket");
---
> warn("opening raw socket");