diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-19 15:29:56 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-19 15:29:56 +0000 |
commit | daa10770a5d7da90789b35aa8cc3b4aa33bb7de5 (patch) | |
tree | ada4db7a6b9b2ec04c0b4b902e1b492b12230f8b | |
parent | c0becd9f8e99909fa3989cd0666dd40ad170a733 (diff) |
bibtex8: get default csfile name from texmf.cnf
git-svn-id: svn://tug.org/texlive/trunk@17502 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/bibtex8/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/bibtex8/bibtex.c | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtex8/utils.c | 11 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex.c | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/utils.c | 9 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/texmf.cnf | 4 |
8 files changed, 36 insertions, 7 deletions
diff --git a/Build/source/texk/bibtex8/ChangeLog b/Build/source/texk/bibtex8/ChangeLog index a6073f1654a..332251eebb1 100644 --- a/Build/source/texk/bibtex8/ChangeLog +++ b/Build/source/texk/bibtex8/ChangeLog @@ -1,3 +1,8 @@ +2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * bibtex.c: Call kpse_set_program_name with "bibtex8". + * utils.c: Default csfile from environment or config file. + 2010-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> Dynamic allocation of name_of_file strings. No padding. diff --git a/Build/source/texk/bibtex8/bibtex.c b/Build/source/texk/bibtex8/bibtex.c index 7bb7e9135bf..ced981fdee4 100644 --- a/Build/source/texk/bibtex8/bibtex.c +++ b/Build/source/texk/bibtex8/bibtex.c @@ -263,7 +263,7 @@ BEGIN command_line_arg_strings = (char **) argv; #ifdef KPATHSEA - kpse_set_program_name(argv[0], NULL); + kpse_set_program_name(argv[0], "bibtex8"); #endif history = SPOTLESS; 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 () */ diff --git a/Build/source/texk/bibtexu/ChangeLog b/Build/source/texk/bibtexu/ChangeLog index ea50ae8ef08..74f5260579c 100644 --- a/Build/source/texk/bibtexu/ChangeLog +++ b/Build/source/texk/bibtexu/ChangeLog @@ -1,3 +1,8 @@ +2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * bibtex.c: Call kpse_set_program_name with "bibtexu". + * utils.c: Default csfile from environment or config file. + 2010-03-18 Peter Breitenlohner <peb@mppmu.mpg.de> Dynamic allocation of name_of_file strings. No padding. diff --git a/Build/source/texk/bibtexu/bibtex.c b/Build/source/texk/bibtexu/bibtex.c index 63b4103bceb..0184451dc34 100644 --- a/Build/source/texk/bibtexu/bibtex.c +++ b/Build/source/texk/bibtexu/bibtex.c @@ -274,7 +274,7 @@ BEGIN command_line_arg_strings = (char **) argv; #ifdef KPATHSEA - kpse_set_program_name(argv[0], NULL); + kpse_set_program_name(argv[0], "bibtexu"); #endif history = SPOTLESS; diff --git a/Build/source/texk/bibtexu/utils.c b/Build/source/texk/bibtexu/utils.c index 452696b2bda..32623bd9796 100644 --- a/Build/source/texk/bibtexu/utils.c +++ b/Build/source/texk/bibtexu/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> @@ -1671,8 +1673,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'", @@ -1825,6 +1829,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 () */ diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index b60b2faace0..3223920f749 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +2010-03-11 Peter Breitenlohner <peb@mppmu.mpg.de> + + * texmf.cnf (BIBTEX_CSFILE): Default codepage and sort order + file for BibTeX8. + 2010-03-18 Karl Berry <karl@tug.org> * texmf.cnf (TEXDOCS): remove .; better for texdoc not diff --git a/Build/source/texk/kpathsea/texmf.cnf b/Build/source/texk/kpathsea/texmf.cnf index 2a239af9dba..ac9758fdd81 100644 --- a/Build/source/texk/kpathsea/texmf.cnf +++ b/Build/source/texk/kpathsea/texmf.cnf @@ -588,6 +588,10 @@ TEX = etex %MFEDIT = ${TEXEDIT} %MPEDIT = ${TEXEDIT} +% The default `codepage and sort order' file for BibTeX8, when none is +% given as command line option or environment variable. +BIBTEX_CSFILE = 88591lat.csf + % Part 3: Array and other sizes for TeX (and Metafont). % % If you want to change some of these sizes only for a certain TeX |