summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-07 09:13:55 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-07 09:13:55 +0000
commit78531da5582cc690ec2208c722641211a3569600 (patch)
tree5b25451d646af60e3dc89c5c8cb1dd59e453e520
parenta7fdc34959d76e0cb7b69e4d820ecc8a78926082 (diff)
texk/ps2pkm: Some cleanup and minor bugfix
git-svn-id: svn://tug.org/texlive/trunk@35322 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/ps2pkm/ChangeLog17
-rw-r--r--Build/source/texk/ps2pkm/arith.c6
-rw-r--r--Build/source/texk/ps2pkm/encoding.c16
-rw-r--r--Build/source/texk/ps2pkm/objects.c2
-rw-r--r--Build/source/texk/ps2pkm/paths.c57
-rw-r--r--Build/source/texk/ps2pkm/regions.c54
-rw-r--r--Build/source/texk/ps2pkm/spaces.c20
-rw-r--r--Build/source/texk/ps2pkm/t1funcs.c2
-rw-r--r--Build/source/texk/ps2pkm/token.c2
-rw-r--r--Build/source/texk/ps2pkm/type1.c20
10 files changed, 103 insertions, 93 deletions
diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog
index 62337081c18..5b56dd5dd35 100644
--- a/Build/source/texk/ps2pkm/ChangeLog
+++ b/Build/source/texk/ps2pkm/ChangeLog
@@ -1,3 +1,20 @@
+2014-10-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * t1funcs.c: Bugfix (undefined operation due to a typo).
+ * token.c: Fix ambigous behavior (sequence point).
+
+ * encoding.c, objects.c: Avoid undefined behaviour when char is
+ signed.
+
+ * arith.c: Fix formats: %dl => %d for int.
+ * paths.c, regions.c, spaces.c: Fix (debug) format specifiers:
+ %f for double* => double
+ %ld => %d for int
+ %p => %d for int
+ %x => %d for int (except for flags)
+ %x => %p for ANY*
+ %z => %p for ANY*
+
2014-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Drop the obsolete ACLOCAL_AMFLAGS.
diff --git a/Build/source/texk/ps2pkm/arith.c b/Build/source/texk/ps2pkm/arith.c
index ef74f42b770..49327041dad 100644
--- a/Build/source/texk/ps2pkm/arith.c
+++ b/Build/source/texk/ps2pkm/arith.c
@@ -353,7 +353,7 @@ fractpel FPmult(u, v)
DLmult(&w, u, v);
DLrightshift(w, FRACTBITS);
if (w.high != 0 || SIGNBITON(w.low)) {
- IfTrace2(TRUE,"FPmult: overflow, %dlx%dl\n", u, v);
+ IfTrace2(TRUE,"FPmult: overflow, %dx%d\n", u, v);
w.low = TOFRACTPEL(MAXSHORT);
}
@@ -385,7 +385,7 @@ fractpel FPdiv(dividend, divisor)
w.high = dividend >> (LONGSIZE - FRACTBITS);
DLdiv(&w, divisor);
if (w.high != 0 || SIGNBITON(w.low)) {
- IfTrace2(TRUE,"FPdiv: overflow, %dl/%dl\n", dividend, divisor);
+ IfTrace2(TRUE,"FPdiv: overflow, %d/%d\n", dividend, divisor);
w.low = TOFRACTPEL(MAXSHORT);
}
return( (negative) ? -w.low : w.low);
@@ -412,7 +412,7 @@ fractpel FPstarslash(a, b, c)
DLmult(&w, a, b);
DLdiv(&w, c);
if (w.high != 0 || SIGNBITON(w.low)) {
- IfTrace3(TRUE,"FPstarslash: overflow, %dl*%dl/%dl\n", a, b, c);
+ IfTrace3(TRUE,"FPstarslash: overflow, %d*%d/%d\n", a, b, c);
w.low = TOFRACTPEL(MAXSHORT);
}
return((negative) ? -w.low : w.low);
diff --git a/Build/source/texk/ps2pkm/encoding.c b/Build/source/texk/ps2pkm/encoding.c
index a55184a65b9..e3584f2227c 100644
--- a/Build/source/texk/ps2pkm/encoding.c
+++ b/Build/source/texk/ps2pkm/encoding.c
@@ -46,16 +46,16 @@ static char *value_after(char *s, char *t)
s++;
}
s += l;
- while (isspace(*s)) s++;
+ while (isspace((unsigned char)*s)) s++;
return s;
}
int decimal(char *s)
{ int sign = 1, d = 0;
- while (isspace(*s)) s++;
+ while (isspace((unsigned char)*s)) s++;
if (*s == '-') { sign = -1; s++; }
- while (isdigit(*s)) { d = d * 10 + (*s - '0'); s++; }
+ while (isdigit((unsigned char)*s)) { d = d * 10 + (*s - '0'); s++; }
return sign*d;
}
@@ -101,13 +101,13 @@ char *nextpsname()
{ pline = NULL;
continue;
}
- if (isspace(*pline)) {
+ if (isspace((unsigned char)*pline)) {
pline++;
continue;
}
- if (!isalpha(*pline)) fatal("invalid name in %s\n", encfile);
+ if (!isalpha((unsigned char)*pline)) fatal("invalid name in %s\n", encfile);
/* pt981009: added '_' Staszek Wawrykiewicz <staw@gust.org.pl> */
- while (isalnum(*pline) || *pline == '-' || *pline == '_') {
+ while (isalnum((unsigned char)*pline) || *pline == '-' || *pline == '_') {
if (i > MAXSTRLEN-2)
fatal("name too long in %s (%s)\n", line, encfile);
the_nextname[i++] = *pline++;
@@ -329,9 +329,9 @@ static int poolsize, /* occupied space annex free index */
char *my_string(char *s)
{ int length; char *str;
- while (isspace(*s)) s++;
+ while (isspace((unsigned char)*s)) s++;
str = s; length = 0;
- while (isalnum(*s) || *s == '.' || *s == '_') { length++; s++; }
+ while (isalnum((unsigned char)*s) || *s == '.' || *s == '_') { length++; s++; }
if (length == 0) return NULL;
else {
if (length + 1 > POOLSIZE - poolsize)
diff --git a/Build/source/texk/ps2pkm/objects.c b/Build/source/texk/ps2pkm/objects.c
index 14abbbbf3f2..5cecf70fe37 100644
--- a/Build/source/texk/ps2pkm/objects.c
+++ b/Build/source/texk/ps2pkm/objects.c
@@ -780,7 +780,7 @@ void Pragmatics(username, value)
t1_abort("Pragmatics name too large");
strcpy(name, username);
for (p = name; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char)*p);
if (!strcmp(name, "ALL"))
MustTraceCalls = InternalTrace = /* MustCrash = */
diff --git a/Build/source/texk/ps2pkm/paths.c b/Build/source/texk/ps2pkm/paths.c
index d152de58e64..78d8eab1919 100644
--- a/Build/source/texk/ps2pkm/paths.c
+++ b/Build/source/texk/ps2pkm/paths.c
@@ -211,7 +211,7 @@ struct segment *t1_Loc(S, x, y)
register struct segment *r;
- IfTrace3((MustTraceCalls),"..Loc(S=%z, x=%f, y=%f)\n", S, &x, &y);
+ IfTrace3((MustTraceCalls),"..Loc(S=%p, x=%f, y=%f)\n", S, x, y);
r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0);
TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *);
@@ -232,7 +232,7 @@ struct segment *ILoc(S, x, y)
{
register struct segment *r;
- IfTrace3((MustTraceCalls),"..ILoc(S=%z, x=%d, y=%d)\n",
+ IfTrace3((MustTraceCalls),"..ILoc(S=%p, x=%d, y=%d)\n",
S, (LONG) x, (LONG) y);
r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0);
TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *);
@@ -258,7 +258,7 @@ struct segment *SubLoc(p1, p2)
register struct segment *p1;
register struct segment *p2;
{
- IfTrace2((MustTraceCalls),"SubLoc(%z, %z)\n", p1, p2);
+ IfTrace2((MustTraceCalls),"SubLoc(%p, %p)\n", p1, p2);
ARGCHECK(!ISLOCATION(p1), "SubLoc: bad first arg", p1, NULL, (0), struct segment *);
ARGCHECK(!ISLOCATION(p2), "SubLoc: bad second arg", p2, NULL, (0), struct segment *);
@@ -303,7 +303,7 @@ struct segment *Line(P)
register struct segment *P; /* relevant coordinate space */
{
- IfTrace1((MustTraceCalls),"..Line(%z)\n", P);
+ IfTrace1((MustTraceCalls),"..Line(%p)\n", P);
ARGCHECK(!ISLOCATION(P), "Line: arg not a location", P, NULL, (0), struct segment *);
P = UniquePath(P);
@@ -346,7 +346,7 @@ struct beziersegment *Bezier(B, C, D)
register struct beziersegment *r; /* output segment */
- IfTrace3((MustTraceCalls),"..Bezier(%z, %z, %z)\n", B, C, D);
+ IfTrace3((MustTraceCalls),"..Bezier(%p, %p, %p)\n", B, C, D);
ARGCHECK(!ISLOCATION(B), "Bezier: bad B", B, NULL, (2,C,D), struct beziersegment *);
ARGCHECK(!ISLOCATION(C), "Bezier: bad C", C, NULL, (2,B,D), struct beziersegment *);
ARGCHECK(!ISLOCATION(D), "Bezier: bad D", D, NULL, (2,B,C), struct beziersegment *);
@@ -453,8 +453,7 @@ rules.
struct segment *Join(p1, p2)
register struct segment *p1,*p2;
{
- IfTrace2((MustTraceCalls && PathDebug > 1),"..Join(%z, %z)\n", p1, p2);
- IfTrace2((MustTraceCalls && PathDebug <=1),"..Join(%x, %x)\n", p1, p2);
+ IfTrace2((MustTraceCalls),"..Join(%p, %p)\n", p1, p2);
/*
We start with a whole bunch of very straightforward argument tests:
*/
@@ -609,7 +608,7 @@ struct segment *t1_ClosePath(p0,lastonly)
register fractpel firstx,firsty; /* start position of sub path */
register struct segment *lastnonhint; /* last non-hint segment in path */
- IfTrace1((MustTraceCalls),"ClosePath(%z)\n", p0);
+ IfTrace1((MustTraceCalls),"ClosePath(%p)\n", p0);
if (p0 != NULL && p0->type == TEXTTYPE)
return(UniquePath(p0));
if (p0->type == STROKEPATHTYPE)
@@ -657,7 +656,7 @@ At each break, we insert a close segment.
if (r->dest.x <= CLOSEFUDGE && r->dest.x >= -CLOSEFUDGE
&& r->dest.y <= CLOSEFUDGE && r->dest.y >= -CLOSEFUDGE) {
IfTrace2((PathDebug),
- "ClosePath forced closed by (%p,%p)\n",
+ "ClosePath forced closed by (%d,%d)\n",
r->dest.x, r->dest.y);
lastnonhint->dest.x += r->dest.x;
lastnonhint->dest.y += r->dest.y;
@@ -709,7 +708,7 @@ struct segment *Reverse(p)
register struct segment *r; /* output path built here */
register struct segment *nextp; /* contains next sub-path */
- IfTrace1((MustTraceCalls),"Reverse(%z)\n", p);
+ IfTrace1((MustTraceCalls),"Reverse(%p)\n", p);
if (p == NULL)
return(NULL);
@@ -873,7 +872,7 @@ struct segment *ReverseSubPaths(p)
register struct segment *nomove; /* the part of sub-path without move segment */
struct fractpoint delta;
- IfTrace1((MustTraceCalls),"ReverseSubPaths(%z)\n", p);
+ IfTrace1((MustTraceCalls),"ReverseSubPaths(%p)\n", p);
if (p == NULL)
return(NULL);
@@ -1028,7 +1027,7 @@ struct segment *PathTransform(p0, S)
}
default:
- IfTrace1(TRUE,"path = %z\n", p);
+ IfTrace1(TRUE,"path = %p\n", p);
t1_abort("PathTransform: invalid segment");
}
oldx += savex;
@@ -1095,7 +1094,7 @@ void QueryLoc(P, S, xP, yP)
register struct XYspace *S; /* XY space to return coordinates in */
register DOUBLE *xP,*yP; /* coordinates returned here */
{
- IfTrace4((MustTraceCalls),"QueryLoc(P=%z, S=%z, (%x, %x))\n",
+ IfTrace4((MustTraceCalls),"QueryLoc(P=%p, S=%p, (%p, %p))\n",
P, S, xP, yP);
if (!ISLOCATION(P)) {
ArgErr("QueryLoc: first arg not a location", P, NULL);
@@ -1128,7 +1127,7 @@ void QueryPath(path, typeP, Bp, Cp, Dp, fP)
{
register int coerced = FALSE; /* did I coerce a text path? */
- IfTrace3((MustTraceCalls), "QueryPath(%z, %x, %x, ...)\n",
+ IfTrace3((MustTraceCalls), "QueryPath(%p, %p, %p, ...)\n",
path, typeP, Bp);
if (path == NULL) {
*typeP = -1;
@@ -1206,8 +1205,8 @@ void QueryBounds(p0, S, xminP, yminP, xmaxP, ymaxP)
int coerced = FALSE; /* we have coerced the path from another object */
DOUBLE x1,y1,x2,y2,x3,y3,x4,y4; /* corners of rectangle in space X */
- IfTrace2((MustTraceCalls), "QueryBounds(%z, %z,", p0, S);
- IfTrace4((MustTraceCalls), " %x, %x, %x, %x)\n",
+ IfTrace2((MustTraceCalls), "QueryBounds(%p, %p,", p0, S);
+ IfTrace4((MustTraceCalls), " %p, %p, %p, %p)\n",
xminP, yminP, xmaxP, ymaxP);
if (S->type != SPACETYPE) {
ArgErr("QueryBounds: bad XYspace", S, NULL);
@@ -1382,7 +1381,7 @@ to ask about an entire path.
struct segment *DropSegment(path)
register struct segment *path;
{
- IfTrace1((MustTraceCalls),"DropSegment(%z)\n", path);
+ IfTrace1((MustTraceCalls),"DropSegment(%p)\n", path);
if (path != NULL && path->type == STROKEPATHTYPE)
path = CoercePath(path);
ARGCHECK((path == NULL || !ISPATHANCHOR(path)),
@@ -1404,7 +1403,7 @@ first segment only.
struct segment *HeadSegment(path)
register struct segment *path; /* input path */
{
- IfTrace1((MustTraceCalls),"HeadSegment(%z)\n", path);
+ IfTrace1((MustTraceCalls),"HeadSegment(%p)\n", path);
if (path == NULL)
return(NULL);
if (path->type == STROKEPATHTYPE)
@@ -1434,7 +1433,7 @@ void DumpPath(p)
register fractpel lastx,lasty;
DOUBLE roundness;
- IfTrace1(TRUE,"Dumping path, anchor=%x:\n", p);
+ IfTrace1(TRUE,"Dumping path, anchor=%p:\n", p);
lastx = lasty = 0;
for (;p != NULL; p=p->link) {
@@ -1446,13 +1445,13 @@ void DumpPath(p)
case LINETYPE:
IfTrace1(TRUE,". line<%x> to", (LONG) p->flag);
- IfTrace4(TRUE," (%p,%p), delta=(%p,%p)",
+ IfTrace4(TRUE," (%d,%d), delta=(%d,%d)",
x + lastx, y + lasty, x, y);
break;
case MOVETYPE:
IfTrace1(TRUE,"MOVE<%x> to", (LONG) p->flag);
- IfTrace4(TRUE,"(%p,%p), delta=(%p,%p)",
+ IfTrace4(TRUE,"(%d,%d), delta=(%d,%d)",
x + lastx, y + lasty, x, y);
break;
@@ -1461,10 +1460,10 @@ void DumpPath(p)
register struct conicsegment *cp = (struct conicsegment *) p;
roundness = cp->roundness;
- IfTrace2(TRUE, ". conic to (%p,%p),",
+ IfTrace2(TRUE, ". conic to (%d,%d),",
x + lastx, y + lasty);
- IfTrace3(TRUE," M=(%p,%p), r=%f", cp->M.x + lastx,
- cp->M.y + lasty, &roundness);
+ IfTrace3(TRUE," M=(%d,%d), r=%f", cp->M.x + lastx,
+ cp->M.y + lasty, roundness);
}
break;
@@ -1472,10 +1471,10 @@ void DumpPath(p)
{
register struct beziersegment *bp = (struct beziersegment *) p;
- IfTrace4(TRUE,". bezier to (%p,%p), B=(%p,%p)",
+ IfTrace4(TRUE,". bezier to (%d,%d), B=(%d,%d)",
x + lastx, y + lasty,
bp->B.x + lastx, bp->B.y + lasty);
- IfTrace2(TRUE, ", C=(%p,%p)",
+ IfTrace2(TRUE, ", C=(%d,%d)",
bp->C.x + lastx, bp->C.y + lasty);
}
break;
@@ -1484,13 +1483,13 @@ void DumpPath(p)
{
register struct hintsegment *hp = (struct hintsegment *) p;
- IfTrace4(TRUE,". hint ref=(%p,%p), width=(%p,%p)",
+ IfTrace4(TRUE,". hint ref=(%d,%d), width=(%d,%d)",
hp->ref.x + lastx, hp->ref.y + lasty,
hp->width.x, hp->width.y);
IfTrace4(TRUE, ", %c %c %c %c",
hp->orientation, hp->hinttype,
hp->adjusttype, hp->direction);
- IfTrace1(TRUE, ", %ld", (LONG) hp->label);
+ IfTrace1(TRUE, ", %d", (LONG) hp->label);
}
break;
@@ -1501,7 +1500,7 @@ void DumpPath(p)
default:
IfTrace0(TRUE, "bad path segment?");
}
- IfTrace1(TRUE," at %x\n", p);
+ IfTrace1(TRUE," at %p\n", p);
lastx += x;
lasty += y;
}
diff --git a/Build/source/texk/ps2pkm/regions.c b/Build/source/texk/ps2pkm/regions.c
index a5979d9681c..c6cc21c73ed 100644
--- a/Build/source/texk/ps2pkm/regions.c
+++ b/Build/source/texk/ps2pkm/regions.c
@@ -332,7 +332,7 @@ Allocate() makes everything it allocates be in multiples of longs.
*/
LONGCOPY(&r[1], xvalues, (ymax - iy) * sizeof(pel) + sizeof(LONG) - 1);
- IfTrace1((RegionDebug),"result=%x\n", r);
+ IfTrace1((RegionDebug),"result=%p\n", r);
return(r);
}
@@ -376,7 +376,7 @@ struct region *Interior(p, fillrule)
char tempflag; /* flag; is path temporary? */
char Cflag; /* flag; should we apply continuity? */
- IfTrace2((MustTraceCalls),". INTERIOR(%x, %d)\n", p, (LONG) fillrule);
+ IfTrace2((MustTraceCalls),". INTERIOR(%p, %d)\n", p, (LONG) fillrule);
if (p == NULL)
return(NULL);
@@ -453,7 +453,7 @@ The hints data structure must be initialized once for each path.
x = lastx + p->dest.x;
y = lasty + p->dest.y;
- IfTrace2((HintDebug > 0),"Ending point = (%p,%p)\n", x, y);
+ IfTrace2((HintDebug > 0),"Ending point = (%d,%d)\n", x, y);
nextP = p->link;
@@ -473,7 +473,7 @@ the first on the path), we need to close (reverse) any open hints.
if (ProcessHints)
if ((p->type == MOVETYPE) && (p->last == NULL)) {
CloseHints(&hint);
- IfTrace2((HintDebug>0),"Closed point= (%p,%p)\n",
+ IfTrace2((HintDebug>0),"Closed point= (%d,%d)\n",
x+hint.x, y+hint.y);
}
@@ -504,7 +504,7 @@ We now apply the full hint value to the ending point of the path segment.
x += hint.x;
y += hint.y;
- IfTrace2((HintDebug>0),"Hinted ending point = (%p,%p)\n", x, y);
+ IfTrace2((HintDebug>0),"Hinted ending point = (%d,%d)\n", x, y);
switch(p->type) {
@@ -596,7 +596,7 @@ static int Unwind(area)
register int y; /* ymin of current swath */
register int count,newcount; /* winding count registers */
- IfTrace1((RegionDebug>0),"...Unwind(%x)\n", area);
+ IfTrace1((RegionDebug>0),"...Unwind(%p)\n", area);
while (VALIDEDGE(area)) {
@@ -661,7 +661,7 @@ void ChangeDirection(type, R, x, y, dy)
register pel idy; /* nearest integer pel to 'dy' */
register int ydiff; /* allowed Y difference in 'currentworkarea' */
- IfTrace4((RegionDebug>0),"Change Y direction (%d) from (%p,%p), dy=%p\n",
+ IfTrace4((RegionDebug>0),"Change Y direction (%d) from (%d,%d), dy=%d\n",
(LONG) type, x, y, dy);
if (type != CD_FIRST) {
@@ -800,14 +800,8 @@ struct edgelist *SortSwath(anchor, edge, swathfcn)
struct edgelist base;
if (RegionDebug > 0) {
- if (RegionDebug > 2) {
- IfTrace3(TRUE,"SortSwath(anchor=%x, edge=%x, fcn=%x)\n",
- anchor, edge, swathfcn);
- }
- else {
- IfTrace3(TRUE,"SortSwath(anchor=%x, edge=%x, fcn=%x)\n",
- anchor, edge, swathfcn);
- }
+ IfTrace3(TRUE,"SortSwath(anchor=%p, edge=%p, fcn=%p)\n",
+ anchor, edge, swathfcn);
}
if (anchor == NULL)
return(edge);
@@ -883,11 +877,11 @@ contains all the edges before. Whew! A simple matter now of adding
*/
before->link = edge;
if (RegionDebug > 1) {
- IfTrace3(TRUE,"SortSwath: in between %x and %x are %x",
+ IfTrace3(TRUE,"SortSwath: in between %p and %p are %p",
before, after, edge);
while (edge->link != NULL) {
edge = edge->link;
- IfTrace1(TRUE," and %x", edge);
+ IfTrace1(TRUE," and %p", edge);
}
IfTrace0(TRUE,"\n");
}
@@ -915,7 +909,7 @@ static struct edgelist *splitedge(list, y)
register struct edgelist *r; /* temp pointer to new structure */
register struct edgelist *lastlist; /* temp pointer to last 'list' value */
- IfTrace2((RegionDebug > 1),"splitedge of %x at %d ", list, (LONG) y);
+ IfTrace2((RegionDebug > 1),"splitedge of %p at %d ", list, (LONG) y);
lastlist = new = NULL;
@@ -968,7 +962,7 @@ Then, we return the caller a pointer to 'new':
t1_abort("null splitedge");
lastlist->link = NULL;
last->link = list;
- IfTrace1((RegionDebug > 1),"yields %x\n", new);
+ IfTrace1((RegionDebug > 1),"yields %p\n", new);
return(new);
}
@@ -1084,7 +1078,7 @@ struct edgelist *SwathUnion(before0, edge)
register struct edgelist *before,*after; /* edge before and after */
int h0; /* saves initial height */
- IfTrace2((RegionDebug > 1),"SwathUnion entered, before=%x, edge=%x\n",
+ IfTrace2((RegionDebug > 1),"SwathUnion entered, before=%p, edge=%p\n",
before0, edge);
h0 = h = edge->ymax - edge->ymin;
@@ -1125,7 +1119,7 @@ the height by that amount.
if (after == NULL || TOP(after) != TOP(edge) ||
after->xvalues[0] > rightedge->xvalues[0]) {
IfTrace2((RegionDebug > 1),
- "SwathUnion starts disjoint: before=%x after=%x\n",
+ "SwathUnion starts disjoint: before=%p after=%p\n",
before, after);
/*
On this side of the the above 'if', the new edge is disjoint from the
@@ -1192,7 +1186,7 @@ out the new situation:
h -= touches(h, rightedge->xvalues, after->xvalues);
IfTrace3((RegionDebug > 1),
- "SwathUnion is overlapped until %d: before=%x after=%x\n",
+ "SwathUnion is overlapped until %d: before=%p after=%p\n",
(LONG) TOP(edge) + h, before, after);
/*
OK, if we touched either of our neighbors we need to split at that point
@@ -1339,7 +1333,7 @@ static void discard(register struct edgelist *left, register struct edgelist *ri
{
register struct edgelist *beg,*end,*p;
- IfTrace2((RegionDebug > 0),"discard: l=%x, r=%x\n", left, right);
+ IfTrace2((RegionDebug > 0),"discard: l=%p, r=%p\n", left, right);
beg = left->link;
if (beg == right)
@@ -1348,7 +1342,7 @@ static void discard(register struct edgelist *left, register struct edgelist *ri
for (p = beg; p != right; p = p->link) {
if (p->link == NULL && right != NULL)
t1_abort("discard(): ran off end");
- IfTrace1((RegionDebug > 0),"discarding %x\n", p);
+ IfTrace1((RegionDebug > 0),"discarding %p\n", p);
p->ymin = p->ymax = 32767;
end = p;
}
@@ -1533,7 +1527,7 @@ struct region *BoxClip(R, xmin, ymin, xmax, ymax)
struct edgelist anchor; /* pretend edgelist to facilitate discards */
register struct edgelist *e,*laste;
- IfTrace1((OffPageDebug),"BoxClip of %x:\n", R);
+ IfTrace1((OffPageDebug),"BoxClip of %p:\n", R);
R = UniqueRegion(R);
@@ -1643,10 +1637,10 @@ struct segment *RegionBounds(R)
void DumpArea(area)
register struct region *area;
{
- IfTrace1(TRUE,"Dumping area %x,", area);
+ IfTrace1(TRUE,"Dumping area %p,", area);
IfTrace4(TRUE," X %d:%d Y %d:%d;", (LONG) area->xmin,
(LONG) area->xmax, (LONG) area->ymin,(LONG) area->ymax);
- IfTrace4(TRUE," origin=(%p,%p), ending=(%p,%p)\n",
+ IfTrace4(TRUE," origin=(%d,%d), ending=(%d,%d)\n",
area->origin.x, area->origin.y, area->ending.x, area->ending.y);
DumpEdges(area->anchor);
}
@@ -1675,7 +1669,7 @@ void DumpEdges(edges)
for (p=edges; p != NULL; p = p->link) {
edgecheck(p, ymin, ymax);
ymin = p->ymin; ymax = p->ymax;
- IfTrace3(TRUE,". at %x type=%d flag=%x",
+ IfTrace3(TRUE,". at %p type=%d flag=%x",
p, (LONG) p->type,(LONG) p->flag);
IfTrace4(TRUE," bounding box HxW is %dx%d at (%d,%d)\n",
(LONG) ymax - ymin, (LONG) p->xmax - p->xmin,
@@ -1695,10 +1689,10 @@ void DumpEdges(edges)
IfTrace2 (TRUE,". Swath from %d to %d:\n",
ymin, ymax);
for (p=p2; INSWATH(p,ymin,ymax); p = p->link) {
- IfTrace4(TRUE,". . at %x[%x] range %d:%d, ",
+ IfTrace4(TRUE,". . at %p[%x] range %d:%d, ",
p, (LONG) p->flag,
(LONG) p->xmin, (LONG)p->xmax);
- IfTrace1(TRUE, "subpath=%x,\n", p->subpath);
+ IfTrace1(TRUE, "subpath=%p,\n", p->subpath);
}
}
for (y=MAX(ymin,RegionDebugYMin); y < MIN(ymax, RegionDebugYMax); y++) {
diff --git a/Build/source/texk/ps2pkm/spaces.c b/Build/source/texk/ps2pkm/spaces.c
index 3d9f6612708..a14efb2eb38 100644
--- a/Build/source/texk/ps2pkm/spaces.c
+++ b/Build/source/texk/ps2pkm/spaces.c
@@ -274,7 +274,7 @@ struct XYspace *Context(device, units)
register int n; /* will hold device context number */
register struct XYspace *S; /* XYspace constructed */
- IfTrace2((MustTraceCalls),"Context(%x, %f)\n", device, &units);
+ IfTrace2((MustTraceCalls),"Context(%p, %f)\n", device, units);
ARGCHECK((device == NULL), "Context of NULLDEVICE not allowed",
NULL, IDENTITY, (0), struct XYspace *);
@@ -741,8 +741,8 @@ struct xobject *t1_Transform(obj, cxx, cyx, cxy, cyy)
{
DOUBLE M[2][2];
- IfTrace1((MustTraceCalls),"Transform(%z,", obj);
- IfTrace4((MustTraceCalls)," %f %f %f %f)\n", &cxx, &cyx, &cxy, &cyy);
+ IfTrace1((MustTraceCalls),"Transform(%p,", obj);
+ IfTrace4((MustTraceCalls)," %f %f %f %f)\n", cxx, cyx, cxy, cyy);
M[0][0] = cxx;
M[0][1] = cyx;
@@ -762,7 +762,7 @@ struct xobject *t1_Scale(obj, sx, sy)
DOUBLE sx,sy; /* scale factors in x and y */
{
DOUBLE M[2][2];
- IfTrace3((MustTraceCalls),"Scale(%z, %f, %f)\n", obj, &sx, &sy);
+ IfTrace3((MustTraceCalls),"Scale(%p, %f, %f)\n", obj, sx, sy);
M[0][0] = sx;
M[1][1] = sy;
M[1][0] = M[0][1] = 0.0;
@@ -785,7 +785,7 @@ struct xobject *xiRotate(obj, degrees)
DOUBLE M[2][2];
- IfTrace2((MustTraceCalls),"Rotate(%z, %f)\n", obj, &degrees);
+ IfTrace2((MustTraceCalls),"Rotate(%p, %f)\n", obj, degrees);
M[0][0] = M[1][1] = DegreeCos(degrees);
M[1][0] = - (M[0][1] = DegreeSin(degrees));
@@ -990,12 +990,12 @@ void FormatFP(str, fpel)
void DumpSpace(S)
register struct XYspace *S;
{
- IfTrace4(TRUE,"--Coordinate space at %x,ID=%d,convert=%x,iconvert=%x\n",
+ IfTrace4(TRUE,"--Coordinate space at %p,ID=%d,convert=%p,iconvert=%p\n",
S, S->ID, S->convert, S->iconvert);
IfTrace2(TRUE," | %12.3f %12.3f |",
- &S->tofract.normal[0][0], &S->tofract.normal[0][1]);
- IfTrace2(TRUE," [ %p %p ]\n", S->itofract[0][0], S->itofract[0][1]);
+ S->tofract.normal[0][0], S->tofract.normal[0][1]);
+ IfTrace2(TRUE," [ %d %d ]\n", S->itofract[0][0], S->itofract[0][1]);
IfTrace2(TRUE," | %12.3f %12.3f |",
- &S->tofract.normal[1][0], &S->tofract.normal[1][1]);
- IfTrace2(TRUE," [ %p %p ]\n", S->itofract[1][0], S->itofract[1][1]);
+ S->tofract.normal[1][0], S->tofract.normal[1][1]);
+ IfTrace2(TRUE," [ %d %d ]\n", S->itofract[1][0], S->itofract[1][1]);
}
diff --git a/Build/source/texk/ps2pkm/t1funcs.c b/Build/source/texk/ps2pkm/t1funcs.c
index 263bb027c00..5f6b8c67269 100644
--- a/Build/source/texk/ps2pkm/t1funcs.c
+++ b/Build/source/texk/ps2pkm/t1funcs.c
@@ -242,7 +242,7 @@ int Type1OpenScalable (ev, ppFont, flags, entry, fileName, vals, format,
else {
h = w = 0;
area->xmin = area->xmax = 0;
- area->ymax = area->ymax = 0;
+ area->ymin = area->ymax = 0;
}
glyphs[i].metrics.leftSideBearing = area->xmin;
diff --git a/Build/source/texk/ps2pkm/token.c b/Build/source/texk/ps2pkm/token.c
index 00a2966d52d..f5f9d6010dd 100644
--- a/Build/source/texk/ps2pkm/token.c
+++ b/Build/source/texk/ps2pkm/token.c
@@ -108,7 +108,7 @@ static DOUBLE P10(exponent)
if (exponent < 0) {
power = 0.1;
value = (exponent & 1 ? power : 1.0);
- exponent = -(++exponent >> 1); /* portable C for -(exponent/2) */
+ exponent = -((exponent + 1) >> 1); /* portable C for -(exponent/2) */
}
else {
power = 10.0;
diff --git a/Build/source/texk/ps2pkm/type1.c b/Build/source/texk/ps2pkm/type1.c
index fbab1aee7bf..abca66c6eba 100644
--- a/Build/source/texk/ps2pkm/type1.c
+++ b/Build/source/texk/ps2pkm/type1.c
@@ -1137,7 +1137,7 @@ static void Escape(Code)
static void HStem(y, dy)
DOUBLE y, dy;
{
- IfTrace2((FontDebug), "Hstem %f %f\n", &y, &dy);
+ IfTrace2((FontDebug), "Hstem %f %f\n", y, dy);
if (ProcessHints) {
if (numstems >= MAXSTEMS) Error0("HStem: Too many hints\n");
if (dy < 0.0) {y += dy; dy = -dy;}
@@ -1158,7 +1158,7 @@ static void HStem(y, dy)
static void VStem(x, dx)
DOUBLE x, dx;
{
- IfTrace2((FontDebug), "Vstem %f %f\n", &x, &dx);
+ IfTrace2((FontDebug), "Vstem %f %f\n", x, dx);
if (ProcessHints) {
if (numstems >= MAXSTEMS) Error0("VStem: Too many hints\n");
if (dx < 0.0) {x += dx; dx = -dx;}
@@ -1179,7 +1179,7 @@ static void RLineTo(dx, dy)
{
struct segment *B;
- IfTrace2((FontDebug), "RLineTo %f %f\n", &dx, &dy);
+ IfTrace2((FontDebug), "RLineTo %f %f\n", dx, dy);
B = Loc(CharSpace, dx, dy);
@@ -1202,8 +1202,8 @@ static void RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
{
struct segment *B, *C, *D;
- IfTrace4((FontDebug), "RRCurveTo %f %f %f %f ", &dx1, &dy1, &dx2, &dy2);
- IfTrace2((FontDebug), "%f %f\n", &dx3, &dy3);
+ IfTrace4((FontDebug), "RRCurveTo %f %f %f %f ", dx1, dy1, dx2, dy2);
+ IfTrace2((FontDebug), "%f %f\n", dx3, dy3);
B = Loc(CharSpace, dx1, dy1);
C = Loc(CharSpace, dx2, dy2);
@@ -1293,7 +1293,7 @@ static void RMoveTo(dx,dy)
{
struct segment *B;
- IfTrace2((FontDebug), "RMoveTo %f %f\n", &dx, &dy);
+ IfTrace2((FontDebug), "RMoveTo %f %f\n", dx, dy);
B = Loc(CharSpace, dx, dy);
@@ -1324,7 +1324,7 @@ static void Seac(DOUBLE asb, DOUBLE adx, DOUBLE ady,
int Code;
struct segment *mypath;
- IfTrace4((FontDebug), "SEAC %f %f %f %d ", &asb, &adx, &ady, bchar);
+ IfTrace4((FontDebug), "SEAC %f %f %f %d ", asb, adx, ady, bchar);
IfTrace1((FontDebug), "%d\n", achar);
/* Move adx - asb, ady over and up from base char's sbpoint. */
@@ -1388,7 +1388,7 @@ static void Seac(DOUBLE asb, DOUBLE adx, DOUBLE ady,
static void Sbw(sbx, sby, wx, wy)
DOUBLE sbx, sby, wx, wy;
{
- IfTrace4((FontDebug), "SBW %f %f %f %f\n", &sbx, &sby, &wx, &wy);
+ IfTrace4((FontDebug), "SBW %f %f %f %f\n", sbx, sby, wx, wy);
escapementX = wx; /* Character width vector */
escapementY = wy;
@@ -1406,7 +1406,7 @@ static void Sbw(sbx, sby, wx, wy)
static DOUBLE Div(num1, num2)
DOUBLE num1, num2;
{
- IfTrace2((FontDebug), "Div %f %f\n", &num1, &num2);
+ IfTrace2((FontDebug), "Div %f %f\n", num1, num2);
return(num1 / num2);
}
@@ -1736,7 +1736,7 @@ static void CallOtherSubr(othersubrno)
static void SetCurrentPoint(x, y)
DOUBLE x, y;
{
- IfTrace2((FontDebug), "SetCurrentPoint %f %f\n", &x, &y);
+ IfTrace2((FontDebug), "SetCurrentPoint %f %f\n", x, y);
currx = x;
curry = y;