From d1e79ed7b6329d2c7e26a99402d90b0041fc593f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 2 Nov 2004 00:23:46 +0000 Subject: [PATCH] We can now override the docfile location. --- makefile | 2 +- sst.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 2b7f50d..e03770f 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -CFLAGS= -O -g +CFLAGS= -O -g -DSSTDOC='"sst.doc"' .c.o: $(CC) $(CFLAGS) -c $< diff --git a/sst.c b/sst.c index b3a0202..ae209e2 100644 --- a/sst.c +++ b/sst.c @@ -6,6 +6,10 @@ #include #endif #include + +#ifndef SSTDOC +#define SSTDOC "sst.doc" +#endif int getch(void); @@ -135,7 +139,7 @@ static void helpme(void) { cmdbuf[j] = toupper(commands[i][j]); cmdbuf[j] = '\0'; } - fp = fopen("sst.doc", "r"); + fp = fopen(SSTDOC, "r"); if (fp == NULL) { prout("Spock- \"Captain, that information is missing from the"); prout(" computer. You need to find SST.DOC and put it in the"); -- 2.31.1