From aff494fd2b799a5a06bdbac86e5ddfa7a20b74de Mon Sep 17 00:00:00 2001 From: james <> Date: Fri, 7 Mar 2008 14:17:01 +0000 Subject: *** empty log message *** --- src/keys.h | 177 +++++++++++++++++++++++++++++---------------------------- src/terminal.c | 4 ++ src/util.c | 44 ++++++++------ 3 files changed, 122 insertions(+), 103 deletions(-) (limited to 'src') diff --git a/src/keys.h b/src/keys.h index 2d20966..99a7d1a 100644 --- a/src/keys.h +++ b/src/keys.h @@ -12,6 +12,9 @@ /* * $Log$ + * Revision 1.10 2008/03/07 14:16:44 james + * *** empty log message *** + * * Revision 1.9 2008/03/07 14:13:40 james * *** empty log message *** * @@ -35,92 +38,92 @@ #ifndef __KEYS_H__ #define __KEYS_H__ -#define KEY_UP 128 /* A */ -#define KEY_DOWN 129 /* B */ -#define KEY_RIGHT 130 /* C */ -#define KEY_LEFT 131 /* D */ -#define KEY_MIDDLE 132 /* E */ -#define KEY_END 133 /* F */ -#define KEY_134 134 /* G */ -#define KEY_HOME 135 /* H */ -#define KEY_136 136 /* I */ -#define KEY_137 137 /* J */ -#define KEY_138 138 /* K */ -#define KEY_139 139 /* L */ -#define KEY_ENTER 140 /* M */ -#define KEY_141 141 /* N */ -#define KEY_142 142 /* O */ -#define KEY_PF1 143 /* P */ /* Also F1 */ -#define KEY_PF2 144 /* Q */ /* Also F2 */ -#define KEY_PF3 145 /* R */ /* Also F3 */ -#define KEY_PF4 146 /* S */ /* Also F4 */ -#define KEY_147 147 /* T */ -#define KEY_148 148 /* U */ -#define KEY_149 149 /* V */ -#define KEY_150 150 /* W */ -#define KEY_151 151 /* X */ -#define KEY_152 152 /* Y */ -#define KEY_153 153 /* Z */ -#define KEY_154 154 /* a */ -#define KEY_155 155 /* b */ -#define KEY_156 156 /* c */ -#define KEY_157 157 /* d */ -#define KEY_158 158 /* e */ -#define KEY_159 159 /* f */ -#define KEY_160 160 /* g */ -#define KEY_161 161 /* h */ -#define KEY_162 162 /* i */ -#define KEY_STAR 163 /* j */ -#define KEY_PLUS 164 /* k */ -#define KEY_COMMA 165 /* l */ -#define KEY_MINUS 166 /* m */ -#define KEY_PERIOD 167 /* n */ -#define KEY_DIVIDE 168 /* o */ -#define KEY_0 169 /* p */ -#define KEY_1 170 /* q */ -#define KEY_2 171 /* r */ -#define KEY_3 172 /* s */ -#define KEY_4 173 /* t */ -#define KEY_5 174 /* u */ -#define KEY_6 175 /* v */ -#define KEY_7 176 /* w */ -#define KEY_8 177 /* x */ -#define KEY_9 178 /* y */ -#define KEY_179 179 /* z */ -#define KEY_180 180 /* 0 */ -#define KEY_VT220_HOME 181 /* 1 */ -#define KEY_INSERT 182 /* 2 */ -#define KEY_DELETE 183 /* 3 */ -#define KEY_VT220_END 184 /* 4 */ -#define KEY_PGUP 185 /* 5 */ -#define KEY_PGDN 186 /* 6 */ -#define KEY_187 187 /* 7 */ -#define KEY_188 188 /* 8 */ -#define KEY_189 189 /* 9 */ -#define KEY_190 190 /* 10 */ -#define KEY_F1 191 /* 11 */ -#define KEY_F2 192 /* 12 */ -#define KEY_F3 193 /* 13 */ -#define KEY_F4 194 /* 14 */ -#define KEY_F5 195 /* 15 */ -#define KEY_196 196 /* 16 */ -#define KEY_F6 197 /* 17 */ -#define KEY_F7 198 /* 18 */ -#define KEY_F8 199 /* 19 */ -#define KEY_F9 200 /* 20 */ -#define KEY_F10 201 /* 21 */ -#define KEY_202 202 /* 22 */ -#define KEY_F11 203 /* 23 */ -#define KEY_F12 204 /* 24 */ -#define KEY_F13 205 /* 25 */ -#define KEY_F14 206 /* 26 */ -#define KEY_207 207 /* 27 */ -#define KEY_F15 208 /* 28 */ -#define KEY_F16 209 /* 29 */ -#define KEY_210 210 /* 30 */ -#define KEY_F17 211 /* 31 */ -#define KEY_F18 212 /* 32 */ -#define KEY_F19 213 /* 33 */ -#define KEY_F20 214 /* 34 */ +#define KEY_UP 128 /* A */ +#define KEY_DOWN 129 /* B */ +#define KEY_RIGHT 130 /* C */ +#define KEY_LEFT 131 /* D */ +#define KEY_MIDDLE 132 /* E */ +#define KEY_END 133 /* F */ +#define KEY_134 134 /* G */ +#define KEY_HOME 135 /* H */ +#define KEY_136 136 /* I */ +#define KEY_137 137 /* J */ +#define KEY_138 138 /* K */ +#define KEY_139 139 /* L */ +#define KEY_ENTER 140 /* M */ +#define KEY_141 141 /* N */ +#define KEY_142 142 /* O */ +#define KEY_PF1 143 /* P */ /* Also F1 */ +#define KEY_PF2 144 /* Q */ /* Also F2 */ +#define KEY_PF3 145 /* R */ /* Also F3 */ +#define KEY_PF4 146 /* S */ /* Also F4 */ +#define KEY_147 147 /* T */ +#define KEY_148 148 /* U */ +#define KEY_149 149 /* V */ +#define KEY_150 150 /* W */ +#define KEY_151 151 /* X */ +#define KEY_152 152 /* Y */ +#define KEY_153 153 /* Z */ +#define KEY_154 154 /* a */ +#define KEY_155 155 /* b */ +#define KEY_156 156 /* c */ +#define KEY_157 157 /* d */ +#define KEY_158 158 /* e */ +#define KEY_159 159 /* f */ +#define KEY_160 160 /* g */ +#define KEY_161 161 /* h */ +#define KEY_162 162 /* i */ +#define KEY_STAR 163 /* j */ +#define KEY_PLUS 164 /* k */ +#define KEY_COMMA 165 /* l */ +#define KEY_MINUS 166 /* m */ +#define KEY_PERIOD 167 /* n */ +#define KEY_DIVIDE 168 /* o */ +#define KEY_0 169 /* p */ +#define KEY_1 170 /* q */ +#define KEY_2 171 /* r */ +#define KEY_3 172 /* s */ +#define KEY_4 173 /* t */ +#define KEY_5 174 /* u */ +#define KEY_6 175 /* v */ +#define KEY_7 176 /* w */ +#define KEY_8 177 /* x */ +#define KEY_9 178 /* y */ +#define KEY_179 179 /* z */ +#define KEY_180 180 /* 0 */ +#define KEY_VT220_HOME 181 /* 1 */ +#define KEY_INSERT 182 /* 2 */ +#define KEY_DELETE 183 /* 3 */ +#define KEY_VT220_END 184 /* 4 */ +#define KEY_PGUP 185 /* 5 */ +#define KEY_PGDN 186 /* 6 */ +#define KEY_187 187 /* 7 */ +#define KEY_188 188 /* 8 */ +#define KEY_189 189 /* 9 */ +#define KEY_190 190 /* 10 */ +#define KEY_F1 191 /* 11 */ +#define KEY_F2 192 /* 12 */ +#define KEY_F3 193 /* 13 */ +#define KEY_F4 194 /* 14 */ +#define KEY_F5 195 /* 15 */ +#define KEY_196 196 /* 16 */ +#define KEY_F6 197 /* 17 */ +#define KEY_F7 198 /* 18 */ +#define KEY_F8 199 /* 19 */ +#define KEY_F9 200 /* 20 */ +#define KEY_F10 201 /* 21 */ +#define KEY_202 202 /* 22 */ +#define KEY_F11 203 /* 23 */ +#define KEY_F12 204 /* 24 */ +#define KEY_F13 205 /* 25 */ +#define KEY_F14 206 /* 26 */ +#define KEY_207 207 /* 27 */ +#define KEY_F15 208 /* 28 */ +#define KEY_F16 209 /* 29 */ +#define KEY_210 210 /* 30 */ +#define KEY_F17 211 /* 31 */ +#define KEY_F18 212 /* 32 */ +#define KEY_F19 213 /* 33 */ +#define KEY_F20 214 /* 34 */ #define KEY_NUM 215 #endif /* __KEYS_H__ */ diff --git a/src/terminal.c b/src/terminal.c index 6cdb15b..48f57a3 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.19 2008/03/07 14:16:44 james + * *** empty log message *** + * * Revision 1.18 2008/03/07 14:13:40 james * *** empty log message *** * @@ -136,6 +139,7 @@ terminal_close (TTY * _t) // // // + // // to // bottom t->xmit (_t, buf, i); diff --git a/src/util.c b/src/util.c index bd4bffe..23fad88 100644 --- a/src/util.c +++ b/src/util.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.11 2008/03/07 14:13:40 james + * *** empty log message *** + * * Revision 1.10 2008/03/07 13:16:02 james * *** empty log message *** * @@ -170,28 +173,37 @@ fput_cp (FILE * f, uint32_t ch) return fwrite (buf, i, 1, f); } -void crash_out(char *why) +void +crash_out (char *why) { -terminal_atexit(); -fprintf(stderr,"sympathy is aborting: %s\n",why ? why:""); -exit(1); + terminal_atexit (); + fprintf (stderr, "sympathy is aborting: %s\n", why ? why : ""); + exit (1); } -void *xmalloc(size_t s) +void * +xmalloc (size_t s) { -void *ret=malloc(s); -if (!ret) crash_out("malloc failed"); -return ret; + void *ret = malloc (s); + if (!ret) + crash_out ("malloc failed"); + return ret; } -void *xrealloc(void *p,size_t s) + +void * +xrealloc (void *p, size_t s) { -p=realloc(p,s); -if (!p) crash_out("realloc failed"); -return p; + p = realloc (p, s); + if (!p) + crash_out ("realloc failed"); + return p; } -char *xstrdup(const char *s) + +char * +xstrdup (const char *s) { -char *ret=strdup(s); -if (!ret) crash_out("strdup failed"); -return ret; + char *ret = strdup (s); + if (!ret) + crash_out ("strdup failed"); + return ret; } -- cgit v1.2.3