From dc2539701a05e1cb90362dd45e9f576eee4a21c2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 4 Dec 2018 11:59:41 -0500 Subject: [PATCH] Revert "some fixes provided from Hardfought" This reverts commit ab9e28d1aaa7a009e5051dcbee6bbbccf62804e5. --- include/flag.h | 3 +- include/wincurs.h | 3 ++ src/files.c | 9 +----- src/options.c | 67 +------------------------------------------ sys/unix/Makefile.src | 8 ------ 5 files changed, 6 insertions(+), 84 deletions(-) diff --git a/include/flag.h b/include/flag.h index e3d0a5143..0623ec526 100644 --- a/include/flag.h +++ b/include/flag.h @@ -322,13 +322,12 @@ struct instance_flags { #endif #endif uchar bouldersym; /* symbol for boulder display */ -#if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS) +#ifdef TTY_GRAPHICS char prevmsg_window; /* type of old message window to use */ #endif #if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS) boolean extmenu; /* extended commands use menu interface */ #endif - #ifdef MFLOPPY boolean checkspace; /* check disk space before writing files */ /* (in iflags to allow restore after moving diff --git a/include/wincurs.h b/include/wincurs.h index be79256b7..55e7f1d22 100644 --- a/include/wincurs.h +++ b/include/wincurs.h @@ -259,6 +259,9 @@ extern void curses_del_menu(winid wid); extern void curses_status_init(void); extern void curses_status_update(int, genericptr_t, int, int, int, unsigned long *); +/* extern attr_t curses_color_attr(int nh_color, int bg_color); */ +/* extern void curses_update_stats(void); */ +/* extern void curses_decrement_highlight(void); */ /* cursinvt.c */ diff --git a/src/files.c b/src/files.c index 2fd0f89c1..3dd137743 100644 --- a/src/files.c +++ b/src/files.c @@ -3185,14 +3185,7 @@ int which_set; if (symset[which_set].name && (fuzzymatch(symset[which_set].name, "Default symbols", " -_", TRUE) - || !strcmpi(symset[which_set].name, "default") -#ifdef CURSES_GRAPHICS - /* we don't maintain static symbols for curses - * the system defines these at runtime - */ - || !strcmpi(symset[which_set].name, "curses") -#endif - )) + || !strcmpi(symset[which_set].name, "default"))) clear_symsetentry(which_set, TRUE); config_error_done(); return (symset[which_set].name == 0) ? 1 : 0; diff --git a/src/options.c b/src/options.c index 51f0d6d8f..8be8cfcd3 100644 --- a/src/options.c +++ b/src/options.c @@ -106,7 +106,7 @@ static struct Bool_Opt { #endif { "clicklook", &iflags.clicklook, FALSE, SET_IN_GAME }, { "cmdassist", &iflags.cmdassist, TRUE, SET_IN_GAME }, -#if defined(MICRO) || defined(WIN32) || defined(CURSES_GRAPHICS) +#if defined(MICRO) || defined(WIN32) { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /*WC*/ #else /* systems that support multiple terminals, many monochrome */ { "color", &iflags.wc_color, FALSE, SET_IN_GAME }, /*WC*/ @@ -3626,71 +3626,6 @@ boolean tinitial, tfrom_file; } #endif - /* WINCAP2 - * term_cols:amount */ - fullname = "term_cols"; - if (match_optname(opts, fullname, sizeof("term_cols")-1, TRUE)) { - op = string_for_opt(opts, negated); - iflags.wc2_term_cols = atoi(op); - if (negated) bad_negation(fullname, FALSE); - return retval; - } - - /* WINCAP2 - * term_rows:amount */ - fullname = "term_rows"; - if (match_optname(opts, fullname, sizeof("term_rows")-1, TRUE)) { - op = string_for_opt(opts, negated); - iflags.wc2_term_rows = atoi(op); - if (negated) bad_negation(fullname, FALSE); - return retval; - } - - /* WINCAP2 - * petattr:string */ - fullname = "petattr"; - if (match_optname(opts, fullname, sizeof("petattr")-1, TRUE)) { - op = string_for_opt(opts, negated); - if (op && !negated) { -#ifdef CURSES_GRAPHICS - iflags.wc2_petattr = curses_read_attrs(op); - if (!curses_read_attrs(op)) - config_error_add("Unknown %s parameter '%s'", fullname, opts); - return FALSE; -#else - /* non-curses windowports will not use this flag anyway - * but the above will not compile if we don't have curses. - * Just set it to a sensible default: */ - iflags.wc2_petattr = ATR_INVERSE -#endif - } else if (negated) bad_negation(fullname, TRUE); - return retval; - } - - /* WINCAP2 - * windowborders:n */ - fullname = "windowborders"; - if (match_optname(opts, fullname, sizeof("windowborders")-1, TRUE)) { - op = string_for_opt(opts, negated); - if (negated && op) bad_negation(fullname, TRUE); - else { - if (negated) - iflags.wc2_windowborders = 2; /* Off */ - else if (!op) - iflags.wc2_windowborders = 1; /* On */ - else /* Value supplied */ - iflags.wc2_windowborders = atoi(op); - if ((iflags.wc2_windowborders > 3) || - (iflags.wc2_windowborders < 1)) { - iflags.wc2_windowborders = 0; - config_error_add("Unknown %s parameter '%s'", fullname, opts); - return FALSE; - - } - } - return retval; - } - /* menustyle:traditional or combination or full or partial */ fullname = "menustyle"; if (match_optname(opts, fullname, 4, TRUE)) { diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 38523fd36..07d5d5920 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -198,14 +198,6 @@ REGEXOBJ = posixregex.o WINTTYSRC = ../win/tty/getline.c ../win/tty/termcap.c ../win/tty/topl.c \ ../win/tty/wintty.c WINTTYOBJ = getline.o termcap.o topl.o wintty.o -# Files for curses interface -WINCURSESSRC = ../win/curses/cursmain.c ../win/curses/curswins.c \ - ../win/curses/cursmisc.c ../win/curses/cursdial.c \ - ../win/curses/cursstat.c ../win/curses/cursinit.c \ - ../win/curses/cursmesg.c ../win/curses/cursinvt.c -WINCURSESOBJ = cursmain.o curswins.o cursmisc.o cursdial.o cursstat.o \ - cursinit.o cursmesg.o cursinvt.o - # # Files for curses interface WINCURSESSRC = ../win/curses/cursmain.c ../win/curses/curswins.c \ -- 2.40.0