diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-01-12 04:28:43 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-01-12 04:28:43 +0000 |
commit | 4e18594eef5a7156ff084874ed11fb9a35861020 (patch) | |
tree | c919c6e825d3ba1c9e70929f06fb321677087014 /Build | |
parent | 1ecd80f1c507320c876910c3361e01140cb44ae7 (diff) |
support old compilers
git-svn-id: svn://tug.org/texlive/trunk@53375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/bitmapenc.c | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/download.c | 6 |
3 files changed, 15 insertions, 6 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 1ccc44ea75b..4aab92b7429 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2020-01-12 Akira Kakuto <kakuto@w32tex.org> + + * bitmapenc.c, download.c: Support old compilers, by declaring + variables early in a block. + 2020-01-11 Tomas Rokicki <rokicki@gmail.com> Support encodings for bitmapped fonts, e.g., when cmr10 diff --git a/Build/source/texk/dvipsk/bitmapenc.c b/Build/source/texk/dvipsk/bitmapenc.c index 60abc31abd6..c8ee318416d 100644 --- a/Build/source/texk/dvipsk/bitmapenc.c +++ b/Build/source/texk/dvipsk/bitmapenc.c @@ -310,10 +310,11 @@ void bmenc_startsection() { * so we can use binary search. */ static const char **bitmap_all_find(const char *fontname) { + int ptr, bit; if (numstatic == 0) return 0 ; - int ptr = 0 ; - int bit = 1 ; + ptr = 0 ; + bit = 1 ; while ((bit << 1) < numstatic) bit <<= 1 ; while (bit > 0) { @@ -332,6 +333,7 @@ static const char **bitmap_all_find(const char *fontname) { */ static void downloadenc(struct bmenc *enc) { int fresh = 0 ; + char cmdbuf[16] ; if (enc->downloaded_seq < 0) { int i ; newline() ; @@ -341,7 +343,6 @@ static void downloadenc(struct bmenc *enc) { fresh = 1 ; } newline() ; - char cmdbuf[16] ; sprintf(cmdbuf, "/EN%d", enc->downloaded_seq) ; if (fresh) { cmdout("A") ; @@ -363,6 +364,7 @@ static void downloadenc(struct bmenc *enc) { static int getencoding_seq(const char *fontname) ; int downloadbmencoding(const char *name, double scale, int llx, int lly, int urx, int ury) { + int slop; int seq = getencoding_seq(name) ; if (seq < 0) return -1 ; @@ -386,7 +388,7 @@ int downloadbmencoding(const char *name, double scale, // we add a bit of slop here, because this is only used for // highlighting, and in theory if the bounding box is too // tight, on some RIPs, characters could be clipped. - int slop = 1 ; + slop = 1; specialout('[') ; numout(llx-slop) ; numout(lly-slop) ; diff --git a/Build/source/texk/dvipsk/download.c b/Build/source/texk/dvipsk/download.c index 131c49250b3..ba5ab913100 100644 --- a/Build/source/texk/dvipsk/download.c +++ b/Build/source/texk/dvipsk/download.c @@ -203,6 +203,8 @@ lfontout(int n) void download(charusetype *p, int psfont) { + double scale; + int seq; register int b, i; register halfword bit; register chardesctype *c; @@ -299,8 +301,8 @@ download(charusetype *p, int psfont) newline(); fprintf(bitfile, "%%DVIPSBitmapFont: %s %s %g %d\n", name+1, curfnt->name, fontscale, numcc); - double scale = fontscale * DPI / 72.0 ; - int seq = -1 ; + scale = fontscale * DPI / 72.0 ; + seq = -1 ; if (encodetype3) seq = downloadbmencoding(curfnt->name, scale, curfnt->llx, curfnt->lly, curfnt->urx, curfnt->ury) ; |