1: /*
   2:  * Remote date and time.
   3:  *
   4:  * Usage: timex machine1 ... machineN
   5:  */
   6: #include <stdio.h>
   7: #include "Time.h"
   8: 
   9: main(argc, argv)
  10:     int argc;
  11:     char **argv;
  12: {
  13:     char *machine;
  14:     Time time;
  15: 
  16:     while (--argc > 0) {
  17:         machine = *++argv;
  18:         printf("%s:\n", machine);
  19:         time = LocalTime(machine);
  20:         display(&time, "Local time");
  21:         time = GMTime(machine);
  22:         display(&time, "GMT");
  23:     }
  24: }
  25: 
  26: display(tp, msg)
  27:     Time *tp;
  28:     char *msg;
  29: {
  30:     printf("%s: %d:%02d:%02d %d/%d/%d\n",
  31:         msg, tp->tm_hour, tp->tm_min, tp->tm_sec,
  32:         tp->tm_mon + 1, tp->tm_mday, tp->tm_year);
  33: }

Defined functions

display defined in line 26; used 2 times
main defined in line 9; never used
Last modified: 1983-05-12
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 791
Valid CSS Valid XHTML 1.0 Strict