summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-08 07:05:53 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-10-08 07:05:53 +0000
commita0bf5a0634d9ee69a111d574784b485096c45c16 (patch)
treeaa60d8924e00735fb0546fe97f83c9db8fc6fcba /Build
parent33e0625cb297161800e5199be582eac0f37f7ad1 (diff)
texk/ps2pkm: More cleanup: return types, protos, static, const, ...
git-svn-id: svn://tug.org/texlive/trunk@35330 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/ps2pkm/ChangeLog29
-rw-r--r--Build/source/texk/ps2pkm/basics.c4
-rw-r--r--Build/source/texk/ps2pkm/basics.h4
-rw-r--r--Build/source/texk/ps2pkm/curves.c12
-rw-r--r--Build/source/texk/ps2pkm/encoding.c25
-rw-r--r--Build/source/texk/ps2pkm/ffilest.h2
-rw-r--r--Build/source/texk/ps2pkm/filenames.c10
-rw-r--r--Build/source/texk/ps2pkm/filenames.h4
-rw-r--r--Build/source/texk/ps2pkm/fontfcn.c4
-rw-r--r--Build/source/texk/ps2pkm/hints.c51
-rw-r--r--Build/source/texk/ps2pkm/mag.c2
-rw-r--r--Build/source/texk/ps2pkm/objects.c16
-rw-r--r--Build/source/texk/ps2pkm/objects.h1
-rw-r--r--Build/source/texk/ps2pkm/paths.c25
-rw-r--r--Build/source/texk/ps2pkm/pfb2pfa.c3
-rw-r--r--Build/source/texk/ps2pkm/pkout.c8
-rw-r--r--Build/source/texk/ps2pkm/pktest.c3
-rw-r--r--Build/source/texk/ps2pkm/ps2pk.c11
-rw-r--r--Build/source/texk/ps2pkm/regions.c65
-rw-r--r--Build/source/texk/ps2pkm/regions.h2
-rw-r--r--Build/source/texk/ps2pkm/scanfont.c731
-rw-r--r--Build/source/texk/ps2pkm/spaces.c41
-rw-r--r--Build/source/texk/ps2pkm/t1funcs.c46
-rw-r--r--Build/source/texk/ps2pkm/t1info.c77
-rw-r--r--Build/source/texk/ps2pkm/t1io.c10
-rw-r--r--Build/source/texk/ps2pkm/t1stub.c4
-rw-r--r--Build/source/texk/ps2pkm/token.c102
-rw-r--r--Build/source/texk/ps2pkm/tokst.h64
-rw-r--r--Build/source/texk/ps2pkm/type1.c112
-rw-r--r--Build/source/texk/ps2pkm/util.c2
-rw-r--r--Build/source/texk/ps2pkm/util.h2
31 files changed, 706 insertions, 766 deletions
diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog
index b52adda2437..a44f50fd5f4 100644
--- a/Build/source/texk/ps2pkm/ChangeLog
+++ b/Build/source/texk/ps2pkm/ChangeLog
@@ -1,3 +1,32 @@
+2014-10-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ps2pk.c: Add return type for main and GetClientResolutions.
+ * regions.c: Add return type for OptimizeRegion.
+ * t1funcs.c: Add return type for Type1RegisterFontFileFunctions.
+ * t1stub.c: Add return type for xiStub.
+
+ * encoding.c (my_string, remove_string, addcc, getcc, decimal,
+ nextsymbol, nextpsname), filenames.c (equal), objects.[ch]
+ (Pragmatics), pkout.c (optimal_size, PSPKINT, magnification),
+ regions.[ch] (BoxClip), t1stub.c (xiStub): Declare as static.
+
+ * curves.c, hints.c, objects.c, paths.c, regions.c, scanfont.c,
+ spaces.c, t1funcs.c, t1info.c, t1io.c, token.c, tokst.h,
+ type1.c: ANSI/ISO C for all static functions.
+
+ * paths.c, regions.c, scanfont.c, spaces.c, t1info.c: Add braces
+ around substructures in initializers.
+
+ * basics.[ch], encoding.c, ffilest.h, filenames.[ch],
+ fontfcn.c, mag.c, objects.c, pfb2pfa.c, pkout.c, pktest.c,
+ ps2pk.c, scanfonts.c, spaces.c, t1funcs.c, t1info.c, util.[ch]:
+ Declare various local and global variables, function parameters
+ and return values, and struct members as const.
+
+ * scanfonts.c: Add parentheses around assignment as truth value.
+
+ * regions.c: Add braces to avoid 'ambiguos else'.
+
2014-10-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pk2bm.c, paths.c, pkout.c, ps2pk.c, regions.c, t1func.c:
diff --git a/Build/source/texk/ps2pkm/basics.c b/Build/source/texk/ps2pkm/basics.c
index 273d4d245b8..95fcc5b104f 100644
--- a/Build/source/texk/ps2pkm/basics.c
+++ b/Build/source/texk/ps2pkm/basics.c
@@ -7,7 +7,7 @@
#include "basics.h"
/* Give up ... */
-void fatal(char *fmt, ...)
+void fatal(const char *fmt, ...)
{ va_list args;
va_start(args, fmt);
@@ -17,7 +17,7 @@ void fatal(char *fmt, ...)
}
/* Give a message ... */
-void msg(char *fmt, ...)
+void msg(const char *fmt, ...)
{ va_list args;
va_start(args, fmt);
diff --git a/Build/source/texk/ps2pkm/basics.h b/Build/source/texk/ps2pkm/basics.h
index aba1db8b078..944e6a94890 100644
--- a/Build/source/texk/ps2pkm/basics.h
+++ b/Build/source/texk/ps2pkm/basics.h
@@ -77,8 +77,8 @@
#include <stdarg.h>
-void fatal(char *fmt, ...);
-void msg(char *fmt, ...);
+void fatal(const char *fmt, ...);
+void msg(const char *fmt, ...);
/* For debugging purposes it is handy to have a fopen() function that
* shows which files are opened.
diff --git a/Build/source/texk/ps2pkm/curves.c b/Build/source/texk/ps2pkm/curves.c
index 5ad48995227..507e0a73cd2 100644
--- a/Build/source/texk/ps2pkm/curves.c
+++ b/Build/source/texk/ps2pkm/curves.c
@@ -113,12 +113,12 @@ Bezier to define his curves as he did. If the input region 'R' is NULL,
the result is a path that is the 'flattened' curve; otherwise StepBezier
returns nothing special.
*/
-static struct segment *StepBezierRecurse(I,xA,yA,xB,yB,xC,yC,xD,yD)
- struct bezierinfo *I; /* Region under construction or NULL */
- fractpel xA,yA; /* A control point */
- fractpel xB,yB; /* B control point */
- fractpel xC,yC; /* C control point */
- fractpel xD,yD; /* D control point */
+static struct segment *StepBezierRecurse(
+ struct bezierinfo *I, /* Region under construction or NULL */
+ fractpel xA, fractpel yA, /* A control point */
+ fractpel xB, fractpel yB, /* B control point */
+ fractpel xC, fractpel yC, /* C control point */
+ fractpel xD, fractpel yD) /* D control point */
{
if (BezierTerminationTest(xA,yA,xB,yB,xC,yC,xD,yD))
diff --git a/Build/source/texk/ps2pkm/encoding.c b/Build/source/texk/ps2pkm/encoding.c
index e3584f2227c..542431016ee 100644
--- a/Build/source/texk/ps2pkm/encoding.c
+++ b/Build/source/texk/ps2pkm/encoding.c
@@ -25,18 +25,17 @@
#include <stdlib.h>
#include <string.h>
-char *my_string(char *);
-void remove_string();
-void addcc(char *name, int charcode);
-int getcc(char *name);
-void initcc();
+static char *my_string(char *);
+static void remove_string(void);
+static void addcc(char *name, int charcode);
+static int getcc(char *name);
extern char *encfile, *afmfile;
/* return a pointer to first non space character after occurence of string t,
* the scan starts at pointer s
*/
-static char *value_after(char *s, char *t)
+static char *value_after(char *s, const char *t)
{ int l;
l = strlen(t);
for (;;) {
@@ -50,7 +49,7 @@ static char *value_after(char *s, char *t)
return s;
}
-int decimal(char *s)
+static int decimal(char *s)
{ int sign = 1, d = 0;
while (isspace((unsigned char)*s)) s++;
@@ -69,7 +68,7 @@ FILE *enc;
#define LINEBUF 1024
char line[LINEBUF], *pline = NULL;
-char nextsymbol()
+static char nextsymbol(void)
{
for (;;) {
if (pline == NULL) {
@@ -87,7 +86,7 @@ char nextsymbol()
pline++; return *(pline-1);
}
-char *nextpsname()
+static char *nextpsname(void)
{ int i = 0;
char the_nextname[MAXSTRLEN], *name;
@@ -256,7 +255,7 @@ struct Node
static int freenode = 0;
static short root = -1;
-void addcc(char *name, int charcode)
+static void addcc(char *name, int charcode)
{ short r, p, q;
q = root;
@@ -290,7 +289,7 @@ void addcc(char *name, int charcode)
freenode++;
}
-int getcc(char *name)
+static int getcc(char *name)
{ short r, p, q, cc;
q = root;
@@ -326,7 +325,7 @@ static char stringpool[POOLSIZE];
static int poolsize, /* occupied space annex free index */
lastpoolsize; /* previous poolsize */
-char *my_string(char *s)
+static char *my_string(char *s)
{ int length; char *str;
while (isspace((unsigned char)*s)) s++;
@@ -347,7 +346,7 @@ char *my_string(char *s)
}
/* remove last string from stringpool */
-void remove_string()
+static void remove_string(void)
{
poolsize = lastpoolsize;
}
diff --git a/Build/source/texk/ps2pkm/ffilest.h b/Build/source/texk/ps2pkm/ffilest.h
index 6a13d034088..0bc413d3477 100644
--- a/Build/source/texk/ps2pkm/ffilest.h
+++ b/Build/source/texk/ps2pkm/ffilest.h
@@ -116,7 +116,7 @@ typedef struct _FontDirectory {
} FontDirectoryRec;
typedef struct _FontRenderer {
- char *fileSuffix;
+ const char *fileSuffix;
int fileSuffixLen;
int (*OpenBitmap)(/* fpe, pFont, flags, entry, fileName, format, fmask */);
int (*OpenScalable)(/* fpe, pFont, flags, entry, fileName, vals, format, fmask */);
diff --git a/Build/source/texk/ps2pkm/filenames.c b/Build/source/texk/ps2pkm/filenames.c
index e1a3164c042..1a3d3a55c3c 100644
--- a/Build/source/texk/ps2pkm/filenames.c
+++ b/Build/source/texk/ps2pkm/filenames.c
@@ -17,6 +17,7 @@
#include <string.h>
#include "basics.h" /* basic definitions and fatal() */
+#include "filenames.h"
/* for those systems that don't provide an ANSI strchr() */
static char *charptr(char *name, char c)
@@ -27,7 +28,7 @@ static char *charptr(char *name, char c)
}
/* comparing names (system dependant) */
-int equal(char *s, char *t)
+static int equal(const char *s, const char *t)
{
# ifndef UNIX
while (tolower(*s) == tolower(*t)) {
@@ -61,7 +62,7 @@ char *extension(char *str) {
* Construct filename by replacing the current extension (if available)
* with supplied one.
*/
-char *newname(char *name, char *ext)
+char *newname(char *name, const char *ext)
{
char *e, *nn; int len1, len2;
@@ -79,8 +80,9 @@ char *newname(char *name, char *ext)
/*
* Derived from BSD basename
*/
-char *basename(char *str, char *suffix){
- char *p, *t; int len = 0;
+char *basename(char *str, const char *suffix){
+ char *p; int len = 0;
+ const char *t;
char *base;
printf("basename of %s = ", str);
diff --git a/Build/source/texk/ps2pkm/filenames.h b/Build/source/texk/ps2pkm/filenames.h
index 5d4b897a0a0..6913011477c 100644
--- a/Build/source/texk/ps2pkm/filenames.h
+++ b/Build/source/texk/ps2pkm/filenames.h
@@ -16,13 +16,13 @@ char *extension(char *str);
* a new string is allocated so that the original value of str is
* not changed.
*/
-char *basename(char *str, char *suffix);
+char *basename(char *str, const char *suffix);
/*
* Newname builds a new filename by adding or replacing the extension
* of the given <name> with the new supplied <ext>.
*/
-char *newname(char *name, char *ext);
+char *newname(char *name, const char *ext);
/*
* ps_resource returns true if name can be treated as a PS resource
diff --git a/Build/source/texk/ps2pkm/fontfcn.c b/Build/source/texk/ps2pkm/fontfcn.c
index 4d726d3a220..0a1adaa9031 100644
--- a/Build/source/texk/ps2pkm/fontfcn.c
+++ b/Build/source/texk/ps2pkm/fontfcn.c
@@ -36,7 +36,7 @@
#include "fontfcn.h"
#include "fontmisc.h"
-extern void objFormatName(psobj *, int, char *);
+extern void objFormatName(psobj *, int, const char *);
extern xobject Type1Char();
extern boolean Init_BuiltInEncoding();
@@ -232,7 +232,7 @@ int *mode;
void QueryFontLib(env,infoName,infoValue,rcodeP)
char *env;
-char *infoName;
+const char *infoName;
pointer infoValue; /* parameter returned here */
int *rcodeP;
{
diff --git a/Build/source/texk/ps2pkm/hints.c b/Build/source/texk/ps2pkm/hints.c
index 6e0444f4759..4d5adf735fd 100644
--- a/Build/source/texk/ps2pkm/hints.c
+++ b/Build/source/texk/ps2pkm/hints.c
@@ -121,10 +121,8 @@ void CloseHints(hintP)
:h3.ComputeHint(hP, currX, currY, hintP) - Compute the value of a hint
*/
-static void ComputeHint(hP, currX, currY, hintP)
- struct hintsegment *hP;
- fractpel currX, currY;
- struct fractpoint *hintP;
+static void ComputeHint(struct hintsegment *hP, fractpel currX, fractpel currY,
+ struct fractpoint *hintP)
{
fractpel currRef = 0, currWidth = 0;
int idealWidth;
@@ -363,9 +361,9 @@ off of the edge's range; XofY() could be replace by FindXofY() to
call ourselves recursively if this were not true.
*/
-static pel SearchXofY(edge, y)
- register struct edgelist *edge; /* represents edge */
- register pel y; /* 'y' value to find edge for */
+static pel SearchXofY(
+ register struct edgelist *edge, /* represents edge */
+ register pel y) /* 'y' value to find edge for */
{
register struct edgelist *e; /* loop variable */
@@ -416,9 +414,10 @@ are at the top and the first edge is going up.
#define BLACKBELOW +1
#define NONE 0
-static int ImpliedHorizontalLine(e1, e2, y)
- register struct edgelist *e1,*e2; /* two edges to check */
- register int y; /* y where they might be connected */
+static int ImpliedHorizontalLine(
+ register struct edgelist *e1, /* two edges ... */
+ register struct edgelist *e2, /* ... to check */
+ register int y) /* y where they might be connected */
{
register struct edgelist *e3,*e4;
@@ -487,8 +486,8 @@ routine finds and fixes false breaks.
Also, this routine sets the ISTOP and ISBOTTOM flags in the edge lists.
*/
-static void FixSubPaths(R)
- register struct region *R; /* anchor of region */
+static void FixSubPaths(
+ register struct region *R) /* anchor of region */
{
register struct edgelist *e; /* fast loop variable */
register struct edgelist *edge; /* current edge in region */
@@ -630,10 +629,9 @@ get all the way to the outside without resolving ambiguity.
A debug tool.
*/
-static struct edgelist *before(); /* subroutine of DumpSubPaths */
+static struct edgelist *before(struct edgelist *); /* subroutine of DumpSubPaths */
-static void DumpSubPaths(anchor)
- struct edgelist *anchor;
+static void DumpSubPaths(struct edgelist *anchor)
{
register struct edgelist *edge,*e,*e2;
@@ -676,8 +674,7 @@ static void DumpSubPaths(anchor)
}
}
-static struct edgelist *before(e)
- struct edgelist *e;
+static struct edgelist *before(struct edgelist *e)
{
struct edgelist *r;
for (r = e->subpath; r->subpath != e; r = r->subpath) { ; }
@@ -709,10 +706,10 @@ new x might exceed the region's bounds, updating those are the
responsibility of the caller.
*/
-static void writeXofY(e, y, x)
- struct edgelist *e; /* relevant edgelist */
- int y; /* y value */
- int x; /* new x value */
+static void writeXofY(
+ struct edgelist *e, /* relevant edgelist */
+ int y, /* y value */
+ int x) /* new x value */
{
if (e->xmin > x) e->xmin = x;
if (e->xmax < x) e->xmax = x;
@@ -743,12 +740,12 @@ points (collapses) the white run as necessary if it is not. The
goal is to collapse the white run as little as possible.
*/
-static void CollapseWhiteRun(anchor, yblack, left, right, ywhite)
- struct edgelist *anchor; /* anchor of edge list */
- pel yblack; /* y of (hopefully) black run above or below */
- struct edgelist *left; /* edgelist at left of WHITE run */
- struct edgelist *right; /* edgelist at right of WHITE run */
- pel ywhite; /* y location of white run */
+static void CollapseWhiteRun(
+ struct edgelist *anchor, /* anchor of edge list */
+ pel yblack, /* y of (hopefully) black run above or below */
+ struct edgelist *left, /* edgelist at left of WHITE run */
+ struct edgelist *right, /* edgelist at right of WHITE run */
+ pel ywhite) /* y location of white run */
{
struct edgelist *edge;
struct edgelist *swathstart = anchor;
diff --git a/Build/source/texk/ps2pkm/mag.c b/Build/source/texk/ps2pkm/mag.c
index 49df48259f1..2dd4715e8c8 100644
--- a/Build/source/texk/ps2pkm/mag.c
+++ b/Build/source/texk/ps2pkm/mag.c
@@ -89,7 +89,7 @@ static double stepsize(double);
int main(int argc, char *argv[]) {
float sz, arg; int c;
- char *myname = "mag";
+ const char *myname = "mag";
short done;
while (--argc > 0 && (*++argv)[0] == '-') {
diff --git a/Build/source/texk/ps2pkm/objects.c b/Build/source/texk/ps2pkm/objects.c
index 5cecf70fe37..5718acaebfb 100644
--- a/Build/source/texk/ps2pkm/objects.c
+++ b/Build/source/texk/ps2pkm/objects.c
@@ -73,7 +73,7 @@ a macro for "strcpy" that diverts it to "my_strcpy".
#include "pictures.h"
#include "strokes.h"
#include "cluts.h"
-static char *TypeFmt();
+static const char *TypeFmt(int);
static int ObjectPostMortem(struct xobject *obj);
/*
@@ -768,9 +768,9 @@ static char *ErrorMessage = NULL;
We provide a controlled way for the TYPE1IMAGER user to set and reset
our debugging and tracing:
*/
-void Pragmatics(username, value)
- char *username; /* name of the flag */
- int value; /* value to set it to */
+static void Pragmatics(
+ const char *username, /* name of the flag */
+ int value) /* value to set it to */
{
register char *p; /* temporary loop variable */
#define NAMESIZE 40
@@ -950,10 +950,10 @@ struct xobject *TypeErr(name, obj, expect, ret) /* non-ANSI avoids overly strict
This is a subroutine of TypeErr().
*/
-static char *TypeFmt(type)
- int type; /* type field */
+static const char *TypeFmt(
+ int type) /* type field */
{
- char *r;
+ const char *r;
if (ISPATHTYPE(type))
if (type == TEXTTYPE)
@@ -1047,7 +1047,7 @@ static int test = 0;
/*ARGSUSED*/
void t1_abort(str)
- char *str;
+ const char *str;
{
LineIOTrace = TRUE;
IfTrace1(TRUE,"\nABORT: reason='%s'\n", str);
diff --git a/Build/source/texk/ps2pkm/objects.h b/Build/source/texk/ps2pkm/objects.h
index 2b67f513832..4c6c0d4557b 100644
--- a/Build/source/texk/ps2pkm/objects.h
+++ b/Build/source/texk/ps2pkm/objects.h
@@ -55,7 +55,6 @@ struct xobject *t1_Destroy(); /* destroy an object */
struct xobject *t1_Dup(); /* duplicate an object */
void t1_InitImager(); /* initialize TYPE1IMAGER */
void t1_TermImager(); /* terminate TYPE1IMAGER */
-void t1_Pragmatics(); /* set debug flags, etc. */
char *t1_ErrorMsg(); /* return last TYPE1IMAGER error message */
/*END SHARED*/
diff --git a/Build/source/texk/ps2pkm/paths.c b/Build/source/texk/ps2pkm/paths.c
index f097983510c..4c80ac69528 100644
--- a/Build/source/texk/ps2pkm/paths.c
+++ b/Build/source/texk/ps2pkm/paths.c
@@ -198,7 +198,7 @@ This template is used as a generic segment structure for Allocate:
/* added reference field 1 to temporary template below 3-26-91 PNM */
static struct segment movetemplate = { MOVETYPE, 0, 1, sizeof(struct segment), 0,
- NULL, NULL, 0, 0 };
+ NULL, NULL, { 0, 0 } };
/*
:h3.Loc() - Create an "Invisible Line" Between (0,0) and a Point
@@ -692,9 +692,9 @@ etc.
We need three subroutines:
*/
-static struct segment *SplitPath(); /* break a path at any point */
-static struct segment *DropSubPath(); /* breaks a path after first sub-path */
-static struct segment *ReverseSubPath(); /* reverses a single sub-path */
+static struct segment *SplitPath(struct segment *, struct segment *); /* break a path at any point */
+static struct segment *DropSubPath(struct segment *); /* breaks a path after first sub-path */
+static struct segment *ReverseSubPath(struct segment *); /* reverses a single sub-path */
/*
:h3.Reverse() - User Operator to Reverse a Path
@@ -736,8 +736,8 @@ struct segment *Reverse(p)
:h4.ReverseSubPath() - Subroutine to Reverse a Single Sub-Path
*/
-static struct segment *ReverseSubPath(p)
- register struct segment *p; /* input path */
+static struct segment *ReverseSubPath(
+ register struct segment *p) /* input path */
{
register struct segment *r; /* reversed path will be created here */
register struct segment *nextp; /* temporary variable used in loop */
@@ -824,8 +824,8 @@ breaks the input path after the first sub-path so that a pointer to
the original path now contains the first sub-path only.
*/
-static struct segment *DropSubPath(p0)
- register struct segment *p0; /* original path */
+static struct segment *DropSubPath(
+ register struct segment *p0) /* original path */
{
register struct segment *p; /* returned remainder here */
@@ -837,9 +837,9 @@ static struct segment *DropSubPath(p0)
return(SplitPath(p0, p));
}
-static struct segment *SplitPath(anchor, before)
- register struct segment *anchor;
- register struct segment *before;
+static struct segment *SplitPath(
+ register struct segment *anchor,
+ register struct segment *before)
{
register struct segment *r;
@@ -919,8 +919,7 @@ struct segment *ReverseSubPaths(p)
return(r);
}
-static void UnClose(p0)
- register struct segment *p0;
+static void UnClose(register struct segment *p0)
{
register struct segment *p;
diff --git a/Build/source/texk/ps2pkm/pfb2pfa.c b/Build/source/texk/ps2pkm/pfb2pfa.c
index 48d00467aab..ae9d74e264d 100644
--- a/Build/source/texk/ps2pkm/pfb2pfa.c
+++ b/Build/source/texk/ps2pkm/pfb2pfa.c
@@ -35,7 +35,8 @@ int main (int argc, char *argv[])
unsigned int l1, l2, l3, l4;
short c, done, verbose = 0;
FILE *pfb, *pfa;
- char *pfbname, *pfaname = NULL, *myname = "pfb2pfa";
+ char *pfbname, *pfaname = NULL;
+ const char *myname = "pfb2pfa";
while (--argc > 0 && (*++argv)[0] == '-') {
done=0;
diff --git a/Build/source/texk/ps2pkm/pkout.c b/Build/source/texk/ps2pkm/pkout.c
index 809fd7c6da3..aa97a0e99b0 100644
--- a/Build/source/texk/ps2pkm/pkout.c
+++ b/Build/source/texk/ps2pkm/pkout.c
@@ -123,7 +123,7 @@ void pk_preamble(char *comment, /* source of the font */
/* From `The GFtoPK processor', pp. 231 */
-int optimal_size(int W, int H, int cnt, int count[], int *dyn_f)
+static int optimal_size(int W, int H, int cnt, int count[], int *dyn_f)
{ int comp_size = 0, b_comp_size, deriv[14], i, j, k;
i = (count[0] == 0? 1: 0); /* skip first empty runlength */
@@ -476,7 +476,7 @@ void pk_char(int char_code, /* character code 0..255 */
/*
* Output small string special (<255 chars)
*/
-static void pkstring(char *fmt, ...) {
+static void pkstring(const char *fmt, ...) {
char buf[256]; int i, len;
va_list args;
@@ -499,13 +499,13 @@ static void pkstring(char *fmt, ...) {
* Compute METAFONT magnification string for <dpi>
*/
-int PSPKINT(float x) {
+static int PSPKINT(float x) {
return (int) x;
}
static char mag_str[64];
-char *magnification (int dpi, int BDPI) {
+static char *magnification (int dpi, int BDPI) {
double size, magstep;
if (dpi == BDPI) {
diff --git a/Build/source/texk/ps2pkm/pktest.c b/Build/source/texk/ps2pkm/pktest.c
index 3d38db7a274..5b401e6948d 100644
--- a/Build/source/texk/ps2pkm/pktest.c
+++ b/Build/source/texk/ps2pkm/pktest.c
@@ -20,7 +20,8 @@ int testing = 1;
main(int argc, char *argv[])
{
int done, C = 0, W = 0, H = 0, c;
- char *myname, *pkname, comment[256];
+ const char *myname;
+ char *pkname, comment[256];
int next_pixel();
myname = argv[0];
diff --git a/Build/source/texk/ps2pkm/ps2pk.c b/Build/source/texk/ps2pkm/ps2pk.c
index a920b771baa..ab4ce9e3ee6 100644
--- a/Build/source/texk/ps2pkm/ps2pk.c
+++ b/Build/source/texk/ps2pkm/ps2pk.c
@@ -202,7 +202,7 @@ FontEntryRec entry;
#define Succesful 85
extern int Type1OpenScalable ();
-extern int Type1RegisterFontFileFunctions();
+extern void Type1RegisterFontFileFunctions(void);
extern void Type1CloseFont();
/* end interface to type 1 software */
@@ -239,11 +239,12 @@ static INT32 TFMwidth(int);
static int h_escapement(int);
static void add_option(const char *, const char *);
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
char c;
int done, i;
- char *myname = "ps2pk", *psname, *psbasename, *afmname = NULL,
+ const char *myname = "ps2pk";
+ char *psname, *psbasename, *afmname = NULL,
*encname = NULL, *psfile = NULL, *psfilebn, pkname[80],
*AFM_fontname = NULL,
*encodingscheme = NULL;
@@ -674,12 +675,12 @@ int CheckFSFormat(format, fmask, bit, Byte, scan, glyph, image)
}
-long MakeAtom(char *p, unsigned int len, Bool foo)
+long MakeAtom(const char *p, unsigned int len, Bool foo)
{
return (long)p;
}
-GetClientResolutions(int *resP)
+void GetClientResolutions(int *resP)
{
*resP = 0;
}
diff --git a/Build/source/texk/ps2pkm/regions.c b/Build/source/texk/ps2pkm/regions.c
index 4de905e12e9..657d9214526 100644
--- a/Build/source/texk/ps2pkm/regions.c
+++ b/Build/source/texk/ps2pkm/regions.c
@@ -51,7 +51,7 @@ The included files are:
#include "fonts.h"
#include "hints.h"
#include "strokes.h" /* to pick up 'DoStroke' */
-static void Unwind();
+static void Unwind(struct edgelist *);
static void newfilledge(register struct region *, fractpel, fractpel,
fractpel, fractpel, int);
static void vertjoin(register struct edgelist *, register struct edgelist *);
@@ -60,11 +60,11 @@ static void cedgemin(register int, register pel *, register pel);
static void cedgemax(register int, register pel *, register pel);
static void edgemin(register int, register pel *, register pel *);
static void edgemax(register int, register pel *, register pel *);
-static struct edgelist *splitedge();
-static int touches();
-static int crosses();
-static void edgecheck();
-static struct edgelist *NewEdge();
+static struct edgelist *splitedge(struct edgelist *, pel);
+static int touches(int, pel *, pel *);
+static int crosses(int, pel *, pel *);
+static void edgecheck(struct edgelist *, int, int);
+static struct edgelist *NewEdge(pel, pel, pel, pel, pel *, int);
/*
:h3.Functions Provided to the TYPE1IMAGER User
@@ -141,7 +141,7 @@ Note - removed the refcount = 1 init, replaced with references = 2 3-26-91 PNM
*/
static struct region t1_infinity = { REGIONTYPE,
ISCOMPLEMENT(ON)+ISINFINITE(ON)+ISPERMANENT(ON)+ISIMMORTAL(ON), 2,
- 0, 0, 0, 0,
+ { 0, 0 }, { 0, 0 },
0, 0, 0, 0,
NULL, NULL,
0, 0, 0, 0, 0, NULL, NULL,
@@ -159,7 +159,7 @@ Note - replaced refcount = 1 init with references = 2 3-26-91 PNM
/*SHARED LINE(S) ORIGINATED HERE*/
struct region EmptyRegion = { REGIONTYPE,
ISPERMANENT(ON)+ISIMMORTAL(ON), 2,
- 0, 0, 0, 0,
+ { 0, 0 }, { 0, 0 },
MAXPEL, MAXPEL, MINPEL, MINPEL,
NULL, NULL,
0, 0, 0, 0, 0, NULL, NULL,
@@ -284,11 +284,11 @@ edgelist structure to free all memory associated with it. Damn
clever, huh?
*/
-static struct edgelist *NewEdge(xmin, xmax, ymin, ymax, xvalues, isdown)
- pel xmin,xmax; /* X extent of edge */
- pel ymin,ymax; /* Y extent of edge */
- pel *xvalues; /* list of X values for entire edge */
- int isdown; /* flag: TRUE means edge progresses downward */
+static struct edgelist *NewEdge(
+ pel xmin, pel xmax, /* X extent of edge */
+ pel ymin, pel ymax, /* Y extent of edge */
+ pel *xvalues, /* list of X values for entire edge */
+ int isdown) /* flag: TRUE means edge progresses downward */
{
static struct edgelist template = {
EDGETYPE, 0, 1, NULL, NULL,
@@ -399,12 +399,13 @@ user asked, >1: do it regardless).
/* if (fillrule != EVENODDRULE)
else */
return((struct region *)UniquePath(p));
- if (p->type == STROKEPATHTYPE)
+ if (p->type == STROKEPATHTYPE) {
if (fillrule == WINDINGRULE)
return((struct region *)DoStroke(p));
else
p = CoercePath(p);
+ }
R = (struct region *)Allocate(sizeof(struct region), &EmptyRegion, 0);
ARGCHECK(!ISPATHANCHOR(p), "Interior: bad path", p, R, (0), struct region *);
@@ -589,8 +590,8 @@ or two downward edges are nominally left/right pairs, Unwind() should
discard the second one. Everything should balance; we should discard
an even number of edges; of course, we abort if we don't.
*/
-static void Unwind(area)
- register struct edgelist *area; /* input area modified in place */
+static void Unwind(
+ register struct edgelist *area) /* input area modified in place */
{
register struct edgelist *last,*next; /* struct before and after current one */
register int y; /* ymin of current swath */
@@ -900,9 +901,9 @@ is guaranteed not to change the address of the old swath while splitting
it.
*/
-static struct edgelist *splitedge(list, y)
- struct edgelist *list; /* area to split */
- register pel y; /* Y value to split list at */
+static struct edgelist *splitedge(
+ struct edgelist *list, /* area to split */
+ register pel y) /* Y value to split list at */
{
register struct edgelist *new; /* anchor for newly built list */
register struct edgelist *last; /* end of newly built list */
@@ -1249,9 +1250,7 @@ So, it will return 0 if they never touch. Allows incredibly(?) mnemonic
if (touches(...)) construct.
*/
-static int touches(h, left, right)
- register int h;
- register pel *left,*right;
+static int touches(int h, register pel *left, register pel *right)
{
for (; h > 0; h--)
if (*left++ >= *right++)
@@ -1264,9 +1263,7 @@ static int touches(h, left, right)
So, it will return 0 if they never cross.
*/
-static int crosses(h, left, right)
- register int h;
- register pel *left,*right;
+static int crosses(register int h, register pel *left, register pel *right)
{
for (; h > 0; h--)
if (*left++ > *right++)
@@ -1444,9 +1441,9 @@ void UnJumble(region)
/*
*/
-
-static OptimizeRegion(R)
- struct region *R; /* region to optimize */
+
+static void OptimizeRegion(
+ struct region *R) /* region to optimize */
{
register pel *xP; /* pel pointer for inner loop */
register int x; /* holds X value */
@@ -1519,10 +1516,10 @@ clipping box is specified in REGION coordinates, that is, in
coordinates relative to the region (0,0) point
*/
-struct region *BoxClip(R, xmin, ymin, xmax, ymax)
- register struct region *R; /* region to clip */
- register pel xmin,ymin; /* upper left hand corner of rectangle */
- register pel xmax,ymax; /* lower right hand corner */
+static struct region *BoxClip(
+ register struct region *R, /* region to clip */
+ register pel xmin, register pel ymin, /* upper left hand corner of rectangle */
+ register pel xmax, register pel ymax) /* lower right hand corner */
{
struct edgelist anchor; /* pretend edgelist to facilitate discards */
register struct edgelist *e,*laste;
@@ -1713,9 +1710,7 @@ void DumpEdges(edges)
*/
/*ARGSUSED*/
-static void edgecheck(edge, oldmin, oldmax)
- struct edgelist *edge;
- int oldmin,oldmax;
+static void edgecheck(struct edgelist *edge, int oldmin, int oldmax)
{
if (edge->type != EDGETYPE)
t1_abort("EDGE ERROR: non EDGETYPE in list");
diff --git a/Build/source/texk/ps2pkm/regions.h b/Build/source/texk/ps2pkm/regions.h
index f493f996b6e..5e907f1e18f 100644
--- a/Build/source/texk/ps2pkm/regions.h
+++ b/Build/source/texk/ps2pkm/regions.h
@@ -55,7 +55,6 @@ void t1_ChangeDirection(); /* called when we change direction in Y */
#define MoreWorkArea(R,x1,y1,x2,y2) t1_MoreWorkArea(R,x1,y1,x2,y2)
#define KillRegion(area) t1_KillRegion(area)
#define CopyRegion(area) t1_CopyRegion(area)
-#define BoxClip(R,xmin,ymin,xmax,ymax) t1_BoxClip(R,xmin,ymin,xmax,ymax)
#define SortSwath(a,p,f) t1_SortSwath(a,p,f)
#define SwathUnion(b,e) t1_SwathUnion(b,e)
#define RegionBounds(r) t1_RegionBounds(r)
@@ -66,7 +65,6 @@ void t1_ChangeDirection(); /* called when we change direction in Y */
void t1_MoreWorkArea(); /* get longer edge list for stepping */
struct region *t1_CopyRegion(); /* duplicate a region */
void t1_KillRegion(); /* destroy a region */
-struct region *t1_BoxClip(); /* clip a region to a rectangle */
struct edgelist *t1_SortSwath(); /* sort edges onto growing edge list */
struct edgelist *t1_SwathUnion(); /* 'union' two edges into a swath */
struct segment *t1_RegionBounds(); /* returns bounding box of a region */
diff --git a/Build/source/texk/ps2pkm/scanfont.c b/Build/source/texk/ps2pkm/scanfont.c
index 889cbb6215c..ced7feedbe1 100644
--- a/Build/source/texk/ps2pkm/scanfont.c
+++ b/Build/source/texk/ps2pkm/scanfont.c
@@ -45,7 +45,7 @@ extern void objFormatBoolean(psobj *, boolean);
extern void objFormatEncoding(psobj *, int, psobj *);
extern void objFormatArray(psobj *, int, psobj *);
extern void objFormatString(psobj *, int, char *);
-extern void objFormatName(psobj *, int, char *);
+extern void objFormatName(psobj *, int, const char *);
extern void objFormatFile(psobj *, FILE *);
extern int SearchDictName(psdict *, psobj *);
extern int T1Getc(struct F_FILE *f);
@@ -69,361 +69,360 @@ static psobj *inputP;
typedef struct /* Builtin Standard Encoding */
{
int index;
- char *name;
+ const char *name;
} EncodingTable;
static EncodingTable StdEnc[] = {
- 040 , "space",
- 041 , "exclam",
- 042 , "quotedbl",
- 043 , "numbersign",
- 044 , "dollar",
- 045 , "percent",
- 046 , "ampersand",
- 047 , "quoteright",
- 050 , "parenleft",
- 051 , "parenright",
- 052 , "asterisk",
- 053 , "plus",
- 054 , "comma",
- 055 , "hyphen",
- 056 , "period",
- 057 , "slash",
- 060 , "zero",
- 061 , "one",
- 062 , "two",
- 063 , "three",
- 064 , "four",
- 065 , "five",
- 066 , "six",
- 067 , "seven",
- 070 , "eight",
- 071 , "nine",
- 072 , "colon",
- 073 , "semicolon",
- 074 , "less",
- 075 , "equal",
- 076 , "greater",
- 077 , "question",
- 0100 , "at",
- 0101 , "A",
- 0102 , "B",
- 0103 , "C",
- 0104 , "D",
- 0105 , "E",
- 0106 , "F",
- 0107 , "G",
- 0110 , "H",
- 0111 , "I",
- 0112 , "J",
- 0113 , "K",
- 0114 , "L",
- 0115 , "M",
- 0116 , "N",
- 0117 , "O",
- 0120 , "P",
- 0121 , "Q",
- 0122 , "R",
- 0123 , "S",
- 0124 , "T",
- 0125 , "U",
- 0126 , "V",
- 0127 , "W",
- 0130 , "X",
- 0131 , "Y",
- 0132 , "Z",
- 0133 , "bracketleft",
- 0134 , "backslash",
- 0135 , "bracketright",
- 0136 , "asciicircum",
- 0137 , "underscore",
- 0140 , "quoteleft",
- 0141 , "a",
- 0142 , "b",
- 0143 , "c",
- 0144 , "d",
- 0145 , "e",
- 0146 , "f",
- 0147 , "g",
- 0150 , "h",
- 0151 , "i",
- 0152 , "j",
- 0153 , "k",
- 0154 , "l",
- 0155 , "m",
- 0156 , "n",
- 0157 , "o",
- 0160 , "p",
- 0161 , "q",
- 0162 , "r",
- 0163 , "s",
- 0164 , "t",
- 0165 , "u",
- 0166 , "v",
- 0167 , "w",
- 0170 , "x",
- 0171 , "y",
- 0172 , "z",
- 0173 , "braceleft",
- 0174 , "bar",
- 0175 , "braceright",
- 0176 , "asciitilde",
- 0241 , "exclamdown",
- 0242 , "cent",
- 0243 , "sterling",
- 0244 , "fraction",
- 0245 , "yen",
- 0246 , "florin",
- 0247 , "section",
- 0250 , "currency",
- 0251 , "quotesingle",
- 0252 , "quotedblleft",
- 0253 , "guillemotleft",
- 0254 , "guilsinglleft",
- 0255 , "guilsinglright",
- 0256 , "fi",
- 0257 , "fl",
- 0261 , "endash",
- 0262 , "dagger",
- 0263 , "daggerdbl",
- 0264 , "periodcentered",
- 0266 , "paragraph",
- 0267 , "bullet",
- 0270 , "quotesinglbase",
- 0271 , "quotedblbase",
- 0272 , "quotedblright",
- 0273 , "guillemotright",
- 0274 , "ellipsis",
- 0275 , "perthousand",
- 0277 , "questiondown",
- 0301 , "grave",
- 0302 , "acute",
- 0303 , "circumflex",
- 0304 , "tilde",
- 0305 , "macron",
- 0306 , "breve",
- 0307 , "dotaccent",
- 0310 , "dieresis",
- 0312 , "ring",
- 0313 , "cedilla",
- 0315 , "hungarumlaut",
- 0316 , "ogonek",
- 0317 , "caron",
- 0320 , "emdash",
- 0341 , "AE",
- 0343 , "ordfeminine",
- 0350 , "Lslash",
- 0351 , "Oslash",
- 0352 , "OE",
- 0353 , "ordmasculine",
- 0361 , "ae",
- 0365 , "dotlessi",
- 0370 , "lslash",
- 0371 , "oslash",
- 0372 , "oe",
- 0373 , "germandbls",
- 0, 0
+ { 040 , "space" },
+ { 041 , "exclam" },
+ { 042 , "quotedbl" },
+ { 043 , "numbersign" },
+ { 044 , "dollar" },
+ { 045 , "percent" },
+ { 046 , "ampersand" },
+ { 047 , "quoteright" },
+ { 050 , "parenleft" },
+ { 051 , "parenright" },
+ { 052 , "asterisk" },
+ { 053 , "plus" },
+ { 054 , "comma" },
+ { 055 , "hyphen" },
+ { 056 , "period" },
+ { 057 , "slash" },
+ { 060 , "zero" },
+ { 061 , "one" },
+ { 062 , "two" },
+ { 063 , "three" },
+ { 064 , "four" },
+ { 065 , "five" },
+ { 066 , "six" },
+ { 067 , "seven" },
+ { 070 , "eight" },
+ { 071 , "nine" },
+ { 072 , "colon" },
+ { 073 , "semicolon" },
+ { 074 , "less" },
+ { 075 , "equal" },
+ { 076 , "greater" },
+ { 077 , "question" },
+ { 0100 , "at" },
+ { 0101 , "A" },
+ { 0102 , "B" },
+ { 0103 , "C" },
+ { 0104 , "D" },
+ { 0105 , "E" },
+ { 0106 , "F" },
+ { 0107 , "G" },
+ { 0110 , "H" },
+ { 0111 , "I" },
+ { 0112 , "J" },
+ { 0113 , "K" },
+ { 0114 , "L" },
+ { 0115 , "M" },
+ { 0116 , "N" },
+ { 0117 , "O" },
+ { 0120 , "P" },
+ { 0121 , "Q" },
+ { 0122 , "R" },
+ { 0123 , "S" },
+ { 0124 , "T" },
+ { 0125 , "U" },
+ { 0126 , "V" },
+ { 0127 , "W" },
+ { 0130 , "X" },
+ { 0131 , "Y" },
+ { 0132 , "Z" },
+ { 0133 , "bracketleft" },
+ { 0134 , "backslash" },
+ { 0135 , "bracketright" },
+ { 0136 , "asciicircum" },
+ { 0137 , "underscore" },
+ { 0140 , "quoteleft" },
+ { 0141 , "a" },
+ { 0142 , "b" },
+ { 0143 , "c" },
+ { 0144 , "d" },
+ { 0145 , "e" },
+ { 0146 , "f" },
+ { 0147 , "g" },
+ { 0150 , "h" },
+ { 0151 , "i" },
+ { 0152 , "j" },
+ { 0153 , "k" },
+ { 0154 , "l" },
+ { 0155 , "m" },
+ { 0156 , "n" },
+ { 0157 , "o" },
+ { 0160 , "p" },
+ { 0161 , "q" },
+ { 0162 , "r" },
+ { 0163 , "s" },
+ { 0164 , "t" },
+ { 0165 , "u" },
+ { 0166 , "v" },
+ { 0167 , "w" },
+ { 0170 , "x" },
+ { 0171 , "y" },
+ { 0172 , "z" },
+ { 0173 , "braceleft" },
+ { 0174 , "bar" },
+ { 0175 , "braceright" },
+ { 0176 , "asciitilde" },
+ { 0241 , "exclamdown" },
+ { 0242 , "cent" },
+ { 0243 , "sterling" },
+ { 0244 , "fraction" },
+ { 0245 , "yen" },
+ { 0246 , "florin" },
+ { 0247 , "section" },
+ { 0250 , "currency" },
+ { 0251 , "quotesingle" },
+ { 0252 , "quotedblleft" },
+ { 0253 , "guillemotleft" },
+ { 0254 , "guilsinglleft" },
+ { 0255 , "guilsinglright" },
+ { 0256 , "fi" },
+ { 0257 , "fl" },
+ { 0261 , "endash" },
+ { 0262 , "dagger" },
+ { 0263 , "daggerdbl" },
+ { 0264 , "periodcentered" },
+ { 0266 , "paragraph" },
+ { 0267 , "bullet" },
+ { 0270 , "quotesinglbase" },
+ { 0271 , "quotedblbase" },
+ { 0272 , "quotedblright" },
+ { 0273 , "guillemotright" },
+ { 0274 , "ellipsis" },
+ { 0275 , "perthousand" },
+ { 0277 , "questiondown" },
+ { 0301 , "grave" },
+ { 0302 , "acute" },
+ { 0303 , "circumflex" },
+ { 0304 , "tilde" },
+ { 0305 , "macron" },
+ { 0306 , "breve" },
+ { 0307 , "dotaccent" },
+ { 0310 , "dieresis" },
+ { 0312 , "ring" },
+ { 0313 , "cedilla" },
+ { 0315 , "hungarumlaut" },
+ { 0316 , "ogonek" },
+ { 0317 , "caron" },
+ { 0320 , "emdash" },
+ { 0341 , "AE" },
+ { 0343 , "ordfeminine" },
+ { 0350 , "Lslash" },
+ { 0351 , "Oslash" },
+ { 0352 , "OE" },
+ { 0353 , "ordmasculine" },
+ { 0361 , "ae" },
+ { 0365 , "dotlessi" },
+ { 0370 , "lslash" },
+ { 0371 , "oslash" },
+ { 0372 , "oe" },
+ { 0373 , "germandbls" },
+ { 0, 0 }
};
static EncodingTable ISO8859Enc[] = {
- 32, "space",
- 33, "exclam",
- 34, "quotedbl",
- 35, "numbersign",
- 36, "dollar",
- 37, "percent",
- 38, "ampersand",
- 39, "quoteright",
- 40, "parenleft",
- 41, "parenright",
- 42, "asterisk",
- 43, "plus",
- 44, "comma",
- 45, "minus",
- 46, "period",
- 47, "slash",
- 48, "zero",
- 49, "one",
- 50, "two",
- 51, "three",
- 52, "four",
- 53, "five",
- 54, "six",
- 55, "seven",
- 56, "eight",
- 57, "nine",
- 58, "colon",
- 59, "semicolon",
- 60, "less",
- 61, "equal",
- 62, "greater",
- 63, "question",
- 64, "at",
- 65, "A",
- 66, "B",
- 67, "C",
- 68, "D",
- 69, "E",
- 70, "F",
- 71, "G",
- 72, "H",
- 73, "I",
- 74, "J",
- 75, "K",
- 76, "L",
- 77, "M",
- 78, "N",
- 79, "O",
- 80, "P",
- 81, "Q",
- 82, "R",
- 83, "S",
- 84, "T",
- 85, "U",
- 86, "V",
- 87, "W",
- 88, "X",
- 89, "Y",
- 90, "Z",
- 91, "bracketleft",
- 92, "backslash",
- 93, "bracketright",
- 94, "asciicircum",
- 95, "underscore",
- 96, "quoteleft",
- 97, "a",
- 98, "b",
- 99, "c",
- 100, "d",
- 101, "e",
- 102, "f",
- 103, "g",
- 104, "h",
- 105, "i",
- 106, "j",
- 107, "k",
- 108, "l",
- 109, "m",
- 110, "n",
- 111, "o",
- 112, "p",
- 113, "q",
- 114, "r",
- 115, "s",
- 116, "t",
- 117, "u",
- 118, "v",
- 119, "w",
- 120, "x",
- 121, "y",
- 122, "z",
- 123, "braceleft",
- 124, "bar",
- 125, "braceright",
- 126, "asciitilde",
- 161, "exclamdown",
- 162, "cent",
- 163, "sterling",
- 164, "currency",
- 165, "yen",
- 166, "brokenbar",
- 167, "section",
- 168, "dieresis",
- 169, "copyright",
- 170, "ordfeminine",
- 171, "guillemotleft",
- 172, "logicalnot",
- 173, "hyphen",
- 174, "registered",
- 175, "macron",
- 176, "degree",
- 177, "plusminus",
- 178, "twosuperior",
- 179, "threesuperior",
- 180, "acute",
- 181, "mu",
- 182, "paragraph",
- 183, "periodcentered",
- 184, "cedilla",
- 185, "onesuperior",
- 186, "ordmasculine",
- 187, "guillemotright",
- 188, "onequarter",
- 189, "onehalf",
- 190, "threequarters",
- 191, "questiondown",
- 192, "Agrave",
- 193, "Aacute",
- 194, "Acircumflex",
- 195, "Atilde",
- 196, "Adieresis",
- 197, "Aring",
- 198, "AE",
- 199, "Ccedilla",
- 200, "Egrave",
- 201, "Eacute",
- 202, "Ecircumflex",
- 203, "Edieresis",
- 204, "Igrave",
- 205, "Iacute",
- 206, "Icircumflex",
- 207, "Idieresis",
- 208, "Eth",
- 209, "Ntilde",
- 210, "Ograve",
- 211, "Oacute",
- 212, "Ocircumflex",
- 213, "Otilde",
- 214, "Odieresis",
- 215, "multiply",
- 216, "Oslash",
- 217, "Ugrave",
- 218, "Uacute",
- 219, "Ucircumflex",
- 220, "Udieresis",
- 221, "Yacute",
- 222, "Thorn",
- 223, "germandbls",
- 224, "agrave",
- 225, "aacute",
- 226, "acircumflex",
- 227, "atilde",
- 228, "adieresis",
- 229, "aring",
- 230, "ae",
- 231, "ccedilla",
- 232, "egrave",
- 233, "eacute",
- 234, "ecircumflex",
- 235, "edieresis",
- 236, "igrave",
- 237, "iacute",
- 238, "icircumflex",
- 239, "idieresis",
- 240, "eth",
- 241, "ntilde",
- 242, "ograve",
- 243, "oacute",
- 244, "ocircumflex",
- 245, "otilde",
- 246, "odieresis",
- 247, "divide",
- 248, "oslash",
- 249, "ugrave",
- 250, "uacute",
- 251, "ucircumflex",
- 252, "udieresis",
- 253, "yacute",
- 254, "thorn",
- 255, "ydieresis",
- 0, 0
+ { 32, "space" },
+ { 33, "exclam" },
+ { 34, "quotedbl" },
+ { 35, "numbersign" },
+ { 36, "dollar" },
+ { 37, "percent" },
+ { 38, "ampersand" },
+ { 39, "quoteright" },
+ { 40, "parenleft" },
+ { 41, "parenright" },
+ { 42, "asterisk" },
+ { 43, "plus" },
+ { 44, "comma" },
+ { 45, "minus" },
+ { 46, "period" },
+ { 47, "slash" },
+ { 48, "zero" },
+ { 49, "one" },
+ { 50, "two" },
+ { 51, "three" },
+ { 52, "four" },
+ { 53, "five" },
+ { 54, "six" },
+ { 55, "seven" },
+ { 56, "eight" },
+ { 57, "nine" },
+ { 58, "colon" },
+ { 59, "semicolon" },
+ { 60, "less" },
+ { 61, "equal" },
+ { 62, "greater" },
+ { 63, "question" },
+ { 64, "at" },
+ { 65, "A" },
+ { 66, "B" },
+ { 67, "C" },
+ { 68, "D" },
+ { 69, "E" },
+ { 70, "F" },
+ { 71, "G" },
+ { 72, "H" },
+ { 73, "I" },
+ { 74, "J" },
+ { 75, "K" },
+ { 76, "L" },
+ { 77, "M" },
+ { 78, "N" },
+ { 79, "O" },
+ { 80, "P" },
+ { 81, "Q" },
+ { 82, "R" },
+ { 83, "S" },
+ { 84, "T" },
+ { 85, "U" },
+ { 86, "V" },
+ { 87, "W" },
+ { 88, "X" },
+ { 89, "Y" },
+ { 90, "Z" },
+ { 91, "bracketleft" },
+ { 92, "backslash" },
+ { 93, "bracketright" },
+ { 94, "asciicircum" },
+ { 95, "underscore" },
+ { 96, "quoteleft" },
+ { 97, "a" },
+ { 98, "b" },
+ { 99, "c" },
+ { 100, "d" },
+ { 101, "e" },
+ { 102, "f" },
+ { 103, "g" },
+ { 104, "h" },
+ { 105, "i" },
+ { 106, "j" },
+ { 107, "k" },
+ { 108, "l" },
+ { 109, "m" },
+ { 110, "n" },
+ { 111, "o" },
+ { 112, "p" },
+ { 113, "q" },
+ { 114, "r" },
+ { 115, "s" },
+ { 116, "t" },
+ { 117, "u" },
+ { 118, "v" },
+ { 119, "w" },
+ { 120, "x" },
+ { 121, "y" },
+ { 122, "z" },
+ { 123, "braceleft" },
+ { 124, "bar" },
+ { 125, "braceright" },
+ { 126, "asciitilde" },
+ { 161, "exclamdown" },
+ { 162, "cent" },
+ { 163, "sterling" },
+ { 164, "currency" },
+ { 165, "yen" },
+ { 166, "brokenbar" },
+ { 167, "section" },
+ { 168, "dieresis" },
+ { 169, "copyright" },
+ { 170, "ordfeminine" },
+ { 171, "guillemotleft" },
+ { 172, "logicalnot" },
+ { 173, "hyphen" },
+ { 174, "registered" },
+ { 175, "macron" },
+ { 176, "degree" },
+ { 177, "plusminus" },
+ { 178, "twosuperior" },
+ { 179, "threesuperior" },
+ { 180, "acute" },
+ { 181, "mu" },
+ { 182, "paragraph" },
+ { 183, "periodcentered" },
+ { 184, "cedilla" },
+ { 185, "onesuperior" },
+ { 186, "ordmasculine" },
+ { 187, "guillemotright" },
+ { 188, "onequarter" },
+ { 189, "onehalf" },
+ { 190, "threequarters" },
+ { 191, "questiondown" },
+ { 192, "Agrave" },
+ { 193, "Aacute" },
+ { 194, "Acircumflex" },
+ { 195, "Atilde" },
+ { 196, "Adieresis" },
+ { 197, "Aring" },
+ { 198, "AE" },
+ { 199, "Ccedilla" },
+ { 200, "Egrave" },
+ { 201, "Eacute" },
+ { 202, "Ecircumflex" },
+ { 203, "Edieresis" },
+ { 204, "Igrave" },
+ { 205, "Iacute" },
+ { 206, "Icircumflex" },
+ { 207, "Idieresis" },
+ { 208, "Eth" },
+ { 209, "Ntilde" },
+ { 210, "Ograve" },
+ { 211, "Oacute" },
+ { 212, "Ocircumflex" },
+ { 213, "Otilde" },
+ { 214, "Odieresis" },
+ { 215, "multiply" },
+ { 216, "Oslash" },
+ { 217, "Ugrave" },
+ { 218, "Uacute" },
+ { 219, "Ucircumflex" },
+ { 220, "Udieresis" },
+ { 221, "Yacute" },
+ { 222, "Thorn" },
+ { 223, "germandbls" },
+ { 224, "agrave" },
+ { 225, "aacute" },
+ { 226, "acircumflex" },
+ { 227, "atilde" },
+ { 228, "adieresis" },
+ { 229, "aring" },
+ { 230, "ae" },
+ { 231, "ccedilla" },
+ { 232, "egrave" },
+ { 233, "eacute" },
+ { 234, "ecircumflex" },
+ { 235, "edieresis" },
+ { 236, "igrave" },
+ { 237, "iacute" },
+ { 238, "icircumflex" },
+ { 239, "idieresis" },
+ { 240, "eth" },
+ { 241, "ntilde" },
+ { 242, "ograve" },
+ { 243, "oacute" },
+ { 244, "ocircumflex" },
+ { 245, "otilde" },
+ { 246, "odieresis" },
+ { 247, "divide" },
+ { 248, "oslash" },
+ { 249, "ugrave" },
+ { 250, "uacute" },
+ { 251, "ucircumflex" },
+ { 252, "udieresis" },
+ { 253, "yacute" },
+ { 254, "thorn" },
+ { 255, "ydieresis" },
+ { 0, 0 }
};
static psobj *StdEncArrayP = NULL;
psobj *ISOLatin1EncArrayP = NULL;
-static psobj *MakeEncodingArrayP(encodingTable)
- EncodingTable *encodingTable;
+static psobj *MakeEncodingArrayP(EncodingTable *encodingTable)
{
int i;
psobj *encodingArrayP;
@@ -455,8 +454,7 @@ boolean Init_BuiltInEncoding()
/********************************************************************/
/***================================================================***/
-static int getNextValue(valueType)
- int valueType;
+static int getNextValue(int valueType)
{
scan_token(inputP);
if (tokenType != valueType) {
@@ -468,7 +466,7 @@ static int getNextValue(valueType)
/***================================================================***/
/* This routine will set the global rc if there is an error */
/***================================================================***/
-static int getInt()
+static int getInt(void)
{
scan_token(inputP);
if (tokenType != TOKEN_INTEGER) {
@@ -485,8 +483,7 @@ static int getInt()
* See Sec 10.3 of ``Adobe Type 1 Font Format'' v1.1,
* for parsing Encoding.
*/
-static int getEncoding(arrayP)
- psobj *arrayP;
+static int getEncoding(psobj *arrayP)
{
scan_token(inputP);
@@ -599,8 +596,7 @@ static int getEncoding(arrayP)
return (SCAN_ERROR);
}
/***================================================================***/
-static int getArray(arrayP)
- psobj *arrayP;
+static int getArray(psobj *arrayP)
{
int N; /* count the items in the array */
psobj *objP;
@@ -641,8 +637,7 @@ static int getArray(arrayP)
/* NOTREACHED*/
}
/***================================================================***/
-static int getName(nameP)
- char *nameP;
+static int getName(const char *nameP)
{
do {
scan_token(inputP);
@@ -656,8 +651,7 @@ static int getName(nameP)
return(SCAN_OK);
}
/***================================================================***/
-static int getNbytes(N)
- int N;
+static int getNbytes(int N)
{
int I;
@@ -677,8 +671,7 @@ static int getNbytes(N)
/* It means that the CharStrings does not have as many characters */
/* as the dictionary said it would and that is ok. */
/***================================================================***/
-static int getLiteralName(nameObjP)
- psobj *nameObjP;
+static int getLiteralName(psobj *nameObjP)
{
do {
scan_token(inputP);
@@ -706,8 +699,7 @@ static int getLiteralName(nameObjP)
*/
/***================================================================***/
-static int BuildSubrs(FontP)
- psfont *FontP;
+static int BuildSubrs(psfont *FontP)
{
int N; /* number of values in Subrs */
int I; /* index into Subrs */
@@ -781,8 +773,7 @@ static int BuildSubrs(FontP)
*/
/***================================================================***/
-static int BuildCharStrings(FontP)
- psfont *FontP;
+static int BuildCharStrings(psfont *FontP)
{
int N; /* number of values in CharStrings */
int i; /* loop thru Subrs */
@@ -841,8 +832,7 @@ static int BuildCharStrings(FontP)
* BuildFontInfo Dictionary
*/
/***================================================================***/
-static int BuildFontInfo(fontP)
- psfont *fontP;
+static int BuildFontInfo(psfont *fontP)
{
psdict *dictP;
@@ -893,8 +883,7 @@ static int BuildFontInfo(fontP)
* BuildPrivate Dictionary
*/
/***================================================================***/
-static int BuildPrivate(fontP)
- psfont *fontP;
+static int BuildPrivate(psfont *fontP)
{
psdict *Private;
@@ -952,8 +941,7 @@ static int BuildPrivate(fontP)
/* */
/* */
/**********************************************************************/
-static int GetType1Blues(fontP)
- psfont *fontP;
+static int GetType1Blues(psfont *fontP)
{
psdict *PrivateDictP; /* the Private dict relating to hints */
struct blues_struct *blues; /* ptr for the blues struct we will allocate */
@@ -1266,8 +1254,7 @@ unsigned char code;
*/
/***================================================================***/
-static int FindDictValue(dictP)
- psdict *dictP;
+static int FindDictValue(psdict *dictP)
{
psobj LitName;
int N;
@@ -1359,7 +1346,7 @@ int scan_font(FontP)
char filename[128];
char filetype[3];
FILE *fileP;
- char *nameP;
+ const char *nameP;
int namelen;
int V;
int i;
@@ -1388,7 +1375,7 @@ int scan_font(FontP)
filterFile.data.fileP = NULL;
inputP = &inputFile;
- if (fileP = fopen(filename,filetype)) {
+ if ((fileP = fopen(filename,filetype))) {
/* get the first byte of file */
V = getc(fileP);
/* if file starts with x'80' then skip next 5 bytes */
diff --git a/Build/source/texk/ps2pkm/spaces.c b/Build/source/texk/ps2pkm/spaces.c
index a14efb2eb38..bd3f63c375d 100644
--- a/Build/source/texk/ps2pkm/spaces.c
+++ b/Build/source/texk/ps2pkm/spaces.c
@@ -46,8 +46,8 @@ This module is responsible for handling the TYPE1IMAGER "XYspace" object.
#include "arith.h"
#include "trig.h"
-static void FindFfcn();
-static void FindIfcn();
+static void FindFfcn(DOUBLE, DOUBLE, fractpel (**)());
+static void FindIfcn(DOUBLE, DOUBLE, fractpel *, fractpel *, fractpel (**)());
/*
:h3.Entry Points Provided to the TYPE1IMAGER User
*/
@@ -167,9 +167,9 @@ static struct XYspace identity = { SPACETYPE, ISPERMANENT(ON) + ISIMMORTAL(ON)
NULL, NULL,
NULL, NULL, NULL, NULL,
INVALIDID + 1, 0,
- FRACTFLOAT, 0.0, 0.0, FRACTFLOAT,
- 1.0/FRACTFLOAT, 0.0, 0.0, 1.0/FRACTFLOAT,
- 0, 0, 0, 0 };
+ { { { FRACTFLOAT, 0.0 }, { 0.0, FRACTFLOAT } },
+ { { 1.0/FRACTFLOAT, 0.0 }, { 0.0, 1.0/FRACTFLOAT } } },
+ { { 0, 0 }, { 0, 0 } } };
struct XYspace *IDENTITY = &identity;
/*
@@ -198,8 +198,8 @@ transformation matrix in the context array. If it cannot find it,
it will allocate a new array entry and fill it out.
*/
-static int FindDeviceContext(device)
- pointer device; /* device token */
+static int FindDeviceContext(
+ void *device) /* device token */
{
DOUBLE M[2][2]; /* temporary matrix */
float Xres,Yres; /* device resolution */
@@ -309,9 +309,9 @@ So this subroutine, given an :f/M/and an object, finds the :f/D/ for that
object and modifies :f/M/ so it is :f/D sup <-1> times M times D/.
*/
-static void ConsiderContext(obj, M)
- register struct xobject *obj; /* object to be transformed */
- register DOUBLE M[2][2]; /* matrix (may be changed) */
+static void ConsiderContext(
+ register struct xobject *obj, /* object to be transformed */
+ register DOUBLE M[2][2]) /* matrix (may be changed) */
{
register int context; /* index in contexts array */
@@ -519,8 +519,8 @@ in an XYspace structure, and also fills the "helper"
functions that actually do the work.
*/
-static void FillOutFcns(S)
- register struct XYspace *S; /* functions will be set in this structure */
+static void FillOutFcns(
+ register struct XYspace *S) /* functions will be set in this structure */
{
S->convert = FXYConvert;
S->iconvert = IXYConvert;
@@ -543,9 +543,9 @@ This function tests for the special case of one of the coefficients
being zero:
*/
-static void FindFfcn(cx, cy, fcnP)
- register DOUBLE cx,cy; /* x and y coefficients */
- register fractpel (**fcnP)(); /* pointer to function to set */
+static void FindFfcn(
+ register DOUBLE cx, register DOUBLE cy, /* x and y coefficients */
+ register fractpel (**fcnP)()) /* pointer to function to set */
{
if (cx == 0.0)
*fcnP = FYonly;
@@ -566,10 +566,11 @@ we store a NULL indicating that this we should do the conversion in
floating point.
*/
-static void FindIfcn(cx, cy, icxP, icyP, fcnP)
- register DOUBLE cx,cy; /* x and y coefficients */
- register fractpel *icxP,*icyP; /* fixed point coefficients to set */
- register fractpel (**fcnP)(); /* pointer to function to set */
+static void FindIfcn(
+ register DOUBLE cx, DOUBLE cy, /* x and y coefficients */
+ register fractpel *icxP, /* fixed point ... */
+ register fractpel *icyP, /* ... coefficients to set */
+ register fractpel (**fcnP)()) /* pointer to function to set */
{
register fractpel imax; /* maximum of cx and cy */
@@ -968,7 +969,7 @@ void FormatFP(str, fpel)
{
char temp[8];
register char *s;
- register char *sign;
+ register const char *sign;
if (fpel < 0) {
sign = "-";
diff --git a/Build/source/texk/ps2pkm/t1funcs.c b/Build/source/texk/ps2pkm/t1funcs.c
index f33fcdab00f..f5c052cd104 100644
--- a/Build/source/texk/ps2pkm/t1funcs.c
+++ b/Build/source/texk/ps2pkm/t1funcs.c
@@ -78,7 +78,7 @@ int Type1OpenScalable(char **ev, struct _Font **ppFont, int flags,
ULONG fmask, double efactor,double slant);
static int Type1GetGlyphs(struct _Font *pFont, ULONG count,
unsigned char *chars, FontEncoding charEncoding,
- ULONG *glyphCount, struct _CharInfo **glyphs );
+ ULONG *glyphCount, struct _CharInfo **glyphs);
void Type1CloseFont(struct _Font *pFont);
extern int Type1GetInfoScalable(struct _FontPathElement *fpe,
struct _FontInfo *pInfo,
@@ -100,7 +100,7 @@ extern struct region *fontfcnB(struct XYspace *S, unsigned char *code,
extern int FontDefaultFormat(int *bit, int *byte,
int *glyphs, int *scan);
extern int CheckFSFormat(int format,int fmask,int *bit,int *byte,int *scan,int *glyph,int *image);
-extern void QueryFontLib(char *env,char *infoName,void *infoValue,int *rcodeP);
+extern void QueryFontLib(char *env,const char *infoName,void *infoValue,int *rcodeP);
extern void T1FillFontInfo(struct _Font *pFont,struct _FontScalable *Vals,char *Filename,char *Fontname);
extern void T1InitStdProps(void);
extern int FontFileRegisterRenderer(FontRendererRec *);
@@ -299,13 +299,13 @@ int Type1OpenScalable (ev, ppFont, flags, entry, fileName, vals, format,
does not mean the character is empty, simply that it has zero escapement. */
static int
-Type1GetGlyphs(pFont, count, chars, charEncoding, glyphCount, glyphs)
- FontPtr pFont;
- ULONG count;
- register unsigned char *chars;
- FontEncoding charEncoding;
- ULONG *glyphCount; /* RETURN */
- CharInfoPtr *glyphs; /* RETURN */
+Type1GetGlyphs(
+ FontPtr pFont,
+ ULONG count,
+ register unsigned char *chars,
+ FontEncoding charEncoding,
+ ULONG *glyphCount, /* RETURN */
+ CharInfoPtr *glyphs) /* RETURN */
{
unsigned int firstRow;
unsigned int numRows;
@@ -364,13 +364,13 @@ Type1GetGlyphs(pFont, count, chars, charEncoding, glyphCount, glyphs)
}
static int
-Type1GetMetrics(pFont, count, chars, charEncoding, glyphCount, glyphs)
- FontPtr pFont;
- ULONG count;
- register unsigned char *chars;
- FontEncoding charEncoding;
- ULONG *glyphCount; /* RETURN */
- xCharInfo **glyphs; /* RETURN */
+Type1GetMetrics(
+ FontPtr pFont,
+ ULONG count,
+ register unsigned char *chars,
+ FontEncoding charEncoding,
+ ULONG *glyphCount, /* RETURN */
+ xCharInfo **glyphs) /* RETURN */
{
static CharInfoRec nonExistantChar;
@@ -409,12 +409,12 @@ void Type1CloseFont(pFont)
-static void fill(dest, h, w, area, Byte, bit, wordsize)
- register char *dest; /* destination bitmap */
- int h,w; /* dimensions of 'dest', w padded */
- register struct region *area; /* region to write to 'dest' */
- int Byte,bit; /* flags; LSBFirst or MSBFirst */
- int wordsize; /* number of bits per word for LSB/MSB purposes */
+static void fill(
+ register char *dest, /* destination bitmap */
+ int h, int w, /* dimensions of 'dest', w padded */
+ register struct region *area, /* region to write to 'dest' */
+ int Byte, int bit, /* flags; LSBFirst or MSBFirst */
+ int wordsize) /* number of bits per word for LSB/MSB purposes */
{
register struct edgelist *edge; /* for looping through edges */
register char *p; /* current scan line in 'dest' */
@@ -525,7 +525,7 @@ static FontRendererRec renderers[] = {
(int (*)()) 0, Type1GetInfoScalable, 0 }
};
-Type1RegisterFontFileFunctions()
+void Type1RegisterFontFileFunctions(void)
{
int i;
diff --git a/Build/source/texk/ps2pkm/t1info.c b/Build/source/texk/ps2pkm/t1info.c
index 8b64d600f6b..48e8eec6e56 100644
--- a/Build/source/texk/ps2pkm/t1info.c
+++ b/Build/source/texk/ps2pkm/t1info.c
@@ -67,7 +67,7 @@
extern char *Xalloc(int size);
extern void Xfree(void *);
extern int FontComputeInfoAccelerators(FontInfoPtr);
-extern long MakeAtom(char *, unsigned int, Bool);
+extern long MakeAtom(const char *, unsigned int, Bool);
extern int Type1OpenScalable(FontPathElementPtr ev , FontPtr *ppFont ,
int flags,
FontEntryPtr entry,
@@ -76,7 +76,7 @@ extern int Type1OpenScalable(FontPathElementPtr ev , FontPtr *ppFont ,
unsigned long format,
unsigned long fmask,double efactor,double slant);
extern void Type1CloseFont(struct _Font *pFont);
-extern void QueryFontLib(char *env,char *infoName,void *infoValue,int *rcodeP);
+extern void QueryFontLib(char *env,const char *infoName,void *infoValue,int *rcodeP);
#define DECIPOINTSPERINCH 722.7
#define DEFAULTRES 75
@@ -89,31 +89,31 @@ enum scaleType {
};
typedef struct _fontProp {
- char *name;
+ const char *name;
LONG atom;
enum scaleType type;
} fontProp;
static fontProp fontNamePropTable[] = { /* Example: */
- "FOUNDRY", 0, atom, /* adobe */
- "FAMILY_NAME", 0, atom, /* times roman */
- "WEIGHT_NAME", 0, atom, /* bold */
- "SLANT", 0, atom, /* i */
- "SETWIDTH_NAME", 0, atom, /* normal */
- "ADD_STYLE_NAME", 0, atom, /* */
- "PIXEL_SIZE", 0, pixel_size, /* 18 */
- "POINT_SIZE", 0, point_size, /* 180 */
- "RESOLUTION_X", 0, resolution_x, /* 72 */
- "RESOLUTION_Y", 0, resolution_y, /* 72 */
- "SPACING", 0, atom, /* p */
- "AVERAGE_WIDTH", 0, average_width, /* 0 */
- "CHARSET_REGISTRY", 0, atom, /* ISO8859 */
- "CHARSET_ENCODING", 0, atom, /* 1 */
+ { "FOUNDRY", 0, atom }, /* adobe */
+ { "FAMILY_NAME", 0, atom }, /* times roman */
+ { "WEIGHT_NAME", 0, atom }, /* bold */
+ { "SLANT", 0, atom }, /* i */
+ { "SETWIDTH_NAME", 0, atom }, /* normal */
+ { "ADD_STYLE_NAME", 0, atom }, /* */
+ { "PIXEL_SIZE", 0, pixel_size }, /* 18 */
+ { "POINT_SIZE", 0, point_size }, /* 180 */
+ { "RESOLUTION_X", 0, resolution_x }, /* 72 */
+ { "RESOLUTION_Y", 0, resolution_y }, /* 72 */
+ { "SPACING", 0, atom }, /* p */
+ { "AVERAGE_WIDTH", 0, average_width }, /* 0 */
+ { "CHARSET_REGISTRY", 0, atom }, /* ISO8859 */
+ { "CHARSET_ENCODING", 0, atom } /* 1 */
};
static fontProp extraProps[] = {
- "FONT", 0, atom,
- "COPYRIGHT", 0, atom,
+ { "FONT", 0, atom },
+ { "COPYRIGHT", 0, atom }
};
/* this is a bit kludgy */
@@ -127,9 +127,9 @@ static fontProp extraProps[] = {
/*ARGSUSED*/
static void
-FillHeader(pInfo, Vals)
- FontInfoPtr pInfo;
- FontScalablePtr Vals;
+FillHeader(
+ FontInfoPtr pInfo,
+ FontScalablePtr Vals)
{
/* OpenScalable in T1FUNCS sets the following:
pInfo->firstCol,
@@ -150,10 +150,7 @@ FillHeader(pInfo, Vals)
}
static void
-adjust_min_max(minc, maxc, tmp)
- xCharInfo *minc,
- *maxc,
- *tmp;
+adjust_min_max(xCharInfo *minc, xCharInfo *maxc, xCharInfo *tmp)
{
#define MINMAX(field,ci) \
if (minc->field > (ci)->field) \
@@ -171,10 +168,10 @@ adjust_min_max(minc, maxc, tmp)
}
static void
-ComputeBounds(pInfo, pChars, Vals)
- FontInfoPtr pInfo;
- CharInfoPtr pChars;
- FontScalablePtr Vals;
+ComputeBounds(
+ FontInfoPtr pInfo,
+ CharInfoPtr pChars,
+ FontScalablePtr Vals)
{
int i;
xCharInfo minchar, maxchar;
@@ -234,10 +231,10 @@ ComputeBounds(pInfo, pChars, Vals)
}
static void
-ComputeProps(pInfo, Vals, Filename)
- FontInfoPtr pInfo;
- FontScalablePtr Vals;
- char *Filename;
+ComputeProps(
+ FontInfoPtr pInfo,
+ FontScalablePtr Vals,
+ char *Filename)
{
int infoint;
int infoBBox[4];
@@ -255,11 +252,11 @@ ComputeProps(pInfo, Vals, Filename)
}
static void
-ComputeStdProps(pInfo, Vals, Filename, Fontname)
- FontInfoPtr pInfo;
- FontScalablePtr Vals;
- char *Filename;
- char *Fontname;
+ComputeStdProps(
+ FontInfoPtr pInfo,
+ FontScalablePtr Vals,
+ char *Filename,
+ char *Fontname)
{
FontPropPtr pp;
int i,
@@ -268,7 +265,7 @@ ComputeStdProps(pInfo, Vals, Filename, Fontname)
char *is_str;
char *ptr1,
*ptr2;
- char *infostrP;
+ const char *infostrP;
int rc;
char scaledName[MAXFONTNAMELEN];
diff --git a/Build/source/texk/ps2pkm/t1io.c b/Build/source/texk/ps2pkm/t1io.c
index 0c5639fc269..322ceb478f6 100644
--- a/Build/source/texk/ps2pkm/t1io.c
+++ b/Build/source/texk/ps2pkm/t1io.c
@@ -62,7 +62,7 @@ STATIC unsigned char TheBuffer[F_BUFSIZ];
F_FILE *T1Open(), *T1Eexec();
int T1Close();
int T1Read(), T1Getc(), T1Ungetc();
-STATIC int T1Decrypt(), T1Fill();
+STATIC int T1Decrypt(unsigned char *, int), T1Fill(F_FILE *);
/* -------------------------------------------------------------- */
/*ARGSUSED*/
@@ -221,9 +221,7 @@ F_FILE *T1eexec(f) /* Initialization */
} /* end eexec */
/* -------------------------------------------------------------- */
-STATIC int T1Decrypt(p, len)
- unsigned char *p;
- int len;
+STATIC int T1Decrypt(unsigned char *p, int len)
{
int n;
int H, L;
@@ -268,8 +266,8 @@ STATIC int T1Decrypt(p, len)
} /* end Decrypt */
/* -------------------------------------------------------------- */
-STATIC int T1Fill(f) /* Refill stream buffer */
- F_FILE *f; /* Stream descriptor */
+STATIC int T1Fill( /* Refill stream buffer */
+ F_FILE *f) /* Stream descriptor */
{
int rc;
diff --git a/Build/source/texk/ps2pkm/t1stub.c b/Build/source/texk/ps2pkm/t1stub.c
index 6405b64c106..d530be6d598 100644
--- a/Build/source/texk/ps2pkm/t1stub.c
+++ b/Build/source/texk/ps2pkm/t1stub.c
@@ -30,7 +30,7 @@
#include "objects.h" /* get #define for t1_abort() */
-xiStub(void)
+static void xiStub(void)
{
printf("xiStub called\n");
t1_abort("xiStub called");
@@ -38,7 +38,7 @@ xiStub(void)
struct segment;
-void t1_DumpText(struct segment * foo)
+void t1_DumpText(struct segment *foo)
{
xiStub();
}
diff --git a/Build/source/texk/ps2pkm/token.c b/Build/source/texk/ps2pkm/token.c
index f5f9d6010dd..f27db8d29fa 100644
--- a/Build/source/texk/ps2pkm/token.c
+++ b/Build/source/texk/ps2pkm/token.c
@@ -100,8 +100,7 @@ static DOUBLE Exp10T[128] = {
1e56, 1e57, 1e58, 1e59, 1e60, 1e61, 1e62, 1e63
};
-static DOUBLE P10(exponent)
- LONG exponent;
+static DOUBLE P10(LONG exponent)
{
DOUBLE value, power;
@@ -200,15 +199,13 @@ isWHITE_SPACE(ch)\
#define DONE (256)
/* Get the next input character */
-static int next_char(ch)
- int ch;
+static int next_char(int ch)
{
return(next_ch());
}
/* Add character to token */
-static int add_char(ch)
- int ch;
+static int add_char(int ch)
{
save_ch(ch);
return(next_ch());
@@ -220,8 +217,7 @@ static int add_char(ch)
*/
/* Skip white space */
-static int skip_space(ch)
- int ch;
+static int skip_space(int ch)
{
do {
ch = next_ch();
@@ -230,8 +226,7 @@ static int skip_space(ch)
}
/* Skip comments */
-static int skip_comment(ch)
- int ch;
+static int skip_comment(int ch)
{
do {
ch = next_ch();
@@ -258,23 +253,20 @@ static LONG r_base;
static LONG r_value;
static LONG r_scale;
-static int add_sign(ch)
- int ch;
+static int add_sign(int ch)
{
m_sign = ch;
save_unsafe_ch(ch);
return(next_ch());
}
-static int add_1st_digits(ch)
- int ch;
+static int add_1st_digits(int ch)
{
m_sign = '+';
return(add_digits(ch));
}
-static int add_digits(ch)
- int ch;
+static int add_digits(int ch)
{
LONG value, p_value, scale;
int digit;
@@ -365,15 +357,13 @@ static int add_digits(ch)
return(ch);
}
-static int add_1st_decpt(ch)
- int ch;
+static int add_1st_decpt(int ch)
{
m_sign = '+';
return(add_decpt(ch));
}
-static int add_decpt(ch)
- int ch;
+static int add_decpt(int ch)
{
/* On entry, expect m_sign to be set to '+' or '-' */
m_value = 0;
@@ -382,8 +372,7 @@ static int add_decpt(ch)
return(next_ch());
}
-static int add_fraction(ch)
- int ch;
+static int add_fraction(int ch)
{
LONG value, scale;
int digit;
@@ -479,16 +468,14 @@ static int add_fraction(ch)
return(ch);
}
-static int add_e_sign(ch)
- int ch;
+static int add_e_sign(int ch)
{
e_sign = ch;
save_ch(ch);
return(next_ch());
}
-static int add_exponent(ch)
- int ch;
+static int add_exponent(int ch)
{
LONG value, p_value;
LONG scale = 0;
@@ -557,8 +544,7 @@ static int add_exponent(ch)
return(ch);
}
-static int add_radix(ch)
- int ch;
+static int add_radix(int ch)
{
if (2 <= m_value && m_value <= 36 && m_scale == 0) {
r_base = m_value;
@@ -571,8 +557,7 @@ static int add_radix(ch)
}
}
-static int add_r_digits(ch)
- int ch;
+static int add_r_digits(int ch)
{
ULONG value;
LONG radix, scale;
@@ -653,8 +638,7 @@ static int add_r_digits(ch)
*/
/* Done: Radix Number */
-static int RADIX_NUMBER(ch)
- int ch;
+static int RADIX_NUMBER(int ch)
{
back_ch_not_white(ch);
if (r_scale == 0) {
@@ -668,8 +652,7 @@ static int RADIX_NUMBER(ch)
}
/* Done: Integer */
-static int INTEGER(ch)
- int ch;
+static int INTEGER(int ch)
{
back_ch_not_white(ch);
if (m_scale == 0) {
@@ -684,8 +667,7 @@ static int INTEGER(ch)
}
/* Done: Real */
-static int REAL(ch)
- int ch;
+static int REAL(int ch)
{
DOUBLE temp;
@@ -721,8 +703,7 @@ static int REAL(ch)
*/
/* Done: Hex String */
-static int HEX_STRING(ch)
- int ch;
+static int HEX_STRING(int ch)
{
int value;
@@ -794,8 +775,7 @@ static int HEX_STRING(ch)
* "\\", "\(", and "\)", simply store the second
* character.
*/
-static void save_digraph(ch)
- int ch;
+static void save_digraph(int ch)
{
int value;
@@ -857,8 +837,7 @@ static void save_digraph(ch)
}
/* Done: String */
-static int STRING(ch)
- int ch;
+static int STRING(int ch)
{
int nest_level = 1;
@@ -920,8 +899,7 @@ static int STRING(ch)
* start out looking like something else).
*/
-static int AAH_NAME(ch)
- int ch;
+static int AAH_NAME(int ch)
{
do {
save_ch(ch);
@@ -934,8 +912,7 @@ static int AAH_NAME(ch)
}
/* Done: Name */
-static int NAME(ch)
- int ch;
+static int NAME(int ch)
{
save_unsafe_ch(ch);
ch = next_ch();
@@ -974,8 +951,7 @@ static int NAME(ch)
}
/* Done: Literal Name */
-static int LITERAL_NAME(ch)
- int ch;
+static int LITERAL_NAME(int ch)
{
if (isNAME(ch)) {
save_unsafe_ch(ch);
@@ -1012,8 +988,7 @@ static int LITERAL_NAME(ch)
}
/* Done: immediate Name */
-static int IMMED_NAME(ch)
- int ch;
+static int IMMED_NAME(int ch)
{
ch = next_ch();
if (isNAME(ch)) {
@@ -1051,8 +1026,7 @@ static int IMMED_NAME(ch)
}
/* Done: Name found while looking for something else */
-static int OOPS_NAME(ch)
- int ch;
+static int OOPS_NAME(int ch)
{
back_ch_not_white(ch);
tokenType = TOKEN_NAME;
@@ -1065,40 +1039,35 @@ static int OOPS_NAME(ch)
*/
/* Done: Unmatched Right Angle-Bracket */
-static int RIGHT_ANGLE(ch)
- int ch;
+static int RIGHT_ANGLE(int ch)
{
tokenType = TOKEN_RIGHT_ANGLE;
return(DONE);
}
/* Done: Unmatched Right Parenthesis */
-static int RIGHT_PAREN(ch)
- int ch;
+static int RIGHT_PAREN(int ch)
{
tokenType = TOKEN_RIGHT_PAREN;
return(DONE);
}
/* Done: Left Brace */
-static int LEFT_BRACE(ch)
- int ch;
+static int LEFT_BRACE(int ch)
{
tokenType = TOKEN_LEFT_BRACE;
return(DONE);
}
/* Done: Right Brace */
-static int RIGHT_BRACE(ch)
- int ch;
+static int RIGHT_BRACE(int ch)
{
tokenType = TOKEN_RIGHT_BRACE;
return(DONE);
}
/* Done: Left Bracket */
-static int LEFT_BRACKET(ch)
- int ch;
+static int LEFT_BRACKET(int ch)
{
save_unsafe_ch(ch);
tokenType = TOKEN_LEFT_BRACKET;
@@ -1106,8 +1075,7 @@ static int LEFT_BRACKET(ch)
}
/* Done: Right Bracket */
-static int RIGHT_BRACKET(ch)
- int ch;
+static int RIGHT_BRACKET(int ch)
{
save_unsafe_ch(ch);
tokenType = TOKEN_RIGHT_BRACKET;
@@ -1115,16 +1083,14 @@ static int RIGHT_BRACKET(ch)
}
/* Done: Break */
-static int BREAK_SIGNAL(ch)
- int ch;
+static int BREAK_SIGNAL(int ch)
{
tokenType = TOKEN_BREAK;
return(DONE);
}
/* Done: No Token Found */
-static int NO_TOKEN(ch)
- int ch;
+static int NO_TOKEN(int ch)
{
tokenType = TOKEN_EOF;
return(DONE);
diff --git a/Build/source/texk/ps2pkm/tokst.h b/Build/source/texk/ps2pkm/tokst.h
index 31a9fd04b02..53471c97af8 100644
--- a/Build/source/texk/ps2pkm/tokst.h
+++ b/Build/source/texk/ps2pkm/tokst.h
@@ -291,38 +291,38 @@ static unsigned char si11[258] = { 0x53,0x54,
* state. There are several entries for each state.
*
*/
-static int AAH_NAME();
-static int BREAK_SIGNAL();
-static int HEX_STRING();
-static int IMMED_NAME();
-static int INTEGER();
-static int LEFT_BRACE();
-static int LEFT_BRACKET();
-static int LITERAL_NAME();
-static int NAME();
-static int NO_TOKEN();
-static int OOPS_NAME();
-static int RADIX_NUMBER();
-static int REAL();
-static int RIGHT_ANGLE();
-static int RIGHT_BRACE();
-static int RIGHT_BRACKET();
-static int RIGHT_PAREN();
-static int STRING();
-static int add_1st_decpt();
-static int add_1st_digits();
-static int add_char();
-static int add_decpt();
-static int add_digits();
-static int add_e_sign();
-static int add_exponent();
-static int add_fraction();
-static int add_r_digits();
-static int add_radix();
-static int add_sign();
-static int next_char();
-static int skip_comment();
-static int skip_space();
+static int AAH_NAME(int);
+static int BREAK_SIGNAL(int);
+static int HEX_STRING(int);
+static int IMMED_NAME(int);
+static int INTEGER(int);
+static int LEFT_BRACE(int);
+static int LEFT_BRACKET(int);
+static int LITERAL_NAME(int);
+static int NAME(int);
+static int NO_TOKEN(int);
+static int OOPS_NAME(int);
+static int RADIX_NUMBER(int);
+static int REAL(int);
+static int RIGHT_ANGLE(int);
+static int RIGHT_BRACE(int);
+static int RIGHT_BRACKET(int);
+static int RIGHT_PAREN(int);
+static int STRING(int);
+static int add_1st_decpt(int);
+static int add_1st_digits(int);
+static int add_char(int);
+static int add_decpt(int);
+static int add_digits(int);
+static int add_e_sign(int);
+static int add_exponent(int);
+static int add_fraction(int);
+static int add_r_digits(int);
+static int add_radix(int);
+static int add_sign(int);
+static int next_char(int);
+static int skip_comment(int);
+static int skip_space(int);
static struct cat {
int (*actionRoutineP)();
diff --git a/Build/source/texk/ps2pkm/type1.c b/Build/source/texk/ps2pkm/type1.c
index abca66c6eba..cc8bc6daa8a 100644
--- a/Build/source/texk/ps2pkm/type1.c
+++ b/Build/source/texk/ps2pkm/type1.c
@@ -227,7 +227,7 @@ int numalignmentzones; /* total number of alignment zones */
/******************************************/
/* Fill in the alignment zone structures. */
/******************************************/
-static void ComputeAlignmentZones()
+static void ComputeAlignmentZones(void)
{
int i;
DOUBLE dummy, bluezonepixels, familyzonepixels;
@@ -305,14 +305,14 @@ int oldhorhalf, oldverthalf; /* Remember which half of the stem */
DOUBLE wsoffsetX, wsoffsetY; /* White space offset - for VSTEM3,HSTEM3 */
int wsset; /* Flag for whether we've set wsoffsetX,Y */
-static void InitStems() /* Initialize the STEM hint data structures */
+static void InitStems(void) /* Initialize the STEM hint data structures */
{
InDotSection = FALSE;
currstartstem = numstems = 0;
oldvert = oldhor = -1;
}
-static void FinitStems() /* Terminate the STEM hint data structures */
+static void FinitStems(void) /* Terminate the STEM hint data structures */
{
int i;
@@ -328,8 +328,7 @@ static void FinitStems() /* Terminate the STEM hint data structures */
/* Compute the dislocation that a stemhint should cause for points */
/* inside the stem. */
/*******************************************************************/
-static void ComputeStem(stemno)
-int stemno;
+static void ComputeStem(int stemno)
{
int verticalondevice, idealwidth;
DOUBLE stemstart, stemwidth;
@@ -598,9 +597,7 @@ int stemno;
/* hint value or the right/top hint value depending on where the */
/* point lies in the stem. */
/*********************************************************************/
-static struct segment *Applyhint(p, stemnumber, half)
-struct segment *p;
-int stemnumber, half;
+static struct segment *Applyhint(struct segment *p, int stemnumber, int half)
{
if (half == LEFT || half == BOTTOM)
return Join(p, stems[stemnumber].lbhint); /* left or bottom hint */
@@ -613,9 +610,7 @@ int stemnumber, half;
/* hint value or the right/top hint value depending on where the */
/* point lies in the stem. */
/*********************************************************************/
-static struct segment *Applyrevhint(p, stemnumber, half)
-struct segment *p;
-int stemnumber, half;
+static struct segment *Applyrevhint(struct segment *p, int stemnumber, int half)
{
if (half == LEFT || half == BOTTOM)
return Join(p, stems[stemnumber].lbrevhint); /* left or bottom hint */
@@ -631,8 +626,7 @@ int stemnumber, half;
/* The actual hintvalue is returned as a location. */
/* Hints are ignored inside a DotSection. */
/***********************************************************************/
-static struct segment *FindStems(x, y, dx, dy)
-DOUBLE x, y, dx, dy;
+static struct segment *FindStems(DOUBLE x, DOUBLE y, DOUBLE dx, DOUBLE dy)
{
int i;
int newvert, newhor;
@@ -725,19 +719,18 @@ static int CallTop;
static DOUBLE PSFakeStack[MAXPSFAKESTACK];
static int PSFakeTop;
-static void ClearStack()
+static void ClearStack(void)
{
Top = -1;
}
-static void Push(Num)
- DOUBLE Num;
+static void Push(DOUBLE Num)
{
if (++Top < MAXSTACK) Stack[Top] = Num;
else Error0("Push: Stack full\n");
}
-static void ClearCallStack()
+static void ClearCallStack(void)
{
CallTop = -1;
}
@@ -752,10 +745,7 @@ static void PushCall(psobj *CurrStrP, int CurrIndex, unsigned short CurrKey)
else Error0("PushCall: Stack full\n");
}
-static void PopCall(CurrStrPP, CurrIndexP, CurrKeyP)
- psobj **CurrStrPP;
- int *CurrIndexP;
- unsigned short *CurrKeyP;
+static void PopCall(psobj **CurrStrPP, int *CurrIndexP, unsigned short *CurrKeyP)
{
if (CallTop >= 0) {
*CurrStrPP = CallStack[CallTop].currstrP; /* restore CharString pointer */
@@ -765,21 +755,20 @@ static void PopCall(CurrStrPP, CurrIndexP, CurrKeyP)
else Error0("PopCall: Stack empty\n");
}
-static void ClearPSFakeStack()
+static void ClearPSFakeStack(void)
{
PSFakeTop = -1;
}
/* PSFakePush: Pushes a number onto the fake PostScript stack */
-static void PSFakePush(Num)
- DOUBLE Num;
+static void PSFakePush(DOUBLE Num)
{
if (++PSFakeTop < MAXPSFAKESTACK) PSFakeStack[PSFakeTop] = Num;
else Error0("PSFakePush: Stack full\n");
}
/* PSFakePop: Removes a number from the top of the fake PostScript stack */
-static DOUBLE PSFakePop ()
+static DOUBLE PSFakePop (void)
{
if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]);
else Error01("PSFakePop : Stack empty\n");
@@ -789,9 +778,7 @@ static DOUBLE PSFakePop ()
/***********************************************************************/
/* Center a stem on the pixel grid -- used by HStem3 and VStem3 */
/***********************************************************************/
-static struct segment *CenterStem(edge1, edge2)
- DOUBLE edge1;
- DOUBLE edge2;
+static struct segment *CenterStem(DOUBLE edge1, DOUBLE edge2)
{
int idealwidth, verticalondevice;
DOUBLE leftx, lefty, rightx, righty, center, width;
@@ -870,8 +857,7 @@ static unsigned char Decrypt(unsigned char cipher)
}
/* Get the next byte from the codestring being interpreted */
-static int DoRead(CodeP)
- int *CodeP;
+static int DoRead(int *CodeP)
{
if (strindex >= CharStringP->len) return(FALSE); /* end of string */
*CodeP = Decrypt((unsigned char) CharStringP->data.stringP[strindex++]);
@@ -881,7 +867,7 @@ static int DoRead(CodeP)
/* Strip blues->lenIV bytes from CharString and update encryption key */
/* (the lenIV entry in the Private dictionary specifies the number of */
/* random bytes at the beginning of each CharString; default is 4) */
-static void StartDecrypt()
+static void StartDecrypt(void)
{
int Code;
@@ -891,8 +877,7 @@ static void StartDecrypt()
Error0("StartDecrypt: Premature end of CharString\n");
}
-static void Decode(Code)
- int Code;
+static void Decode(int Code)
{
int Code1, Code2, Code3, Code4;
@@ -921,8 +906,7 @@ ended: Error0("Decode: Premature end of Type 1 CharString");
}
/* Interpret a command code */
-static void DoCommand(Code)
- int Code;
+static void DoCommand(int Code)
{
switch(Code) {
case HSTEM: /* |- y dy HSTEM |- */
@@ -1039,8 +1023,7 @@ static void DoCommand(Code)
}
}
-static void Escape(Code)
- int Code;
+static void Escape(int Code)
{
int i, Num;
struct segment *p;
@@ -1134,8 +1117,7 @@ static void Escape(Code)
/* Declares the vertical range of a horizontal stem zone */
/* between coordinates y and y + dy */
/* y is relative to the left sidebearing point */
-static void HStem(y, dy)
- DOUBLE y, dy;
+static void HStem(DOUBLE y, DOUBLE dy)
{
IfTrace2((FontDebug), "Hstem %f %f\n", y, dy);
if (ProcessHints) {
@@ -1155,8 +1137,7 @@ static void HStem(y, dy)
/* Declares the horizontal range of a vertical stem zone */
/* between coordinates x and x + dx */
/* x is relative to the left sidebearing point */
-static void VStem(x, dx)
- DOUBLE x, dx;
+static void VStem(DOUBLE x, DOUBLE dx)
{
IfTrace2((FontDebug), "Vstem %f %f\n", x, dx);
if (ProcessHints) {
@@ -1174,8 +1155,7 @@ static void VStem(x, dx)
/* |- dx dy RLINETO |- */
/* Behaves like RLINETO in PostScript */
-static void RLineTo(dx, dy)
- DOUBLE dx, dy;
+static void RLineTo(DOUBLE dx, DOUBLE dy)
{
struct segment *B;
@@ -1197,8 +1177,7 @@ static void RLineTo(dx, dy)
/* Relative RCURVETO, equivalent to dx1 dy1 */
/* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */
/* (dy1+dy2+dy3) RCURVETO in PostScript */
-static void RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
- DOUBLE dx1, dy1, dx2, dy2, dx3, dy3;
+static void RRCurveTo(DOUBLE dx1, DOUBLE dy1, DOUBLE dx2, DOUBLE dy2, DOUBLE dx3, DOUBLE dy3)
{
struct segment *B, *C, *D;
@@ -1230,7 +1209,7 @@ static void RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
/* - CLOSEPATH |- */
/* Closes a subpath WITHOUT repositioning the */
/* current point */
-static void DoClosePath()
+static void DoClosePath(void)
{
struct segment *CurrentPoint;
@@ -1243,8 +1222,7 @@ static void DoClosePath()
/* subr# CALLSUBR - */
/* Calls a CharString subroutine with index */
/* subr# from the Subrs array */
-static void CallSubr(subrno)
- int subrno;
+static void CallSubr(int subrno)
{
IfTrace1((FontDebug), "CallSubr %d\n", subrno);
if ((subrno < 0) || (subrno >= SubrsP->len))
@@ -1257,7 +1235,7 @@ static void CallSubr(subrno)
/* - RETURN - */
/* Returns from a Subrs array CharString */
/* subroutine called with CALLSUBR */
-static void Return()
+static void Return(void)
{
IfTrace0((FontDebug), "Return\n");
PopCall(&CharStringP, &strindex, &r);
@@ -1271,7 +1249,7 @@ static void Return()
/* HSBW or SBW. It then calls a special version of FILL */
/* or STROKE depending on the value of PaintType in the */
/* font dictionary */
-static void EndChar()
+static void EndChar(void)
{
IfTrace0((FontDebug), "EndChar\n");
@@ -1288,8 +1266,7 @@ static void EndChar()
/* |- dx dy RMOVETO |- */
/* Behaves like RMOVETO in PostScript */
-static void RMoveTo(dx,dy)
- DOUBLE dx,dy;
+static void RMoveTo(DOUBLE dx, DOUBLE dy)
{
struct segment *B;
@@ -1310,7 +1287,7 @@ static void RMoveTo(dx,dy)
/* - DOTSECTION |- */
/* Brackets an outline section for the dots in */
/* letters such as "i", "j", and "!". */
-static void DotSection()
+static void DotSection(void)
{
IfTrace0((FontDebug), "DotSection\n");
InDotSection = !InDotSection;
@@ -1385,8 +1362,7 @@ static void Seac(DOUBLE asb, DOUBLE adx, DOUBLE ady,
/* |- sbx sby wx wy SBW |- */
/* Set the left sidebearing point to (sbx,sby), */
/* set the character width vector to (wx,wy). */
-static void Sbw(sbx, sby, wx, wy)
- DOUBLE sbx, sby, wx, wy;
+static void Sbw(DOUBLE sbx, DOUBLE sby, DOUBLE wx, DOUBLE wy)
{
IfTrace4((FontDebug), "SBW %f %f %f %f\n", sbx, sby, wx, wy);
@@ -1403,8 +1379,7 @@ static void Sbw(sbx, sby, wx, wy)
/* num1 num2 DIV quotient */
/* Behaves like DIV in the PostScript language */
-static DOUBLE Div(num1, num2)
- DOUBLE num1, num2;
+static DOUBLE Div(DOUBLE num1, DOUBLE num2)
{
IfTrace2((FontDebug), "Div %f %f\n", num1, num2);
return(num1 / num2);
@@ -1490,13 +1465,10 @@ static DOUBLE Div(num1, num2)
/* Calling sequence: 'idmin epX epY 3 0 callothersubr' */
/* Computes Flex values, and renders the Flex path, */
/* and returns (leaves) ending coordinates on stack */
-static void FlxProc(c1x2, c1y2, c3x0, c3y0, c3x1, c3y1, c3x2, c3y2,
- c4x0, c4y0, c4x1, c4y1, c4x2, c4y2, epY, epX, idmin)
- DOUBLE c1x2, c1y2;
- DOUBLE c3x0, c3y0, c3x1, c3y1, c3x2, c3y2;
- DOUBLE c4x0, c4y0, c4x1, c4y1, c4x2, c4y2;
- DOUBLE epX, epY;
- int idmin;
+static void FlxProc(DOUBLE c1x2, DOUBLE c1y2,
+ DOUBLE c3x0, DOUBLE c3y0, DOUBLE c3x1, DOUBLE c3y1, DOUBLE c3x2, DOUBLE c3y2,
+ DOUBLE c4x0, DOUBLE c4y0, DOUBLE c4x1, DOUBLE c4y1, DOUBLE c4x2, DOUBLE c4y2,
+ DOUBLE epY, DOUBLE epX, int idmin)
{
DOUBLE dmin;
DOUBLE c1x0, c1y0, c1x1, c1y1;
@@ -1656,7 +1628,7 @@ static void FlxProc(c1x2, c1y2, c3x0, c3y0, c3x1, c3y1, c3x2, c3y2,
/* FlxProc1() = OtherSubrs[1]; Part of Flex */
/* Calling sequence: '0 1 callothersubr' */
/* Saves and clears path, then restores currentpoint */
-static void FlxProc1()
+static void FlxProc1(void)
{
struct segment *CurrentPoint;
@@ -1669,7 +1641,7 @@ static void FlxProc1()
/* FlxProc2() = OtherSubrs[2]; Part of Flex */
/* Calling sequence: '0 2 callothersubr' */
/* Returns currentpoint on stack */
-static void FlxProc2()
+static void FlxProc2(void)
{
struct segment *CurrentPoint;
DOUBLE CurrentX, CurrentY;
@@ -1686,7 +1658,7 @@ static void FlxProc2()
/* HintReplace() = OtherSubrs[3]; Hint Replacement */
/* Calling sequence: 'subr# 1 3 callothersubr pop callsubr' */
/* Reinitializes stem hint structure */
-static void HintReplace()
+static void HintReplace(void)
{
/* Effectively retire the current stems, but keep them around for */
/* revhint use in case we are in a stem when we replace hints. */
@@ -1698,8 +1670,7 @@ static void HintReplace()
/* arg1 ... argn n othersubr# CALLOTHERSUBR - */
/* Make calls on the PostScript interpreter (or call equivalent C code) */
/* NOTE: The n arguments have been pushed on the fake PostScript stack */
-static void CallOtherSubr(othersubrno)
- int othersubrno;
+static void CallOtherSubr(int othersubrno)
{
IfTrace1((FontDebug), "CallOtherSubr %d\n", othersubrno);
@@ -1733,8 +1704,7 @@ static void CallOtherSubr(othersubrno)
/* Sets the current point to (x,y) in absolute */
/* character space coordinates without per- */
/* forming a CharString MOVETO command */
-static void SetCurrentPoint(x, y)
- DOUBLE x, y;
+static void SetCurrentPoint(DOUBLE x, DOUBLE y)
{
IfTrace2((FontDebug), "SetCurrentPoint %f %f\n", x, y);
diff --git a/Build/source/texk/ps2pkm/util.c b/Build/source/texk/ps2pkm/util.c
index 81afafb9516..5c093b3cef1 100644
--- a/Build/source/texk/ps2pkm/util.c
+++ b/Build/source/texk/ps2pkm/util.c
@@ -182,7 +182,7 @@ void objFormatString(objP,length,valueP)
void objFormatName(objP,length,valueP)
psobj *objP;
int length;
- char *valueP;
+ const char *valueP;
{
if (objP != NULL) {
objP->type = OBJ_NAME;
diff --git a/Build/source/texk/ps2pkm/util.h b/Build/source/texk/ps2pkm/util.h
index fc523e7b473..342c726e50e 100644
--- a/Build/source/texk/ps2pkm/util.h
+++ b/Build/source/texk/ps2pkm/util.h
@@ -110,7 +110,7 @@ typedef union ps_value {
int boolean; /* when type is OBJ_BOOLEAN */
struct ps_obj *arrayP; /* when type is OBJ_ARRAY */
unsigned char *stringP; /* when type is OBJ_STRING */
- char *nameP; /* when type is OBJ_NAME */
+ const char *nameP; /* when type is OBJ_NAME */
FILE *fileP; /* when type is OBJ_FILE */
} psvalue;