]> git.pld-linux.org Git - packages/antiword.git/commitdiff
- s/CONFIG_DIR/ETC_DIR/
authorjuandon <witekfl@pld-linux.org>
Mon, 7 Apr 2003 12:21:34 +0000 (12:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- s/home_etc/etc_dir/

Changed files:
    antiword-etc_dir.patch -> 1.1

antiword-etc_dir.patch [new file with mode: 0644]

diff --git a/antiword-etc_dir.patch b/antiword-etc_dir.patch
new file mode 100644 (file)
index 0000000..96f69b9
--- /dev/null
@@ -0,0 +1,91 @@
+diff -Nru antiword-0.33/antiword.h antiword-0.33.new/antiword.h
+--- antiword-0.33/antiword.h   Thu Jun 20 09:16:22 2002
++++ antiword-0.33.new/antiword.h       Sat Mar 22 21:29:50 2003
+@@ -179,6 +179,7 @@
+ #else /* All others */
+ #define GLOBAL_ANTIWORD_DIR   "/usr/share/antiword"
+ #define ANTIWORD_DIR          ".antiword"
++#define ETC_DIR_ANTIWORD_DIR "antiword"
+ #define FONTNAMES_FILE                "fontnames"
+ #endif /* __dos */
+ /* The name of the default mapping file */
+diff -Nru antiword-0.33/options.c antiword-0.33.new/options.c
+--- antiword-0.33/options.c    Sat Jun 29 12:43:05 2002
++++ antiword-0.33.new/options.c        Sat Mar 22 21:34:50 2003
+@@ -295,22 +295,42 @@
+                               PS_LEFT_MARGIN + PS_RIGHT_MARGIN));
+               DBG_DEC(tOptionsCurr.iParagraphBreak);
+       }
+-      /* Try the local version of the mapping file */
+-      szHome = szGetHomeDirectory();
+-      if (strlen(szHome) + strlen(szLeafname) <
+-          sizeof(szMappingFile) -
+-          sizeof(ANTIWORD_DIR) -
+-          2 * sizeof(FILE_SEPARATOR)) {
+-              sprintf(szMappingFile,
+-                      "%s" FILE_SEPARATOR ANTIWORD_DIR FILE_SEPARATOR "%s",
+-                      szHome, szLeafname);
+-              DBG_MSG(szMappingFile);
+-              if (bReadCharacterMappingTable(szMappingFile)) {
+-                      return optind;
+-              }
+-      } else {
+-              werr(0, "Local mappingfilename too long, ignored");
+-      }
++  szHome = getenv("ETC_DIR");
++  if (szHome) {
++        if (strlen(szHome) + strlen(szLeafname) <
++            sizeof(szMappingFile) -
++            sizeof(ETC_DIR_ANTIWORD_DIR) -
++            2 * sizeof(FILE_SEPARATOR)) {
++                sprintf(szMappingFile,
++                        "%s" FILE_SEPARATOR ETC_DIR_ANTIWORD_DIR FILE_SEPARATOR "%s",
++                        szHome, szLeafname);
++                DBG_MSG(szMappingFile);
++                if (bReadCharacterMappingTable(szMappingFile)) {
++                        return optind;
++                }
++        } else {
++                werr(0, "Local mappingfilename too long, ignored");
++      
++        }
++  } else {
++        /* Try the local version of the mapping file */
++        szHome = szGetHomeDirectory();
++        if (strlen(szHome) + strlen(szLeafname) <
++            sizeof(szMappingFile) -
++            sizeof(ANTIWORD_DIR) -
++            2 * sizeof(FILE_SEPARATOR)) {
++                sprintf(szMappingFile,
++                        "%s" FILE_SEPARATOR ANTIWORD_DIR FILE_SEPARATOR "%s",
++                        szHome, szLeafname);
++                DBG_MSG(szMappingFile);
++                if (bReadCharacterMappingTable(szMappingFile)) {
++                        return optind;
++                }
++        } else {
++                werr(0, "Local mappingfilename too long, ignored");
++      
++        }
++  }
+       /* Try the global version of the mapping file */
+       if (strlen(szLeafname) <
+           sizeof(szMappingFile) -
+@@ -326,9 +346,14 @@
+       } else {
+               werr(0, "Global mappingfilename too long, ignored");
+       }
+-      werr(0, "I can't open your mapping file (%s)\n"
+-              "It is not in '%s" FILE_SEPARATOR ANTIWORD_DIR "' nor in '"
+-              GLOBAL_ANTIWORD_DIR "'.", szLeafname, szHome);
++  if (getenv("ETC_DIR") != NULL)
++        werr(0, "I can't open your mapping file (%s)\n"
++                "It is not in '%s" FILE_SEPARATOR ETC_DIR_ANTIWORD_DIR "' nor in '"
++                GLOBAL_ANTIWORD_DIR "'.", szLeafname, szHome);
++      else
++    werr(0, "I can't open your mapping file (%s)\n"
++                "It is not in '%s" FILE_SEPARATOR ANTIWORD_DIR "' nor in '"
++                GLOBAL_ANTIWORD_DIR "'.", szLeafname, szHome);
+       return -1;
+ #endif /* __riscos */
+ } /* end of iReadOptions */
This page took 0.081624 seconds and 4 git commands to generate.