Skip to content

Commit

Permalink
Merge branch 'texlive-trunk' r58708
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Apr 3, 2021
2 parents ff6f72d + 6f8d1e0 commit 423fbb6
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 50 deletions.
4 changes: 4 additions & 0 deletions source/texk/dvipdfm-x/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2021-04-03 Akira Kakuto <[email protected]>

* pkfont.c: Remove unnecessary changes made on 2020-12-14.

2021-03-23 Karl Berry <[email protected]>

* TL'21.
Expand Down
21 changes: 4 additions & 17 deletions source/texk/dvipdfm-x/pkfont.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata,
Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <[email protected]>
Expand Down Expand Up @@ -86,27 +86,14 @@ dpx_open_pk_font_at (const char *ident, unsigned dpi, char **pkname)
FILE *fp;
char *fqpn;
kpse_glyph_file_type kpse_file_info;
/*
* ident can be such as "cmr10.pfb":
* https://tug.org/pipermail/dvipdfmx/2020-December/000142.html.
* As a workaround, we drop a suffix if it exists.
*
*/
char *ident_nosuffix;
ident_nosuffix = xstrdup(ident);
fqpn = strrchr(ident_nosuffix, '.');
if (fqpn) {
*fqpn = '\0';
}
fqpn = kpse_find_glyph(ident_nosuffix, dpi, kpse_pk_format, &kpse_file_info);

fqpn = kpse_find_glyph(ident, dpi, kpse_pk_format, &kpse_file_info);
if (!fqpn)
return NULL;
fp = MFOPEN(fqpn, FOPEN_RBIN_MODE);
RELEASE(fqpn);
*pkname = NEW(strlen(ident_nosuffix)+12, char);
(void)snprintf(*pkname, strlen(ident_nosuffix)+12, "%s.%dpk", ident_nosuffix, dpi);
RELEASE(ident_nosuffix);
*pkname = NEW(strlen(ident)+12, char);
(void)snprintf(*pkname, strlen(ident)+12, "%s.%dpk", ident, dpi);

return fp;
}
Expand Down
2 changes: 1 addition & 1 deletion source/texk/mendexk/tests/mendex.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF

rm -f foo.*
rm -f foo.* uni.* pprec*.*

./mendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
&& diff $srcdir/tests/foo.ind foo.ind1 || exit 1
Expand Down
2 changes: 1 addition & 1 deletion source/texk/upmendex/tests/upmendex.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF

rm -f foo.*
rm -f foo.* uni.* pprec*.*

./upmendex $srcdir/tests/foo.idx -o foo.ind1 -t foo.ilg1 \
&& diff $srcdir/tests/foo.ind foo.ind1 || exit 1
Expand Down
4 changes: 4 additions & 0 deletions source/texk/web2c/ctiedir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2021-03-10 Andreas Scherer <https://ascherer.github.io>

* ctie-k.ch: More concise 'find/fopen' logic.

2020-07-24 Andreas Scherer <https://ascherer.github.io>

