Advertisement
Conner_36

wait for CR

Jun 30th, 2011
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #include "wait.h"
  4.  
  5. int wait (void) {
  6.    
  7.     int c;
  8.     extern int quittersFlag;
  9.    
  10.     printf("\n(Waiting politely for you to press the RETURN key...)\n\n");
  11.    
  12.     while ((c = getchar()) != '\n') {
  13.         if (c == EOF) {
  14.             return quittersFlag = 1;
  15.             }
  16.     }
  17.    
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement