X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1dd40212a5e2fe8fd3b03d870bc38f21199901bb..4c8975adc59705c9620aa8816e0982dc47ab456b:/src/term.c diff --git a/src/term.c b/src/term.c index ecbca87c8b..0b59e13b9f 100644 --- a/src/term.c +++ b/src/term.c @@ -382,7 +382,7 @@ set_scroll_region (start, stop) buf = tparam (TS_set_window, 0, 0, start, 0, stop, FRAME_WIDTH (selected_frame)); } OUTPUT (buf); - free (buf); + xfree (buf); losecursor (); } @@ -787,7 +787,7 @@ insert_glyphs (start, len) { buf = tparam (TS_ins_multi_chars, 0, 0, len); OUTPUT1 (buf); - free (buf); + xfree (buf); if (start) write_glyphs (start, len); return; @@ -851,7 +851,7 @@ delete_glyphs (n) { buf = tparam (TS_del_multi_chars, 0, 0, n); OUTPUT1 (buf); - free (buf); + xfree (buf); } else for (i = 0; i < n; i++) @@ -896,7 +896,7 @@ ins_del_lines (vpos, n) background_highlight (); buf = tparam (multi, 0, 0, i); OUTPUT (buf); - free (buf); + xfree (buf); } else if (single) { @@ -1238,7 +1238,6 @@ term_get_fkeys (address) char **address; { extern char *tgetstr (); - char capval[32]; int i; for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) @@ -1288,9 +1287,9 @@ term_get_fkeys (address) else fcap[1] = 'a' + i - 11; - if (tgetstr(fcap, &capval)) + if (tgetstr (fcap, address)) { - (void) sprintf(fkey, "f%d", i); + (void) sprintf (fkey, "f%d", i); Fdefine_key (Vfunction_key_map, build_string (fcap), Fmake_vector (make_number (1), intern (fkey))); @@ -1302,18 +1301,18 @@ term_get_fkeys (address) * Various mappings to try and get a better fit. */ { -#define CONDITIONAL_REASSIGN(cap1, cap2, sym) \ - if (!tgetstr(cap1, &capval) && tgetstr(cap2, &capval)) \ - Fdefine_key (Vfunction_key_map, \ - build_string (cap2), \ - Fmake_vector (make_number (1), intern (sym))) +#define CONDITIONAL_REASSIGN(cap1, cap2, sym) \ + if (!tgetstr (cap1, address) && tgetstr (cap2, address)) \ + Fdefine_key (Vfunction_key_map, \ + build_string (cap2), \ + Fmake_vector (make_number (1), intern (sym))) /* if there's no key_next keycap, map key_npage to `next' keysym */ - CONDITIONAL_REASSIGN("%5", "kN", "next"); + CONDITIONAL_REASSIGN ("%5", "kN", "next"); /* if there's no key_prev keycap, map key_ppage to `previous' keysym */ - CONDITIONAL_REASSIGN("%8", "kP", "previous"); + CONDITIONAL_REASSIGN ("%8", "kP", "previous"); /* if there's no key_dc keycap, map key_ic to `insert' keysym */ - CONDITIONAL_REASSIGN("kD", "kI", "insert"); + CONDITIONAL_REASSIGN ("kD", "kI", "insert"); #undef CONDITIONAL_REASSIGN } }