1: /*
   2:  *	"@(#)s_paus.c	1.1"
   3:  */
   4: 
   5: #include <stdio.h>
   6: #define PAUSESIG 15
   7: 
   8: 
   9: s_paus(s, n)
  10: char *s;
  11: long int n;
  12: {
  13: int i;
  14: int waitpause();
  15: 
  16: fprintf(stderr, "PAUSE: ");
  17: if(n > 0)
  18:     {
  19:     for(i = 0; i<n ; ++i)
  20:         putc(*s++, stderr);
  21:     putc('\n', stderr);
  22:     }
  23: if( isatty(fileno(stdin)) )
  24:     {
  25:     fprintf(stderr, "To resume execution, type:   go\nAny other input will terminate the program.\n");
  26:     if( getchar()!='g' || getchar()!='o' || getchar()!='\n' )
  27:         {
  28:         fprintf(stderr, "STOP\n");
  29:         f_exit();
  30:         _cleanup();
  31:         exit(0);
  32:         }
  33:     }
  34: else
  35:     {
  36:     fprintf(stderr, "To resume execution, type:    kill -%d %d\n",
  37:         PAUSESIG, getpid() );
  38:     signal(PAUSESIG, waitpause);
  39:     pause();
  40:     }
  41: fprintf(stderr, "Execution resumed after PAUSE.\n");
  42: }
  43: 
  44: 
  45: 
  46: 
  47: 
  48: static waitpause()
  49: {
  50: return;
  51: }

Defined functions

s_paus defined in line 9; never used
waitpause defined in line 48; used 2 times

Defined macros

PAUSESIG defined in line 6; used 2 times
Last modified: 1983-05-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 666
Valid CSS Valid XHTML 1.0 Strict