fix dos cross-compile attempt 2

This commit is contained in:
nhmall
2023-06-06 20:09:27 -04:00
parent b21ef624eb
commit da08bb98e1
3 changed files with 14 additions and 3 deletions

View File

@@ -83,8 +83,7 @@ PDCURSESDEF= -I$(PDCTOP) -I$(PDCPORT) \
else
PDCPORT = $(PDCTOP)/dos
PDCURSESDEF= -I$(PDCTOP) -I$(PDCPORT) \
-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" \
-D"PDC_WIDE"
-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
endif # WANT_DOSVGA
PDCLIBOBJ1= $(TARGETPFX)addch.o $(TARGETPFX)addchstr.o \
$(TARGETPFX)addstr.o $(TARGETPFX)attr.o \

View File

@@ -72,7 +72,11 @@ struct window_procs curses_procs = {
curses_destroy_nhwindow,
curses_curs,
curses_putstr,
#if !defined(PDCURSES) || defined(PDC_WIDE)
curses_putmixed,
#else
genl_putmixed,
#endif
curses_display_file,
curses_start_menu,
curses_add_menu,

View File

@@ -68,7 +68,9 @@ curses_message_win_puts(const char *message, boolean recursed)
boolean bold, border = curses_window_has_border(MESSAGE_WIN),
have_mixed_leadin = FALSE, adjustbold = FALSE;
int message_length = (int) strlen(message);
#if !defined(PDCURSES) || defined(PDC_WIDE)
cchar_t mixed_leadin_cchar[2];
#endif
#if 0
/*
@@ -118,6 +120,7 @@ curses_message_win_puts(const char *message, boolean recursed)
linespace -= 2;
bold = (height > 1 && !last_messages);
#if !defined(PDCURSES) || defined(PDC_WIDE)
if (mesg_mixed) {
wchar_t w[2];
int leadin_color;
@@ -146,6 +149,7 @@ curses_message_win_puts(const char *message, boolean recursed)
message_length++; /* account for that additional column */
}
}
#endif /* !PDCURSES || PDC_WIDE */
if (linespace < message_length) {
if (my - border_space >= height - 1) {
@@ -186,13 +190,15 @@ curses_message_win_puts(const char *message, boolean recursed)
if (mx == border_space && message_length > width - 3) {
/* split needed */
tmpstr = curses_break_str(message, (width - 3), 1);
if (have_mixed_leadin) {
#if !defined(PDCURSES) || defined(PDC_WIDE)
if (have_mixed_leadin) {
mvwadd_wch(win, my, mx, mixed_leadin_cchar);
++mx;
message_length--;
have_mixed_leadin = FALSE;
mesg_mixed = 0;
}
#endif
mvwprintw(win, my, mx, "%s", tmpstr), mx += (int) strlen(tmpstr);
/* one space to separate first part of message from rest [is this
actually useful?] */
@@ -205,6 +211,7 @@ curses_message_win_puts(const char *message, boolean recursed)
curses_message_win_puts(tmpstr, TRUE);
free(tmpstr);
} else {
#if !defined(PDCURSES) || defined(PDC_WIDE)
if (have_mixed_leadin) {
mvwadd_wch(win, my, mx, mixed_leadin_cchar);
++mx;
@@ -212,6 +219,7 @@ curses_message_win_puts(const char *message, boolean recursed)
have_mixed_leadin = FALSE;
mesg_mixed = 0;
}
#endif
mvwprintw(win, my, mx, "%s", message), mx += message_length;
if (bold || adjustbold)
curses_toggle_color_attr(win, NONE, A_BOLD, OFF);