Support the Curses-only configuration

This commit is contained in:
Ray Chason
2026-07-10 09:08:55 -04:00
parent 7889eedfa5
commit e00b32263e
6 changed files with 21 additions and 3 deletions
+1 -1
View File
@@ -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 */
+2
View File
@@ -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.
+1 -1
View File
@@ -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) */
+2
View File
@@ -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 */
+6
View File
@@ -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');
+9 -1
View File
@@ -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