From: Eric S. Raymond Date: Tue, 2 Nov 2004 00:23:46 +0000 (+0000) Subject: We can now override the docfile location. X-Git-Tag: 2.0~438 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=d1e79ed7b6329d2c7e26a99402d90b0041fc593f We can now override the docfile location. --- 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");