summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/openclose.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:27:09 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:27:09 +0000
commit5e8e9500102800e68c9e7fcac9e85c1668b71a36 (patch)
tree81d79ac70ffbb127e8063f18c8f55475ca169ee1 /Build/source/texk/web2c/lib/openclose.c
parente6a9c88ada2f11dd61e4c4e39dff84944bed5787 (diff)
towards TL2010: texk/web2c
git-svn-id: svn://tug.org/texlive/trunk@15964 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib/openclose.c')
-rw-r--r--Build/source/texk/web2c/lib/openclose.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index dab1b4ff43c..e82b3215d6c 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -72,28 +72,28 @@ recorder_change_filename (string new_name)
/* helper for recorder_record_* */
static void
-recorder_record_name (string prefix, const_string nameoffile)
+recorder_record_name (const_string prefix, const_string name)
{
if (recorder_enabled) {
if (!recorder_file)
recorder_start();
- fprintf(recorder_file, "%s %s\n", prefix, nameoffile);
+ fprintf(recorder_file, "%s %s\n", prefix, name);
fflush(recorder_file);
}
}
-/* record an input file */
+/* record an input file name */
void
-recorder_record_input (const_string nameoffile)
+recorder_record_input (const_string name)
{
- recorder_record_name ("INPUT", nameoffile);
+ recorder_record_name ("INPUT", name);
}
-/* record an output file */
+/* record an output file name */
void
-recorder_record_output (const_string nameoffile)
+recorder_record_output (const_string name)
{
- recorder_record_name ("OUTPUT", nameoffile);
+ recorder_record_name ("OUTPUT", name);
}
/* Open an input file F, using the kpathsea format FILEFMT and passing
@@ -241,7 +241,9 @@ open_output (FILE **f_ptr, const_string fopen_mode)
string texmfoutput = kpse_var_value("TEXMFOUTPUT");
if (texmfoutput && *texmfoutput && !absolute) {
- string fname = concat3(texmfoutput, DIR_SEP_STRING, nameoffile+1);
+ if (fname != nameoffile + 1)
+ free(fname);
+ fname = concat3(texmfoutput, DIR_SEP_STRING, nameoffile+1);
*f_ptr = fopen(fname, fopen_mode);
}
}