1 diff -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
6 #define GLOBAL_ANTIWORD_DIR "/usr/share/antiword"
7 #define ANTIWORD_DIR ".antiword"
8 +#define ETC_DIR_ANTIWORD_DIR ".antiword"
9 #define FONTNAMES_FILE "fontnames"
11 /* The name of the default mapping file */
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
17 /* Try the local version of the mapping file */
18 + szHome = getenv("HOME_ETC");
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) {
33 + werr(0, "Local mappingfilename too long, ignored");
36 szHome = szGetHomeDirectory();
37 if (strlen(szHome) + tFilenameLen <
38 sizeof(szMappingFile) -
41 werr(0, "Local mappingfilename too long, ignored");
45 /* Try the global version of the mapping file */
49 werr(0, "Global mappingfilename too long, ignored");
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);
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);