blob: d0da71f300cbbfed4d587d4f1fc616fc08a47746 (
plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
$NetBSD: patch-af,v 1.1 2002/04/04 16:47:55 atatat Exp $
Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
--- libannotate/drawMarkers.cc.orig Tue Jan 22 21:07:42 2002
+++ libannotate/drawMarkers.cc Tue Apr 2 22:43:04 2002
@@ -92,6 +92,74 @@
return(true);
}
+ char *xplanet = getenv("XPLANET");
+ if (xplanet != NULL)
+ {
+ if (locale)
+ {
+ markerfile = xplanet;
+ markerfile += separator;
+ markerfile += "markers";
+ markerfile += separator;
+ markerfile += locale_string;
+ markerfile += filename;
+
+ if (fileExists(markerfile))
+ {
+ filename = markerfile;
+ return(true);
+ }
+ }
+
+ markerfile = xplanet;
+ markerfile += separator;
+ markerfile += "markers";
+ markerfile += separator;
+ markerfile += filename;
+
+ if (fileExists(markerfile))
+ {
+ filename = markerfile;
+ return(true);
+ }
+ }
+
+ char *home = getenv("HOME");
+ if (home != NULL)
+ {
+ if (locale)
+ {
+ markerfile = home;
+ markerfile += separator;
+ markerfile += ".xplanet";
+ markerfile += separator;
+ markerfile += "markers";
+ markerfile += separator;
+ markerfile += locale_string;
+ markerfile += filename;
+
+ if (fileExists(markerfile))
+ {
+ filename = markerfile;
+ return(true);
+ }
+ }
+
+ markerfile = home;
+ markerfile += separator;
+ markerfile += ".xplanet";
+ markerfile += separator;
+ markerfile += "markers";
+ markerfile += separator;
+ markerfile += filename;
+
+ if (fileExists(markerfile))
+ {
+ filename = markerfile;
+ return(true);
+ }
+ }
+
// Check for the input filename in $prefix/markers
// Check for the input filename in the "markers" subdirectory
if (locale)
|