Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@61 | 1 | Index: terminal.c |
michael@61 | 2 | --- terminal.c.orig 1988-11-26 01:40:43.000000000 +0100 |
michael@61 | 3 | +++ terminal.c 2009-01-09 18:15:47.583499911 +0100 |
michael@61 | 4 | @@ -6,11 +6,11 @@ |
michael@61 | 5 | /* |
michael@61 | 6 | * Routines in terminal abstraction: |
michael@61 | 7 | * |
michael@61 | 8 | - * set_term() |
michael@61 | 9 | + * set_cb_term() |
michael@61 | 10 | * Initialize terminal, clear the screen. |
michael@61 | 11 | * |
michael@61 | 12 | - * unset_term() |
michael@61 | 13 | - * Return terminal to state before set_term(). |
michael@61 | 14 | + * unset_cb_term() |
michael@61 | 15 | + * Return terminal to state before set_cb_term(). |
michael@61 | 16 | * |
michael@61 | 17 | * char2sym(char) |
michael@61 | 18 | * Return the symbol used to display the given char in the |
michael@61 | 19 | @@ -97,6 +97,14 @@ |
michael@61 | 20 | */ |
michael@61 | 21 | |
michael@61 | 22 | |
michael@61 | 23 | +#include <stdio.h> |
michael@61 | 24 | +#include <stdlib.h> |
michael@61 | 25 | +#include <termios.h> |
michael@61 | 26 | +#if (defined(sun) && defined(__svr4__)) |
michael@61 | 27 | +#include <sys/ttold.h> |
michael@61 | 28 | +#else |
michael@61 | 29 | +#include <sys/ioctl.h> |
michael@61 | 30 | +#endif |
michael@61 | 31 | #include <curses.h> |
michael@61 | 32 | #include <sgtty.h> |
michael@61 | 33 | #include <strings.h> |
michael@61 | 34 | @@ -216,7 +224,7 @@ |
michael@61 | 35 | * and termcap subroutine packages, although the old code is used |
michael@61 | 36 | * for screen refresh. |
michael@61 | 37 | */ |
michael@61 | 38 | -set_term() |
michael@61 | 39 | +set_cb_term() |
michael@61 | 40 | { |
michael@61 | 41 | printf("\n\nInitializing terminal ..."); |
michael@61 | 42 | fflush(stdout); |
michael@61 | 43 | @@ -609,7 +617,7 @@ |
michael@61 | 44 | |
michael@61 | 45 | /* Restore the terminal to its original mode. |
michael@61 | 46 | */ |
michael@61 | 47 | -unset_term() |
michael@61 | 48 | +unset_cb_term() |
michael@61 | 49 | { |
michael@61 | 50 | enter_mode(SMNORMAL); |
michael@61 | 51 | Puts(end_kp); /* Can't tell if this is original. */ |
michael@61 | 52 | Index: tritab.c |
michael@61 | 53 | --- tritab.c.orig 1988-11-26 01:39:37.000000000 +0100 |
michael@61 | 54 | +++ tritab.c 2009-01-09 17:44:48.411457903 +0100 |
michael@61 | 55 | @@ -4,6 +4,7 @@ |
michael@61 | 56 | |
michael@61 | 57 | #include <math.h> |
michael@61 | 58 | #include <stdio.h> |
michael@61 | 59 | +#include <stdlib.h> |
michael@61 | 60 | #include "window.h" |
michael@61 | 61 | #include "specs.h" |
michael@61 | 62 | #include "cipher.h" |
michael@61 | 63 | Index: cipher.c |
michael@61 | 64 | --- cipher.c.orig 1988-11-26 01:40:22.000000000 +0100 |
michael@61 | 65 | +++ cipher.c 2009-01-09 17:54:12.811182642 +0100 |
michael@61 | 66 | @@ -6,6 +6,7 @@ |
michael@61 | 67 | |
michael@61 | 68 | |
michael@61 | 69 | #include <stdio.h> |
michael@61 | 70 | +#include <stdlib.h> |
michael@61 | 71 | #include <math.h> |
michael@61 | 72 | #include "window.h" |
michael@61 | 73 | #include "specs.h" |
michael@61 | 74 | Index: start.c |
michael@61 | 75 | --- start.c.orig 1988-11-26 01:39:45.000000000 +0100 |
michael@61 | 76 | +++ start.c 2009-01-09 18:05:43.601774154 +0100 |
michael@61 | 77 | @@ -11,6 +11,7 @@ |
michael@61 | 78 | |
michael@61 | 79 | |
michael@61 | 80 | #include <stdio.h> |
michael@61 | 81 | +#include <stdlib.h> |
michael@61 | 82 | #include <signal.h> |
michael@61 | 83 | #include <setjmp.h> |
michael@61 | 84 | #include "window.h" |
michael@61 | 85 | @@ -109,13 +110,13 @@ |
michael@61 | 86 | { |
michael@61 | 87 | setcursor(MAXHEIGHT, 1); |
michael@61 | 88 | fflush(stdout); |
michael@61 | 89 | - unset_term(); |
michael@61 | 90 | + unset_cb_term(); |
michael@61 | 91 | |
michael@61 | 92 | kill(getpid(), SIGSTOP); |
michael@61 | 93 | |
michael@61 | 94 | /* Return here when/if program restarted. */ |
michael@61 | 95 | /* Note that the signal mask is restored by longjmp. */ |
michael@61 | 96 | - set_term(); |
michael@61 | 97 | + set_cb_term(); |
michael@61 | 98 | longjmp(saved_stack, 0); |
michael@61 | 99 | } |
michael@61 | 100 | |
michael@61 | 101 | @@ -128,7 +129,7 @@ |
michael@61 | 102 | setcursor(MAXHEIGHT, 1); |
michael@61 | 103 | printf("\n"); |
michael@61 | 104 | fflush(stdout); |
michael@61 | 105 | - unset_term(); |
michael@61 | 106 | + unset_cb_term(); |
michael@61 | 107 | |
michael@61 | 108 | kill(getpid(), SIGKILL); |
michael@61 | 109 | } |
michael@61 | 110 | @@ -192,7 +193,7 @@ |
michael@61 | 111 | done(status) |
michael@61 | 112 | int status; |
michael@61 | 113 | { |
michael@61 | 114 | - unset_term(); |
michael@61 | 115 | + unset_cb_term(); |
michael@61 | 116 | printf("\n"); |
michael@61 | 117 | exit(status); |
michael@61 | 118 | } |
michael@61 | 119 | Index: stats.c |
michael@61 | 120 | --- stats.c.orig 1988-11-26 01:40:42.000000000 +0100 |
michael@61 | 121 | +++ stats.c 2009-01-09 17:54:22.235822458 +0100 |
michael@61 | 122 | @@ -7,6 +7,7 @@ |
michael@61 | 123 | |
michael@61 | 124 | |
michael@61 | 125 | #include <stdio.h> |
michael@61 | 126 | +#include <stdlib.h> |
michael@61 | 127 | #include <math.h> |
michael@61 | 128 | #include "window.h" |
michael@61 | 129 | #include "specs.h" |
michael@61 | 130 | Index: cdblocks.c |
michael@61 | 131 | --- cblocks.c.orig 1988-11-26 01:39:27.000000000 +0100 |
michael@61 | 132 | +++ cblocks.c 2009-01-09 17:58:13.630695396 +0100 |
michael@61 | 133 | @@ -10,6 +10,7 @@ |
michael@61 | 134 | |
michael@61 | 135 | |
michael@61 | 136 | #include <stdio.h> |
michael@61 | 137 | +#include <stdlib.h> |
michael@61 | 138 | #include "window.h" |
michael@61 | 139 | #include "layout.h" |
michael@61 | 140 | #include "specs.h" |
michael@61 | 141 | Index: perm.c |
michael@61 | 142 | --- perm.c.orig 1988-11-26 01:39:44.000000000 +0100 |
michael@61 | 143 | +++ perm.c 2009-01-09 17:58:19.870669485 +0100 |
michael@61 | 144 | @@ -7,6 +7,7 @@ |
michael@61 | 145 | |
michael@61 | 146 | |
michael@61 | 147 | #include <stdio.h> |
michael@61 | 148 | +#include <stdlib.h> |
michael@61 | 149 | #include "window.h" |
michael@61 | 150 | #include "specs.h" |
michael@61 | 151 |