diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-14 13:38:14 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-14 13:38:14 +0000 |
commit | 683d334a8b977edac65c501ea577a4e77ca26749 (patch) | |
tree | 5a1236dc910479b65c681d1107ef4fd294be8386 /Build/source/texk/web2c | |
parent | 822b0490836aef4f33d1175e35963401a2924488 (diff) |
Fix a bug to show input file name in the case of pipe input. Reported by Enrico Gregorio.
git-svn-id: svn://tug.org/texlive/trunk@40504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index fcd4fe64814..7a8ede7b015 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,9 @@ +2016-04-14 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> + + * texmfmp.c: Fix a bug to show input file name in the case of pipe input. + Reported by Enrico Gregorio: + http://tug.org/pipermail/tex-live/2016-April/038030.html + 2016-03-22 Karl Berry <karl@freefriends.org> * texmfmp.c: no uexit after FATAL. diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index fae82477b93..a391445d0fa 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -2030,6 +2030,9 @@ open_in_or_pipe (FILE **f_ptr, int filefmt, const_string fopen_mode) *f_ptr = NULL; fname = xmalloc(strlen((const_string)(nameoffile+1))+1); strcpy(fname,(const_string)(nameoffile+1)); + if (fullnameoffile) + free(fullnameoffile); + fullnameoffile = xstrdup(fname); recorder_record_input (fname + 1); *f_ptr = runpopen(fname+1,"r"); free(fname); @@ -2072,6 +2075,9 @@ u_open_in_or_pipe(unicodefile* f, integer filefmt, const_string fopen_mode, inte (*f)->f = NULL; fname = xmalloc(strlen((const_string)(nameoffile+1))+1); strcpy(fname,(const_string)(nameoffile+1)); + if (fullnameoffile) + free(fullnameoffile); + fullnameoffile = xstrdup(fname); recorder_record_input (fname + 1); (*f)->f = runpopen(fname+1,"r"); free(fname); |