| OLD | NEW |
| 1 #include <errno.h> | 1 #include <errno.h> |
| 2 #include <stdio.h> | 2 #include <stdio.h> |
| 3 #include <unistd.h> | 3 #include <unistd.h> |
| 4 #include <stdlib.h> | 4 #include <stdlib.h> |
| 5 | 5 |
| 6 #ifdef SIGNALS | 6 #ifdef SIGNALS |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 | 8 |
| 9 static void | 9 static void |
| 10 sigint_handler (int signo) | 10 sigint_handler (int signo) |
| 11 { | 11 { |
| 12 } | 12 } |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 int | 15 int |
| 16 main () | 16 main () |
| 17 { | 17 { |
| 18 char x; | 18 char x; |
| 19 int nbytes; | 19 int nbytes; |
| 20 #ifdef usestubs | |
| 21 set_debug_traps(); | |
| 22 breakpoint(); | |
| 23 #endif | |
| 24 #ifdef SIGNALS | 20 #ifdef SIGNALS |
| 25 signal (SIGINT, sigint_handler); | 21 signal (SIGINT, sigint_handler); |
| 26 #endif | 22 #endif |
| 27 printf ("talk to me baby\n"); | 23 printf ("talk to me baby\n"); |
| 28 while (1) | 24 while (1) |
| 29 { | 25 { |
| 30 nbytes = read (0, &x, 1); | 26 nbytes = read (0, &x, 1); |
| 31 if (nbytes < 0) | 27 if (nbytes < 0) |
| 32 { | 28 { |
| 33 #ifdef EINTR | 29 #ifdef EINTR |
| (...skipping 13 matching lines...) Expand all Loading... |
| 47 write (1, &x, 1); | 43 write (1, &x, 1); |
| 48 } | 44 } |
| 49 return 0; | 45 return 0; |
| 50 } | 46 } |
| 51 | 47 |
| 52 int | 48 int |
| 53 func1 () | 49 func1 () |
| 54 { | 50 { |
| 55 return 4; | 51 return 4; |
| 56 } | 52 } |
| OLD | NEW |