texlive[53375] Build/source/texk/dvipsk: support old compilers

commits+kakuto at tug.org commits+kakuto at tug.org
Sun Jan 12 05:28:44 CET 2020


Revision: 53375
          http://tug.org/svn/texlive?view=revision&revision=53375
Author:   kakuto
Date:     2020-01-12 05:28:43 +0100 (Sun, 12 Jan 2020)
Log Message:
-----------
support old compilers

Modified Paths:
--------------
    trunk/Build/source/texk/dvipsk/ChangeLog
    trunk/Build/source/texk/dvipsk/bitmapenc.c
    trunk/Build/source/texk/dvipsk/download.c

Modified: trunk/Build/source/texk/dvipsk/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipsk/ChangeLog	2020-01-12 00:54:22 UTC (rev 53374)
+++ trunk/Build/source/texk/dvipsk/ChangeLog	2020-01-12 04:28:43 UTC (rev 53375)
@@ -1,3 +1,8 @@
+2020-01-12  Akira Kakuto  <kakuto at w32tex.org>
+
+	* bitmapenc.c, download.c: Support old compilers, by declaring
+	variables early in a block.
+
 2020-01-11  Tomas Rokicki  <rokicki at gmail.com>
 
 	Support encodings for bitmapped fonts, e.g., when cmr10

Modified: trunk/Build/source/texk/dvipsk/bitmapenc.c
===================================================================
--- trunk/Build/source/texk/dvipsk/bitmapenc.c	2020-01-12 00:54:22 UTC (rev 53374)
+++ trunk/Build/source/texk/dvipsk/bitmapenc.c	2020-01-12 04:28:43 UTC (rev 53375)
@@ -310,10 +310,11 @@
  *   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 void downloadenc(struct bmenc *enc) {
    int fresh = 0 ;
+   char cmdbuf[16] ;
    if (enc->downloaded_seq < 0) {
       int i ;
       newline() ;
@@ -341,7 +343,6 @@
       fresh = 1 ;
    }
    newline() ;
-   char cmdbuf[16] ;
    sprintf(cmdbuf, "/EN%d", enc->downloaded_seq) ;
    if (fresh) {
       cmdout("A") ;
@@ -363,6 +364,7 @@
 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 @@
    // 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) ;

Modified: trunk/Build/source/texk/dvipsk/download.c
===================================================================
--- trunk/Build/source/texk/dvipsk/download.c	2020-01-12 00:54:22 UTC (rev 53374)
+++ trunk/Build/source/texk/dvipsk/download.c	2020-01-12 04:28:43 UTC (rev 53375)
@@ -203,6 +203,8 @@
 void
 download(charusetype *p, int psfont)
 {
+   double scale;
+   int seq;
    register int b, i;
    register halfword bit;
    register chardesctype *c;
@@ -299,8 +301,8 @@
    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) ;



More information about the tex-live-commits mailing list