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

Defined functions

s_paus defined in line 13; never used
waitpause defined in line 52; used 2 times

Defined macros

PAUSESIG defined in line 10; used 2 times
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2725
Valid CSS Valid XHTML 1.0 Strict