From 4aec4b29588f30d61971950e3e9afbc409866a9b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 30 Jul 1999 08:33:50 +0000 Subject: [PATCH] (make_terminal_frame) [MSDOS]: Don't call init_frame_faces if non-interactive. (Fframe_parameters) [MSDOS]: Replace indexing into colornames[] array with a call to msdos_stdcolor_name. The font name is now "ms-dos", consistent with realize_tty_face. --- src/frame.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/frame.c b/src/frame.c index 2aba671db51..fa276cb38ef 100644 --- a/src/frame.c +++ b/src/frame.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "window.h" #ifdef MSDOS #include "msdos.h" +#include "dosfns.h" #endif /* Evaluate this expression to rebuild the section of syms_of_frame @@ -538,10 +539,12 @@ make_terminal_frame () #ifdef MSDOS f->output_data.x = &the_only_x_display; f->output_method = output_msdos_raw; + if (!noninteractive) + init_frame_faces (f); #else /* not MSDOS */ f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */ -#endif init_frame_faces (f); +#endif return f; } @@ -1948,18 +1951,15 @@ If FRAME is omitted, return information on the currently selected frame.") #ifdef MSDOS if (FRAME_MSDOS_P (f)) { - static char *colornames[16] = - { - "black", "blue", "green", "cyan", "red", "magenta", "brown", - "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan", - "lightred", "lightmagenta", "yellow", "white" - }; + int fg = FRAME_FOREGROUND_PIXEL (f); + int bg = FRAME_BACKGROUND_PIXEL (f); + store_in_alist (&alist, intern ("foreground-color"), - build_string (colornames[FRAME_FOREGROUND_PIXEL (f)])); + build_string (msdos_stdcolor_name (fg))); store_in_alist (&alist, intern ("background-color"), - build_string (colornames[FRAME_BACKGROUND_PIXEL (f)])); + build_string (msdos_stdcolor_name (bg))); } - store_in_alist (&alist, intern ("font"), build_string ("default")); + store_in_alist (&alist, intern ("font"), build_string ("ms-dos")); #endif store_in_alist (&alist, Qname, f->name); height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); -- 2.39.5