]> git.pld-linux.org Git - packages/antiword.git/blame - antiword-etc_dir.patch
- use __cc for linking
[packages/antiword.git] / antiword-etc_dir.patch
CommitLineData
8fd802f9 1diff -Nru antiword-0.33/antiword.h antiword-0.33.new/antiword.h
2--- antiword-0.33/antiword.h Thu Jun 20 09:16:22 2002
3+++ antiword-0.33.new/antiword.h Sat Mar 22 21:29:50 2003
4@@ -179,6 +179,7 @@
5 #else /* All others */
6 #define GLOBAL_ANTIWORD_DIR "/usr/share/antiword"
7 #define ANTIWORD_DIR ".antiword"
c264bf09 8+#define ETC_DIR_ANTIWORD_DIR ".antiword"
8fd802f9 9 #define FONTNAMES_FILE "fontnames"
10 #endif /* __dos */
11 /* The name of the default mapping file */
32b13352
JB
12--- antiword-0.36/options.c.orig 2004-10-08 20:54:36.000000000 +0200
13+++ antiword-0.36/options.c 2004-11-06 22:29:52.401338432 +0100
14@@ -216,6 +216,24 @@
8fd802f9 15 }
32b13352
JB
16
17 /* Try the local version of the mapping file */
18+ szHome = getenv("HOME_ETC");
19+ if (szHome) {
20+ if (strlen(szHome) + tFilenameLen <
21+ sizeof(szMappingFile) -
22+ sizeof(ETC_DIR_ANTIWORD_DIR) -
23+ 2 * sizeof(FILE_SEPARATOR)) {
24+ sprintf(szMappingFile,
25+ "%s" FILE_SEPARATOR ETC_DIR_ANTIWORD_DIR FILE_SEPARATOR "%s%s",
26+ szHome, szLeafname, szSuffix);
27+ DBG_MSG(szMappingFile);
28+ pFile = fopen(szMappingFile, "r");
29+ if (pFile != NULL) {
30+ return pFile;
31+ }
32+ } else {
33+ werr(0, "Local mappingfilename too long, ignored");
34+ }
35+ } else {
36 szHome = szGetHomeDirectory();
37 if (strlen(szHome) + tFilenameLen <
8fd802f9 38 sizeof(szMappingFile) -
32b13352
JB
39@@ -232,6 +250,7 @@
40 } else {
41 werr(0, "Local mappingfilename too long, ignored");
42 }
43+ }
44
45 /* Try the global version of the mapping file */
46 if (tFilenameLen <
47@@ -249,6 +268,11 @@
8fd802f9 48 } else {
49 werr(0, "Global mappingfilename too long, ignored");
50 }
32b13352
JB
51+ if (getenv("HOME_ETC") != NULL)
52+ werr(0, "I can't open your mapping file (%s%s)\n"
53+ "It is not in '%s" FILE_SEPARATOR ETC_DIR_ANTIWORD_DIR "' nor in '"
54+ GLOBAL_ANTIWORD_DIR "'.", szLeafname, szSuffix, szHome);
55+ else
56 werr(0, "I can't open your mapping file (%s%s)\n"
57 "It is not in '%s" FILE_SEPARATOR ANTIWORD_DIR "' nor in '"
58 GLOBAL_ANTIWORD_DIR "'.", szLeafname, szSuffix, szHome);
This page took 0.091641 seconds and 4 git commands to generate.