diff options
| author | Eric S. Raymond | 1993-03-17 13:11:50 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 1993-03-17 13:11:50 +0000 |
| commit | 1dd40212a5e2fe8fd3b03d870bc38f21199901bb (patch) | |
| tree | 4246705e9fb3d0ce5a605c3fedd8435d71b38057 /src | |
| parent | 856c3dcba871df8f1b01ea9f1c9f63fbc5d79e30 (diff) | |
| download | emacs-1dd40212a5e2fe8fd3b03d870bc38f21199901bb.tar.gz emacs-1dd40212a5e2fe8fd3b03d870bc38f21199901bb.zip | |
Supply second arg for tgetstr() calls.
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index 0d414ab2f9b..ecbca87c8b7 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1238,6 +1238,7 @@ term_get_fkeys (address) | |||
| 1238 | char **address; | 1238 | char **address; |
| 1239 | { | 1239 | { |
| 1240 | extern char *tgetstr (); | 1240 | extern char *tgetstr (); |
| 1241 | char capval[32]; | ||
| 1241 | int i; | 1242 | int i; |
| 1242 | 1243 | ||
| 1243 | for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) | 1244 | for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) |
| @@ -1287,7 +1288,7 @@ term_get_fkeys (address) | |||
| 1287 | else | 1288 | else |
| 1288 | fcap[1] = 'a' + i - 11; | 1289 | fcap[1] = 'a' + i - 11; |
| 1289 | 1290 | ||
| 1290 | if (tgetstr(fcap)) | 1291 | if (tgetstr(fcap, &capval)) |
| 1291 | { | 1292 | { |
| 1292 | (void) sprintf(fkey, "f%d", i); | 1293 | (void) sprintf(fkey, "f%d", i); |
| 1293 | Fdefine_key (Vfunction_key_map, | 1294 | Fdefine_key (Vfunction_key_map, |
| @@ -1302,7 +1303,7 @@ term_get_fkeys (address) | |||
| 1302 | */ | 1303 | */ |
| 1303 | { | 1304 | { |
| 1304 | #define CONDITIONAL_REASSIGN(cap1, cap2, sym) \ | 1305 | #define CONDITIONAL_REASSIGN(cap1, cap2, sym) \ |
| 1305 | if (!tgetstr(cap1) && tgetstr(cap2)) \ | 1306 | if (!tgetstr(cap1, &capval) && tgetstr(cap2, &capval)) \ |
| 1306 | Fdefine_key (Vfunction_key_map, \ | 1307 | Fdefine_key (Vfunction_key_map, \ |
| 1307 | build_string (cap2), \ | 1308 | build_string (cap2), \ |
| 1308 | Fmake_vector (make_number (1), intern (sym))) | 1309 | Fmake_vector (make_number (1), intern (sym))) |
| @@ -1313,6 +1314,7 @@ term_get_fkeys (address) | |||
| 1313 | CONDITIONAL_REASSIGN("%8", "kP", "previous"); | 1314 | CONDITIONAL_REASSIGN("%8", "kP", "previous"); |
| 1314 | /* if there's no key_dc keycap, map key_ic to `insert' keysym */ | 1315 | /* if there's no key_dc keycap, map key_ic to `insert' keysym */ |
| 1315 | CONDITIONAL_REASSIGN("kD", "kI", "insert"); | 1316 | CONDITIONAL_REASSIGN("kD", "kI", "insert"); |
| 1317 | #undef CONDITIONAL_REASSIGN | ||
| 1316 | } | 1318 | } |
| 1317 | } | 1319 | } |
| 1318 | 1320 | ||