fix dos cross-compile attempt 2
This commit is contained in:
@@ -83,8 +83,7 @@ PDCURSESDEF= -I$(PDCTOP) -I$(PDCPORT) \
|
|||||||
else
|
else
|
||||||
PDCPORT = $(PDCTOP)/dos
|
PDCPORT = $(PDCTOP)/dos
|
||||||
PDCURSESDEF= -I$(PDCTOP) -I$(PDCPORT) \
|
PDCURSESDEF= -I$(PDCTOP) -I$(PDCPORT) \
|
||||||
-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" \
|
-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
|
||||||
-D"PDC_WIDE"
|
|
||||||
endif # WANT_DOSVGA
|
endif # WANT_DOSVGA
|
||||||
PDCLIBOBJ1= $(TARGETPFX)addch.o $(TARGETPFX)addchstr.o \
|
PDCLIBOBJ1= $(TARGETPFX)addch.o $(TARGETPFX)addchstr.o \
|
||||||
$(TARGETPFX)addstr.o $(TARGETPFX)attr.o \
|
$(TARGETPFX)addstr.o $(TARGETPFX)attr.o \
|
||||||
|
|||||||
@@ -72,7 +72,11 @@ struct window_procs curses_procs = {
|
|||||||
curses_destroy_nhwindow,
|
curses_destroy_nhwindow,
|
||||||
curses_curs,
|
curses_curs,
|
||||||
curses_putstr,
|
curses_putstr,
|
||||||
|
#if !defined(PDCURSES) || defined(PDC_WIDE)
|
||||||
curses_putmixed,
|
curses_putmixed,
|
||||||
|
#else
|
||||||
|
genl_putmixed,
|
||||||
|
#endif
|
||||||
curses_display_file,
|
curses_display_file,
|
||||||
curses_start_menu,
|
curses_start_menu,
|
||||||
curses_add_menu,
|
curses_add_menu,
|
||||||
|
|||||||
@@ -68,7 +68,9 @@ curses_message_win_puts(const char *message, boolean recursed)
|
|||||||
boolean bold, border = curses_window_has_border(MESSAGE_WIN),
|
boolean bold, border = curses_window_has_border(MESSAGE_WIN),
|
||||||
have_mixed_leadin = FALSE, adjustbold = FALSE;
|
have_mixed_leadin = FALSE, adjustbold = FALSE;
|
||||||
int message_length = (int) strlen(message);
|
int message_length = (int) strlen(message);
|
||||||
|
#if !defined(PDCURSES) || defined(PDC_WIDE)
|
||||||
cchar_t mixed_leadin_cchar[2];
|
cchar_t mixed_leadin_cchar[2];
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
@@ -118,6 +120,7 @@ curses_message_win_puts(const char *message, boolean recursed)
|
|||||||
linespace -= 2;
|
linespace -= 2;
|
||||||
bold = (height > 1 && !last_messages);
|
bold = (height > 1 && !last_messages);
|
||||||
|
|
||||||
|
#if !defined(PDCURSES) || defined(PDC_WIDE)
|
||||||
if (mesg_mixed) {
|
if (mesg_mixed) {
|
||||||
wchar_t w[2];
|
wchar_t w[2];
|
||||||
int leadin_color;
|
int leadin_color;
|
||||||
@@ -146,6 +149,7 @@ curses_message_win_puts(const char *message, boolean recursed)
|
|||||||
message_length++; /* account for that additional column */
|
message_length++; /* account for that additional column */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* !PDCURSES || PDC_WIDE */
|
||||||
|
|
||||||
if (linespace < message_length) {
|
if (linespace < message_length) {
|
||||||
if (my - border_space >= height - 1) {
|
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) {
|
if (mx == border_space && message_length > width - 3) {
|
||||||
/* split needed */
|
/* split needed */
|
||||||
tmpstr = curses_break_str(message, (width - 3), 1);
|
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);
|
mvwadd_wch(win, my, mx, mixed_leadin_cchar);
|
||||||
++mx;
|
++mx;
|
||||||
message_length--;
|
message_length--;
|
||||||
have_mixed_leadin = FALSE;
|
have_mixed_leadin = FALSE;
|
||||||
mesg_mixed = 0;
|
mesg_mixed = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
mvwprintw(win, my, mx, "%s", tmpstr), mx += (int) strlen(tmpstr);
|
mvwprintw(win, my, mx, "%s", tmpstr), mx += (int) strlen(tmpstr);
|
||||||
/* one space to separate first part of message from rest [is this
|
/* one space to separate first part of message from rest [is this
|
||||||
actually useful?] */
|
actually useful?] */
|
||||||
@@ -205,6 +211,7 @@ curses_message_win_puts(const char *message, boolean recursed)
|
|||||||
curses_message_win_puts(tmpstr, TRUE);
|
curses_message_win_puts(tmpstr, TRUE);
|
||||||
free(tmpstr);
|
free(tmpstr);
|
||||||
} else {
|
} else {
|
||||||
|
#if !defined(PDCURSES) || defined(PDC_WIDE)
|
||||||
if (have_mixed_leadin) {
|
if (have_mixed_leadin) {
|
||||||
mvwadd_wch(win, my, mx, mixed_leadin_cchar);
|
mvwadd_wch(win, my, mx, mixed_leadin_cchar);
|
||||||
++mx;
|
++mx;
|
||||||
@@ -212,6 +219,7 @@ curses_message_win_puts(const char *message, boolean recursed)
|
|||||||
have_mixed_leadin = FALSE;
|
have_mixed_leadin = FALSE;
|
||||||
mesg_mixed = 0;
|
mesg_mixed = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
mvwprintw(win, my, mx, "%s", message), mx += message_length;
|
mvwprintw(win, my, mx, "%s", message), mx += message_length;
|
||||||
if (bold || adjustbold)
|
if (bold || adjustbold)
|
||||||
curses_toggle_color_attr(win, NONE, A_BOLD, OFF);
|
curses_toggle_color_attr(win, NONE, A_BOLD, OFF);
|
||||||
|
|||||||
Reference in New Issue
Block a user