diff --git a/include/pcconf.h b/include/pcconf.h index 904c250c7..8b580b03a 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -73,7 +73,7 @@ * You may uncomment any/all of the options below. * */ -#ifndef SUPPRESS_GRAPHICS +#if defined(TTY_GRAPHICS) && !defined(SUPPRESS_GRAPHICS) #if (defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)) && !defined(PC9800) #if defined(TILES_IN_GLYPHMAP) || defined(ENHANCED_SYMBOLS) #define SCREEN_VGA /* Include VGA graphics routines in the build */ diff --git a/sys/msdos/msdos.c b/sys/msdos/msdos.c index a26c86c2c..e14210dfb 100644 --- a/sys/msdos/msdos.c +++ b/sys/msdos/msdos.c @@ -61,6 +61,7 @@ static unsigned int dos_ioctl(int, int, unsigned); extern boolean pckeys(unsigned char, unsigned char); /* pckeys.c */ #endif +#ifdef TTY_GRAPHICS int tgetch(void) { @@ -86,6 +87,7 @@ tgetch(void) #endif return ((ch == '\r') ? '\n' : ch); } +#endif /* TTY_GRAPHICS */ /* * Keyboard translation tables. diff --git a/sys/msdos/video.c b/sys/msdos/video.c index ec21aa695..bb94e83b6 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -89,7 +89,7 @@ get_scr_size(void) txt_get_scr_size(); } -#ifdef ENHANCED_SYMBOLS +#if defined(TTY_GRAPHICS) && defined(ENHANCED_SYMBOLS) void g_pututf8(uint8 *utf8str) { /* not implemented for msdos (yet) */ diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index 5ceaa4410..c26b1f4ea 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -271,7 +271,9 @@ msexit(void) restore_colors(); #endif wait_synch(); +#if !(defined(MSDOS) && !defined(TTY_GRAPHICS)) term_curs_set(1); +#endif return; } #endif /* MICRO || OS2 */ diff --git a/sys/share/pctty.c b/sys/share/pctty.c index 3d276fcc6..53f5bb45c 100644 --- a/sys/share/pctty.c +++ b/sys/share/pctty.c @@ -38,7 +38,9 @@ settty(const char *s) #if defined(MSDOS) && defined(NO_TERMS) gr_finish(); #endif +#if !(defined(MSDOS) && !defined(TTY_GRAPHICS)) term_end_screen(); +#endif if (s) raw_print(s); #if !defined(TOS) @@ -50,7 +52,9 @@ settty(const char *s) void setftty(void) { +#if !(defined(MSDOS) && !defined(TTY_GRAPHICS)) term_start_screen(); +#endif } #ifdef ENHANCED_SYMBOLS @@ -83,8 +87,10 @@ VA_DECL(const char *, s) VA_START(s); VA_INIT(s, const char *); /* error() may get called before tty is initialized */ +#if !(defined(MSDOS) && !defined(TTY_GRAPHICS)) if (iflags.window_inited) term_end_screen(); +#endif putchar('\n'); Vprintf(s, VA_ARGS); putchar('\n'); diff --git a/sys/unix/hints/include/cross-pre2.500 b/sys/unix/hints/include/cross-pre2.500 index 5fc642162..05803d7a9 100644 --- a/sys/unix/hints/include/cross-pre2.500 +++ b/sys/unix/hints/include/cross-pre2.500 @@ -177,7 +177,15 @@ MSDOS_GPP_CFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wreturn-type \ -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -pedantic \ -Wmissing-declarations -Wformat-nonliteral -Wunreachable-code \ -Wno-maybe-uninitialized -ifdef NO_GRAPHICS +ifndef WANT_WIN_TTY + # A Curses-only configuration + MSDOS_GRAPH_CONFIG = -DNOTTYGRAPHICS + SKIP_TILES = 1 + ifndef WANT_DOSVGA + SKIP_FONTS = 1 + endif + SKIP_FONT_C = 1 +else ifdef NO_GRAPHICS MSDOS_GRAPH_CONFIG = -DSUPPRESS_GRAPHICS # Curses will need the fonts, but not font.c ifndef WANT_DOSVGA