]> code.delx.au - gnu-emacs/blobdiff - src/term.c
(wait_for_termination): Copy code from 18.59 (but sans BSD4_1 alternatives).
[gnu-emacs] / src / term.c
index bf3087e0b9fe1a007d7806e7bacfb98fb56e1f36..0b59e13b9fc9827ad24d09d764414f6527243bc3 100644 (file)
@@ -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 ();
 }
 \f
@@ -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)
     {
@@ -1065,6 +1065,8 @@ calculate_ins_del_char_costs (frame)
 extern int x_screen_planes;
 #endif
 
+extern do_line_insertion_deletion_costs ();
+
 calculate_costs (frame)
      FRAME_PTR frame;
 {
@@ -1285,9 +1287,9 @@ term_get_fkeys (address)
        else
          fcap[1] = 'a' + i - 11;
 
-       if (tgetstr(fcap))
+       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)));
@@ -1299,18 +1301,19 @@ term_get_fkeys (address)
    * Various mappings to try and get a better fit.
    */
   {
-#define CONDITIONAL_REASSIGN(cap1, cap2, sym) \
-      if (!tigetstr(cap1) && tgetstr(cap2)) \
-           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
   }
 }