use xmalloc_atomic for many pointerless objects
[bpt/emacs.git] / src / term.c
index 37a938e..500c1f2 100644 (file)
@@ -527,9 +527,6 @@ static ptrdiff_t encode_terminal_dst_size;
    Set CODING->produced to the byte-length of the resulting byte
    sequence, and return a pointer to that byte sequence.  */
 
-#ifndef DOS_NT
-static
-#endif
 unsigned char *
 encode_terminal_code (struct glyph *src, int src_len,
                      struct coding_system *coding)
@@ -1864,7 +1861,7 @@ produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
            acronym = XCDR (acronym);
          buf[0] = '[';
          str = STRINGP (acronym) ? SSDATA (acronym) : "";
-         for (len = 0; len < 6 && str[len] && ASCII_BYTE_P (str[len]); len++)
+         for (len = 0; len < 6 && str[len] && ASCII_CHAR_P (str[len]); len++)
            buf[1 + len] = str[len];
          buf[1 + len] = ']';
          len += 2;
@@ -3583,9 +3580,6 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
 }
 
 /* WINDOWSNT uses this as menu_show_hook, see w32console.c.  */
-#ifndef WINDOWSNT
-static
-#endif
 Lisp_Object
 tty_menu_show (struct frame *f, int x, int y, int menuflags,
               Lisp_Object title, const char **error_name)
@@ -3621,9 +3615,7 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
       return Qnil;
     }
 
-  /* Don't GC while we prepare and show the menu, because we give the
-     menu functions pointers to the contents of strings.  */
-  specpdl_count = inhibit_garbage_collection ();
+  specpdl_count = SPECPDL_INDEX ();
 
   /* Avoid crashes if, e.g., another client will connect while we
      are in a menu.  */