1: /* Copyright (c) 1979 Regents of the University of California */
   2: /*
   3:  * clock - continually print the time of day
   4:  */
   5: #include    <setjmp.h>
   6: jmp_buf env;
   7: 
   8: main()
   9: {
  10:     register char *tp;
  11:     int tim[2];
  12:     extern int stop();
  13: 
  14:     setjmp(env);
  15:     signal(3, &stop);
  16:     time(tim);
  17:     tp = ctime(tim)+11;
  18:     printf("\n\t%8.8s\t", tp);
  19:     while (1) {
  20:         time(tim);
  21:         tp = ctime(tim)+11;
  22:         printf("%8.8s\b\b\b\b\b\b\b\b",tp);
  23:         sleep(1);
  24:     }
  25: }
  26: 
  27: 
  28: stop()
  29: {
  30:     extern int start();
  31:     signal(3, &start);
  32:     while (1)
  33:         sleep(3600);
  34: }
  35: 
  36: start()
  37: {
  38:     longjmp(env, 1);
  39: }

Defined functions

main defined in line 8; never used
start defined in line 36; used 2 times
stop defined in line 28; used 2 times

Defined variables

env defined in line 6; used 2 times
Last modified: 1982-10-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 689
Valid CSS Valid XHTML 1.0 Strict