From c456b313a706363879a77fb3cda5f602e05ff69d Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 31 Jan 2019 13:03:00 -0500 Subject: [PATCH] Revert "adjust sample config file when STATUS_HILITES isn't defined" This reverts commit 03e6c26af6de62f6a970d5b0c9845f924bfc93f4. --- util/makedefs.c | 58 +------------------------------------------------ 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/util/makedefs.c b/util/makedefs.c index f83974d85..33cf3b2a5 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -111,15 +111,6 @@ static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.6\t2018/03/02"; #endif /* else !MAC */ #endif /* else !AMIGA */ -#if !defined(STATUS_HILITES) && defined(WIN32) -#define FIX_SAMPLECONFIG -#endif - -#ifdef WIN32 -#define SAMPLE_CONFIGFILE "../sys/winnt/defaults.nh" -#define FIXED_CONFIGFILE "./fixed_defaults.nh" -#endif - static const char *Dont_Edit_Code = "/* This source file is generated by 'makedefs'. Do not edit. */\n", @@ -173,9 +164,6 @@ void NDECL(do_questtxt); void NDECL(do_rumors); void NDECL(do_oracles); void NDECL(do_vision); -#ifdef WIN32 -void NDECL(do_fix_sampleconfig); -#endif extern void NDECL(monst_init); /* monst.c */ extern void NDECL(objects_init); /* objects.c */ @@ -378,12 +366,7 @@ char *options; case 'Z': do_vision(); break; -#ifdef WIN32 - case 'c': - case 'C': - do_fix_sampleconfig(); - break; -#endif + default: Fprintf(stderr, "Unknown option '%c'.\n", *options); (void) fflush(stderr); @@ -1476,45 +1459,6 @@ char *githash, *gitbranch; return FALSE; } -#ifdef WIN32 -void -do_fix_sampleconfig() -{ - FILE *scfp, *ofcfp; - char fixedline[BUFSZ]; - char *line; - - if (!(scfp = fopen(SAMPLE_CONFIGFILE, RDTMODE))) { - return; - } - if (!(ofcfp = fopen(FIXED_CONFIGFILE, WRTMODE))) { - return; - } - - /* read the sample config file */ - while ((line = fgetline(scfp)) != 0) { - /* comment out the STATUS_HILITES related lines */ - if (strlen(line) < (BUFSZ - 1)) { - if (strstr(line, "statushilites") || strstr(line, "hilite_status:")) { -#ifdef FIX_SAMPLECONFIG - fixedline[0] = '#'; - Strcpy(&fixedline[1], line); -#else - Strcpy(fixedline, line); -#endif - fputs(fixedline, ofcfp); - } else { - fputs(line, ofcfp); - } - } - free(line); - } - Fclose(scfp); - Fclose(ofcfp); - return; -} -#endif /* WIN32 */ - static int case_insensitive_comp(s1, s2) const char *s1; -- 2.49.0