summaryrefslogtreecommitdiff
path: root/Build/source/texk/bibtex8/utils.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-19 15:29:56 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-03-19 15:29:56 +0000
commitdaa10770a5d7da90789b35aa8cc3b4aa33bb7de5 (patch)
treeada4db7a6b9b2ec04c0b4b902e1b492b12230f8b /Build/source/texk/bibtex8/utils.c
parentc0becd9f8e99909fa3989cd0666dd40ad170a733 (diff)
bibtex8: get default csfile name from texmf.cnf
git-svn-id: svn://tug.org/texlive/trunk@17502 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/bibtex8/utils.c')
-rw-r--r--Build/source/texk/bibtex8/utils.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/texk/bibtex8/utils.c b/Build/source/texk/bibtex8/utils.c
index 26554db2826..685c3ce1f67 100644
--- a/Build/source/texk/bibtex8/utils.c
+++ b/Build/source/texk/bibtex8/utils.c
@@ -132,6 +132,8 @@
#include <kpathsea/config.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/tex-file.h>
+#include <kpathsea/paths.h>
+#include <kpathsea/variable.h>
#include <kpathsea/lib.h>
#ifndef WIN32
#include <kpathsea/getopt.h>
@@ -981,7 +983,7 @@ void parse_cmd_line (int argc, char **argv)
break;
case 'c': /**************** -c, --csfile *************/
- Str_csfile = optarg;
+ Str_csfile = strdup (optarg);
break;
case 'd': /**************** -d, --debug **************/
@@ -1644,8 +1646,10 @@ int c8read_csf (void)
*/
if (Str_csfile == NULL) {
#ifdef KPATHSEA
- /* FIXME: this default value should be stored in texmf.in */
- Str_csfile = xstrdup("88591lat.csf");
+ /* Default value from environment or texmf.cnf */
+ Str_csfile = kpse_var_value (DEFAULT_BIBTEX_CSFILE);
+ if (Str_csfile == NULL) /* Use fallback value */
+ Str_csfile = xstrdup ("88591lat.csf");
#else
if (strlen (CSF_FILE_ENVVAR) != 0) {
debug_msg (DBG_CSF, "c8read_csf: --csfile not set, checking '%s'",
@@ -1798,6 +1802,7 @@ int c8read_csf (void)
** Finished reading, close the CS file then return TRUE.
*/
close_file (c8_cs_file);
+ free (Str_csfile);
return TRUE;
} /* c8read_csf () */