* ctie-k.ch: Format types in boldface prior to their definition.
Expand Down
44 changes: 17 additions & 27 deletions source/texk/web2c/ctiedir/ctie-k.ch
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,8 @@ variable) to search for this [email protected]@>
@x l.534 Replace with kpse_find_file
if ((new_inc->the_file=fopen(new_inc->file_name, "r"))!=NULL) {
@y
fullname=kpse_find_cweb(new_inc->file_name);
if (fullname)
new_inc->the_file=fopen(fullname, "r");
if (fullname!=NULL && new_inc->the_file!=NULL) {
if ((fullname=kpse_find_cweb(new_inc->file_name))!=NULL @|
&& (new_inc->the_file=fopen(fullname, "r"))!=NULL) {
free(fullname);
@z
Expand Down Expand Up @@ -434,8 +432,9 @@ interface.

@x l.731 Use binary mode for output files
out_file=fopen(out_name, "w");
if (out_file==NULL) {
@y
out_file=fopen(out_name, "wb");
if ((out_file=fopen(out_name, "wb"))==NULL) {
@z

@x l.739
Expand Down Expand Up @@ -466,20 +465,15 @@ the file.
{
string fullname;

fullname = kpse_find_cweb(input_organisation[0]->file_name);
if (fullname)
input_organisation[0]->the_file = fopen(fullname, "r");

if (fullname==NULL || input_organisation[0]->the_file==NULL) {
if (fullname) {
if ((fullname = kpse_find_cweb(input_organisation[0]->file_name))!=NULL) {
if ((input_organisation[0]->the_file = fopen(fullname, "r"))==NULL)
pfatal_error("! Cannot open master file ",
input_organisation[0]->file_name);
} else {
fatal_error(-1, "! Cannot find master file ",
input_organisation[0]->file_name);
}
free(fullname);
} @+ else {
fatal_error(-1, "! Cannot find master file ",
input_organisation[0]->file_name);
}
else free(fullname);
@.Cannot open master file@>
@.Cannot find master file@>
@z
Expand All @@ -505,20 +499,16 @@ the file.

i=1;
while (i<no_ch) {
fullname = kpse_find_cweb(input_organisation[i]->file_name);
if (fullname)
input_organisation[i]->the_file = fopen(fullname, "r");

if (fullname==NULL || input_organisation[i]->the_file==NULL) {
if (fullname) {
if ((fullname = kpse_find_cweb(input_organisation[i]->file_name))
!=NULL) {
if ((input_organisation[i]->the_file = fopen(fullname, "r"))==NULL)
pfatal_error("! Cannot open change file ",
input_organisation[i]->file_name);
} else {
fatal_error(-1, "! Cannot find change file ",
input_organisation[i]->file_name);
}
free(fullname);
} @+ else {
fatal_error(-1, "! Cannot find change file ",
input_organisation[i]->file_name);
}
else free(fullname);
@.Cannot open change file@>
@.Cannot find change file@>
@z
Expand Down
4 changes: 3 additions & 1 deletion source/texk/web2c/mplibdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
2021-04-02 Luigi Scarso <[email protected]>
* Revert the patch in mpx_copy_mpto, it was wrong in tex mode. Added a check if in troff mode.

2021-03-23 Karl Berry <[email protected]>
* TL'21.

2020-12-28 Luigi Scarso <[email protected]>
* Temp, fix in mpx_copy_mpto, changed || with && to avoid a wrong final %


2020-12-27 Luigi Scarso <[email protected]>
* Fixed some typos in manual (thank to 胡亚捷 (Hu Yajie) )
* Added the undocumented -T option
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/mplibdir/am/libmplib.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## texk/web2c/mplibdir/am/libmplib.am: Makefile fragment for libmplib.
##
## Copyright (C) 2015-2020 Luigi Scarso <[email protected]>
## Copyright (C) 2015-2021 Luigi Scarso <[email protected]>
## Copyright (C) 2009-2014 Peter Breitenlohner <[email protected]>
## You may freely use, modify and/or distribute this file.

Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/mplibdir/am/mplib.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## texk/web2c/mplibdir/am/mplib.am: Makefile fragment for MetaPost.
##
## Copyright 2017-2018 Luigi Scarso <[email protected]>
## Copyright 2017-2021 Luigi Scarso <[email protected]>
## Copyright 2009-2015 Peter Breitenlohner <[email protected]>
## You may freely use, modify and/or distribute this file.

Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/mplibdir/mpxout.w
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static void mpx_copy_mpto (MPX mpx, FILE *outfile, int textype) {
if (textype == B_TEX) {
/* put no |%| at end if it's only 1 line total, starting with |%|;
* this covers the special case |%&format| in a single line. */
if (t != s && *t != '%')
if ((t != s || *t != '%') && mpx->mode == mpx_tex_mode)
fprintf(outfile,"%%");
}
free(res);
Expand Down

0 comments on commit 423fbb6

Please sign in to comment.