1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--- battalion.c.orig Thu Jan 16 09:31:59 1997
+++ battalion.c Sun Sep 13 12:51:53 1998
@@ -2874,11 +2874,16 @@
if (dataPath[strlen(dataPath)-1] != '/')
strcat(dataPath, "/");
-
- strcpy(fullPath, dataPath);
- strcat(fullPath, "battalion.sho");
- roadFile = fopen(fullPath, "rb");
}
+ else {
+ strcat(dataPath, DATADIR);
+ if (dataPath[strlen(dataPath)-1] != '/')
+ strcat(dataPath, "/");
+ }
+ strcpy(fullPath, dataPath);
+ strcat(fullPath, "battalion.sho");
+ roadFile = fopen(fullPath, "rb");
+
#endif
if (roadFile != NULL)
@@ -2898,10 +2903,10 @@
else
*/
{
- roadFile = fopen("./battalion.data/battalion.sho", "rb");
+ roadFile = fopen(DATADIR "battalion.data/battalion.sho", "rb");
if (roadFile != NULL)
{
- strcpy(dataPath, "./battalion.data/");
+ strcpy(dataPath, DATADIR "battalion.data/");
fclose(roadFile);
}
else
@@ -2990,7 +2995,7 @@
if (dataPtr != NULL)
strcpy(scoredataPath, dataPtr);
else
- strcpy(scoredataPath, "/usr/tmp");
+ strcpy(scoredataPath, VARDIR);
if (scoredataPath[strlen(scoredataPath)-1] != '/')
strcat(scoredataPath, "/");
|