We can now override the docfile location.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 2 Nov 2004 00:23:46 +0000 (00:23 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 2 Nov 2004 00:23:46 +0000 (00:23 +0000)
makefile
sst.c

index 2b7f50da79345e440d6ff6ab01bafec11f72e440..e03770f2c8788d3048d3ee4832e9c21c164ff60a 100644 (file)
--- 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 b3a0202663bd5d6760366c82f8a1bf73d4f24545..ae209e2cb373ed7cf7ad8a156e1fbf01b55bc092 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -6,6 +6,10 @@
 #include <dos.h>\r
 #endif\r
 #include <time.h>\r
+\r
+#ifndef SSTDOC\r
+#define SSTDOC "sst.doc"\r
+#endif\r
        \r
 int getch(void);\r
 \r
@@ -135,7 +139,7 @@ static void helpme(void) {
                cmdbuf[j] = toupper(commands[i][j]);\r
            cmdbuf[j] = '\0';\r
        }\r
-       fp = fopen("sst.doc", "r");\r
+       fp = fopen(SSTDOC, "r");\r
        if (fp == NULL) {\r
                prout("Spock-  \"Captain, that information is missing from the");\r
                prout("   computer. You need to find SST.DOC and put it in the");\r