Support wide Curses on MS-DOS

Also, fix IBMGraphics on Curses
This commit is contained in:
Ray Chason
2022-10-02 20:41:02 -04:00
parent a8bfeb4dca
commit 8b6fe9d205
31 changed files with 315263 additions and 22 deletions
+19
View File
@@ -154,11 +154,30 @@ curses_init_nhwindows(int *argcp UNUSED,
char **argv UNUSED)
{
#ifdef PDCURSES
static char pdc_font[BUFSZ] = "";
char window_title[BUFSZ];
#endif
#ifdef CURSES_UNICODE
setlocale(LC_CTYPE, "");
#ifdef PDCURSES
/* Assume the DOSVGA port of PDCursesMod, or the SDL1 or SDL2 port of
either PDCurses or PDCursesMod. Honor the font_map option to set
a font.
On MS-DOS, if no font_map is set, use ter-u16v.psf if it is present.
PDC_FONT has no effect on other PDCurses or PDCursesMod ports. */
if (iflags.wc_font_map && iflags.wc_font_map[0]) {
Snprintf(pdc_font, sizeof(pdc_font), "PDC_FONT=%s",
iflags.wc_font_map);
#ifdef MSDOS
} else if (access("ter-u16v.psf", R_OK) >= 0) {
Snprintf(pdc_font, sizeof(pdc_font), "PDC_FONT=ter-u16v.psf");
#endif
}
if (pdc_font[0] != '\0') {
putenv(pdc_font);
}
#endif
#endif
#ifdef XCURSES