summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-23 09:46:14 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-23 09:46:14 +0000
commit7b489d8d612c8bef3d6bb1536b62b6aa127e65f2 (patch)
treefcc5bb6e24c0c97ba8aedd3ea22ebd4c60adb5ed
parent60470f585d1b8c687e8453c0c74c1baa1ab9cd55 (diff)
texk/dvipsk/: enable compiler warnings
use ANSI C function declarations and prototypes git-svn-id: svn://tug.org/texlive/trunk@13914 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/dvipsk/ChangeLog31
-rw-r--r--Build/source/texk/dvipsk/Makefile.am6
-rw-r--r--Build/source/texk/dvipsk/Makefile.in7
-rw-r--r--Build/source/texk/dvipsk/afm2tfm.c220
-rw-r--r--Build/source/texk/dvipsk/bbox.c12
-rw-r--r--Build/source/texk/dvipsk/color.c15
-rw-r--r--Build/source/texk/dvipsk/config.h5
-rw-r--r--Build/source/texk/dvipsk/dopage.c2
-rw-r--r--Build/source/texk/dvipsk/dosection.c10
-rw-r--r--Build/source/texk/dvipsk/dospecial.c38
-rw-r--r--Build/source/texk/dvipsk/download.c16
-rw-r--r--Build/source/texk/dvipsk/dpicheck.c9
-rw-r--r--Build/source/texk/dvipsk/drawPS.c37
-rw-r--r--Build/source/texk/dvipsk/dviinput.c18
-rw-r--r--Build/source/texk/dvipsk/dvips.c38
-rw-r--r--Build/source/texk/dvipsk/dvips.h52
-rw-r--r--Build/source/texk/dvipsk/emspecial.c86
-rw-r--r--Build/source/texk/dvipsk/finclude.c28
-rw-r--r--Build/source/texk/dvipsk/flib.c8
-rw-r--r--Build/source/texk/dvipsk/fontdef.c10
-rw-r--r--Build/source/texk/dvipsk/header.c15
-rw-r--r--Build/source/texk/dvipsk/hps.c75
-rw-r--r--Build/source/texk/dvipsk/loadfont.c16
-rw-r--r--Build/source/texk/dvipsk/makefont.c6
-rw-r--r--Build/source/texk/dvipsk/output.c96
-rw-r--r--Build/source/texk/dvipsk/papersiz.c12
-rw-r--r--Build/source/texk/dvipsk/pprescan.c6
-rw-r--r--Build/source/texk/dvipsk/prescan.c4
-rw-r--r--Build/source/texk/dvipsk/protos.h564
-rw-r--r--Build/source/texk/dvipsk/repack.c21
-rw-r--r--Build/source/texk/dvipsk/resident.c47
-rw-r--r--Build/source/texk/dvipsk/scalewidth.c3
-rw-r--r--Build/source/texk/dvipsk/scanpage.c9
-rw-r--r--Build/source/texk/dvipsk/search.c24
-rw-r--r--Build/source/texk/dvipsk/skippage.c2
-rw-r--r--Build/source/texk/dvipsk/t1part.c187
-rw-r--r--Build/source/texk/dvipsk/tfmload.c12
-rw-r--r--Build/source/texk/dvipsk/unpack.c14
-rw-r--r--Build/source/texk/dvipsk/virtualfont.c14
-rw-r--r--Build/source/texk/dvipsk/writet1.c15
40 files changed, 968 insertions, 822 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index 0def02397a9..1e8686888fe 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,34 @@
+2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CFLAGS): enable compiler warnings.
+
+ * Use ANSI C function definitions and prototypes instead of
+ P[1-9][CH] macros, declare some functions as static.
+ * config.h, writet1.c: no need to #include <kpathsea/c-proto.h>.
+ * writet1.c: #include <stdarg.h>, not <kpathsea/c-vararg.h>.
+
+ * dpicheck.c: #include "protos.h".
+
+ * t1part.c (Reeverse, KillUnique): declare as static.
+
+ * writet1.c: #include "protos.h".
+ (append_cs_return): remove unused variable 'i'.
+ (t1_flush_cs): avoid uninitialized warning.
+ * protos.h: add prototypes for writet1(), t1_free(), and
+ t1_subset() from writet1.c.
+
+ * Avoid inconsistent arg1 in KPATHSEA version of pksearch (was
+ unused but different in prototype, declaration, and call).
+ * loadfont.c: remove arg1 of pksearch.
+ * protos.h: use prototype for pksearch as defined in search.c.
+ * search.c: #include "protos.h", remove prototype for newstring.
+ (pksearch): remove unused arg1.
+
+2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CPPFLAGS): remove -DNeedFunctionPrototypes.
+ * config.h, dvips.h: always use ANSI C function definitions.
+
2009-06-12 Francois Charette <firmicus@ankabut.net>
* afm2tfm.c: rename getline to texlive_getline.
diff --git a/Build/source/texk/dvipsk/Makefile.am b/Build/source/texk/dvipsk/Makefile.am
index 763ef2ee523..6eb79f98687 100644
--- a/Build/source/texk/dvipsk/Makefile.am
+++ b/Build/source/texk/dvipsk/Makefile.am
@@ -8,7 +8,8 @@ ACLOCAL_AMFLAGS = -I ../../m4
SUBDIRS = squeeze
INCLUDES = $(KPATHSEA_INCLUDES)
-AM_CPPFLAGS = -DUNIX -DKPATHSEA -DNeedFunctionPrototypes -DSHIFTLOWCHARS
+AM_CPPFLAGS = -DUNIX -DKPATHSEA -DSHIFTLOWCHARS
+AM_CFLAGS = $(WARNING_CFLAGS)
bin_PROGRAMS = afm2tfm dvips
@@ -169,7 +170,8 @@ EXTRA_DIST += \
cyrfonts.map \
eufonts.map \
flib.c \
- hps \
+ hps/CHANGES_HPS.txt \
+ hps/README_HPS.txt \
lafonts.map \
makefont.c \
mvs \
diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in
index dba8534b48e..7e229559098 100644
--- a/Build/source/texk/dvipsk/Makefile.in
+++ b/Build/source/texk/dvipsk/Makefile.in
@@ -316,7 +316,8 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
SUBDIRS = squeeze
INCLUDES = $(KPATHSEA_INCLUDES)
-AM_CPPFLAGS = -DUNIX -DKPATHSEA -DNeedFunctionPrototypes -DSHIFTLOWCHARS
+AM_CPPFLAGS = -DUNIX -DKPATHSEA -DSHIFTLOWCHARS
+AM_CFLAGS = $(WARNING_CFLAGS)
afm2tfm_SOURCES = afm2tfm.c
afm2tfm_DEPENDENCIES = $(KPATHSEA_DEPEND)
dvips_SOURCES = \
@@ -393,8 +394,8 @@ EXTRA_DIST = $(dist_prologues) texc.script dvips.test pfbincl.test \
contrib/PSTricks contrib/afm-extra contrib/colorsep.lpro \
contrib/configs contrib/crop.lpr contrib/latex209 \
contrib/volker contrib/whichinpath cyrfonts.map eufonts.map \
- flib.c hps lafonts.map makefont.c mvs pc psfonts.map reencode \
- tex vmcms vms
+ flib.c hps/CHANGES_HPS.txt hps/README_HPS.txt lafonts.map \
+ makefont.c mvs pc psfonts.map reencode tex vmcms vms
CLEANFILES = $(prologues) texc.lpro dvipstst.ps missfont.log mtest.ps \
pfbincl.ps
TESTS = dvips.test pfbincl.test
diff --git a/Build/source/texk/dvipsk/afm2tfm.c b/Build/source/texk/dvipsk/afm2tfm.c
index 6fbb069f4b0..de003838a02 100644
--- a/Build/source/texk/dvipsk/afm2tfm.c
+++ b/Build/source/texk/dvipsk/afm2tfm.c
@@ -235,8 +235,8 @@ char *efactorparam, *slantparam ;
double newslant ;
char titlebuf[500] ;
-void
-error P1C(register char *, s)
+static void
+error(register char *s)
{
(void)fprintf(stderr, "%s\n", s) ;
if (obuffer[0]) {
@@ -251,16 +251,16 @@ error P1C(register char *, s)
exit(1) ;
}
-int
-transform P2C(register int, x, register int, y)
+static int
+transform(register int x, register int y)
{
register double acc ;
acc = efactor * x + slant *y ;
return (int)(acc>=0? floor(acc+0.5) : ceil(acc-0.5) ) ;
}
-int
-texlive_getline P1H(void) {
+static int
+texlive_getline(void) {
register char *p ;
register int c ;
@@ -302,8 +302,8 @@ char *interesting[] = { "FontName", "ItalicAngle", "IsFixedPitch",
#define CC (6)
#define EncodingScheme (7)
#define NONE (-1)
-int
-interest P1C(char *, s)
+static int
+interest(char *s)
{
register char **p ;
register int n ;
@@ -314,8 +314,8 @@ interest P1C(char *, s)
return(NONE) ;
}
-char *
-mymalloc P1C(unsigned long, len)
+static char *
+mymalloc(unsigned long len)
{
register char *p ;
int i ;
@@ -332,16 +332,16 @@ mymalloc P1C(unsigned long, len)
return(p) ;
}
-char *
-newstring P1C(char *, s)
+static char *
+newstring(char *s)
{
char *q = mymalloc((unsigned long)(strlen(s) + 1)) ;
(void)strcpy(q, s) ;
return q ;
}
-char *
-paramnewstring P1H(void) {
+static char *
+paramnewstring(void) {
register char *p, *q ;
p = param ;
@@ -356,8 +356,8 @@ paramnewstring P1H(void) {
return(q) ;
}
-char *
-paramstring P1H(void) {
+static char *
+paramstring(void) {
register char *p, *q ;
p = param ;
@@ -372,8 +372,8 @@ paramstring P1H(void) {
return(q) ;
}
-int
-paramnum P1H(void) {
+static int
+paramnum(void) {
register char *p ;
int i ;
@@ -383,8 +383,8 @@ paramnum P1H(void) {
return(i) ;
}
-float
-paramfloat P1H(void) {
+static float
+paramfloat(void) {
register char *p ;
float i ;
@@ -394,8 +394,8 @@ paramfloat P1H(void) {
return(i) ;
}
-struct adobeinfo *
-newchar P1H(void) {
+static struct adobeinfo *
+newchar(void) {
register struct adobeinfo *ai ;
ai = (struct adobeinfo *)mymalloc((unsigned long)sizeof(struct adobeinfo)) ;
@@ -416,8 +416,8 @@ newchar P1H(void) {
return(ai) ;
}
-struct kern *
-newkern P1H(void) {
+static struct kern *
+newkern(void) {
register struct kern *nk ;
nk = (struct kern *)mymalloc((unsigned long)sizeof(struct kern)) ;
@@ -427,8 +427,8 @@ newkern P1H(void) {
return(nk) ;
}
-struct pcc *
-newpcc P1H(void) {
+static struct pcc *
+newpcc(void) {
register struct pcc *np ;
np = (struct pcc *)mymalloc((unsigned long)sizeof(struct pcc)) ;
@@ -439,8 +439,8 @@ newpcc P1H(void) {
return(np) ;
}
-struct lig *
-newlig P1H(void) {
+static struct lig *
+newlig(void) {
register struct lig *nl ;
nl = (struct lig *)mymalloc((unsigned long)sizeof(struct lig)) ;
@@ -452,8 +452,8 @@ newlig P1H(void) {
return(nl) ;
}
-void
-expect P1C(char *, s)
+static void
+expect(char *s)
{
if (strcmp(paramstring(), s) != 0) {
(void)fprintf(stderr, "%s expected: ", s) ;
@@ -461,8 +461,8 @@ expect P1C(char *, s)
}
}
-void
-handlechar P1H(void) { /* an input line beginning with C */
+static void
+handlechar(void) { /* an input line beginning with C */
register struct adobeinfo *ai ;
register struct lig *nl ;
@@ -510,8 +510,8 @@ handlechar P1H(void) { /* an input line beginning with C */
}
}
-struct adobeinfo *
-findadobe P1C(char *, p)
+static struct adobeinfo *
+findadobe(char *p)
{
register struct adobeinfo *ai ;
@@ -531,8 +531,8 @@ findadobe P1C(char *, p)
* boundarychar mechanisms are not oriented to kerns (they apply
* to both spaces and punctuation) so we don't want to use them.
*/
-void
-handlekern P1H(void) { /* an input line beginning with KPX */
+static void
+handlekern(void) { /* an input line beginning with KPX */
register struct adobeinfo *ai ;
register char *p ;
register struct kern *nk ;
@@ -550,8 +550,8 @@ handlekern P1H(void) { /* an input line beginning with KPX */
}
}
-void
-handleconstruct P1H(void) { /* an input line beginning with CC */
+static void
+handleconstruct(void) { /* an input line beginning with CC */
register struct adobeinfo *ai ;
register char *p ;
register struct pcc *np ;
@@ -580,10 +580,12 @@ handleconstruct P1H(void) { /* an input line beginning with CC */
}
}
-struct encoding *readencoding P1H(char *) ;
+static struct encoding *readencoding(char *) ;
-void
-makeaccentligs P1H(void) {
+#if 0
+/* Not used */
+static void
+makeaccentligs(void) {
register struct adobeinfo *ai, *aci ;
register char *p ;
register struct lig *nl ;
@@ -601,9 +603,10 @@ makeaccentligs P1H(void) {
}
}
}
+#endif
-void
-readadobe P1H(void) {
+static void
+readadobe(void) {
struct adobeinfo *ai ;
#ifdef VMCMS
int i;
@@ -674,8 +677,8 @@ default:
* Re-encode the adobe font. Assumes that the header file will
* also contain the appropriate instructions!
*/
-void
-handlereencoding P1H(void) {
+static void
+handlereencoding(void) {
if (inenname) {
int i ;
struct adobeinfo *ai ;
@@ -711,7 +714,8 @@ handlereencoding P1H(void) {
* characters, we would prefer to use the original ordering. It just
* makes more sense.
*/
-struct adobeinfo *revlist P1C(struct adobeinfo *, p)
+static struct adobeinfo *
+revlist (struct adobeinfo *p)
{
struct adobeinfo *q = 0, *t ;
@@ -724,8 +728,8 @@ struct adobeinfo *revlist P1C(struct adobeinfo *, p)
return q ;
}
-void
-assignchars P1H(void) {
+static void
+assignchars(void) {
register char **p ;
register int i, j ;
register struct adobeinfo *ai, *pai ;
@@ -807,8 +811,8 @@ finishup:
}
}
-void
-upmap P1H(void) { /* Compute uppercase mapping, when making a small caps font */
+static void
+upmap(void) { /* Compute uppercase mapping, when making a small caps font */
register struct adobeinfo *ai, *Ai ;
register char *p, *q ;
register struct pcc *np, *nq ;
@@ -872,15 +876,15 @@ upmap P1H(void) { /* Compute uppercase mapping, when making a small caps font */
int lf, lh, nw, nh, nd, ni, nl, nk, ne, np ;
-void
-write16 P1C(register short, what)
+static void
+write16(register short what)
{
(void)fputc(what >> 8, tfmout) ;
(void)fputc(what & 255, tfmout) ;
}
-void
-writearr P2C(register long *, p, register int, n)
+static void
+writearr(register long *p, register int n)
{
while (n) {
write16((short)(*p >> 16)) ;
@@ -890,8 +894,8 @@ writearr P2C(register long *, p, register int, n)
}
}
-void
-makebcpl P3C(register long *, p, register char *, s, register int, n)
+static void
+makebcpl(register long *p, register char *s, register int n)
{
register long t ;
register long sc ;
@@ -928,9 +932,9 @@ int unsort[257] ;
* Memory location what[oldn] is set to 0x7fffffffL for convenience.
*/
long nextd ; /* smallest value that will give a different mincover */
-int
-mincover P2C(long *, what,
- register long, d) /* tells how many clusters result, given max difference d */
+static int
+mincover(long *what,
+ register long d) /* tells how many clusters result, given max difference d */
{
register int m ;
register long l ;
@@ -948,8 +952,8 @@ mincover P2C(long *, what,
return (m) ;
}
-void
-remap P3C(long *, what, int, oldn, int, newn)
+static void
+remap(long * what, int oldn, int newn)
{
register int i, j ;
register long d, l ;
@@ -984,8 +988,8 @@ remap P3C(long *, what, int, oldn, int, newn)
}
}
-long
-checksum P1H(void) {
+static long
+checksum(void) {
int i ;
unsigned long s1 = 0, s2 = 0 ;
char *p ;
@@ -1011,8 +1015,8 @@ checksum P1H(void) {
* Input is in 1000ths of an em. Output is in FIXFACTORths of 1000.
*/
#define FIXFACTOR (0x100000L) /* 2^{20}, the unit fixnum */
-long
-scale P1C(long, what)
+static long
+scale(long what)
{
return(((what / 1000) << 20) +
(((what % 1000) << 20) + 500) / 1000) ;
@@ -1022,8 +1026,8 @@ long *header, *charinfo, *width, *height, *depth, *ligkern, *kern, *tparam,
*italic ;
long *tfmdata ;
-void
-buildtfm P1H(void) {
+static void
+buildtfm(void) {
register int i, j ;
register struct adobeinfo *ai ;
@@ -1136,8 +1140,8 @@ buildtfm P1H(void) {
np = 6 ;
}
-void
-writesarr P2C(long *, what, int, len)
+static void
+writesarr(long *what, int len)
{
register long *p ;
int i ;
@@ -1153,8 +1157,8 @@ writesarr P2C(long *, what, int, len)
writearr(what, len) ;
}
-void
-writetfm P1H(void) {
+static void
+writetfm(void) {
lf = 6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np ;
write16(lf) ;
write16(lh) ;
@@ -1188,8 +1192,8 @@ writetfm P1H(void) {
* (>50)
*/
char *accents[] = { "acute", "tilde", "caron", "dieresis", NULL} ;
-int
-texheight P1C(register struct adobeinfo *, ai)
+static int
+texheight(register struct adobeinfo *ai)
{
register char **p;
register struct adobeinfo *aci, *acci ;
@@ -1209,11 +1213,13 @@ texheight P1C(register struct adobeinfo *, ai)
#define vout(s) fprintf(vplout, s)
int level ; /* the depth of parenthesis nesting in VPL file being written */
-void vlevout() {
+static void
+vlevout() {
register int l = level ;
while (l--) vout(" ") ;
}
-void vlevnlout() {
+static void
+vlevnlout() {
vout("\n") ;
vlevout() ;
}
@@ -1221,15 +1227,15 @@ void vlevnlout() {
#define voutln2(f,s) {fprintf(vplout,f,s);vlevnlout();}
#define voutln3(f,a,b) {fprintf(vplout,f,a,b);vlevnlout();}
#define voutln4(f,a,b,c) {fprintf(vplout,f,a,b,c);vlevnlout();}
-void
-vleft P1H(void)
+static void
+vleft(void)
{
level++ ;
vout("(") ;
}
-void
-vright P1H(void)
+static void
+vright(void)
{
level-- ;
voutln(")") ;
@@ -1238,7 +1244,8 @@ vright P1H(void)
int forceoctal = 0 ;
char vcharbuf[6] ;
-char *vchar P1C(int, c)
+static char *
+vchar(int c)
{
if (forceoctal == 0 && ISALNUM (c))
(void) sprintf(vcharbuf,"C %c",
@@ -1252,8 +1259,8 @@ char *vchar P1C(int, c)
}
char vnamebuf[100];
-char *
-vname P1C(int, c)
+static char *
+vname(int c)
{
if (!forceoctal && ISALNUM (c)) {
vnamebuf[0] = 0;
@@ -1263,8 +1270,8 @@ vname P1C(int, c)
return vnamebuf;
}
-void
-writevpl P1H(void)
+static void
+writevpl(void)
{
register int i, j, k ;
register struct adobeinfo *ai ;
@@ -1489,7 +1496,8 @@ writevpl P1H(void)
}
#ifdef KPATHSEA
-void version P1C(FILE *, f)
+static void
+version(FILE *f)
{
extern KPSEDLL char *kpathsea_version_string;
fputs ("afm2tfm(k) (dvips(k) 5.98) 8.1\n", f);
@@ -1520,7 +1528,8 @@ Original author of afm2tfm: T. Rokicki.\n", f);
--version print version number and exit.\n\
"
-void usage P1C(FILE *, f)
+static void
+usage(FILE *f)
{
extern KPSEDLL char *kpse_bug_address;
@@ -1530,7 +1539,8 @@ void usage P1C(FILE *, f)
fputs (kpse_bug_address, f);
}
#else /* ! KPATHSEA */
-void usage P1C(FILE *, f)
+static void
+usage(FILE *f)
{
(void)fprintf(f,
"afm2tfm 8.1, Copyright 1990-97 by Radical Eye Software\n") ;
@@ -1545,8 +1555,8 @@ void usage P1C(FILE *, f)
#define CHECKARG3 if (argc < 4) { usage(stderr); exit(1); }
-void
-openfiles P2C(int, argc, char **, argv)
+static void
+openfiles(int argc, char **argv)
{
#ifndef KPATHSEA
register int lastext ;
@@ -1672,7 +1682,7 @@ default: (void)fprintf(stderr, "Unknown option %s %s will be ignored.\n",
if ((afmin=fopen(inname, "r"))==NULL)
error("! can't open afm input file") ;
#endif /* KPATHSEA */
- SET_BINARY(fileno(afmin)) ;
+ (void)SET_BINARY(fileno(afmin)) ;
if (argc>3 || (argc==3 && *argv[2]=='-')) {
error("! need at most two non-option arguments") ;
@@ -1733,7 +1743,8 @@ default: (void)fprintf(stderr, "Unknown option %s %s will be ignored.\n",
/*
* Some routines to remove kerns that match certain patterns.
*/
-struct kern *rmkernmatch P2C(struct kern *, k, char *, s)
+static struct kern *
+rmkernmatch(struct kern *k, char *s)
{
struct kern *nkern ;
@@ -1749,7 +1760,8 @@ struct kern *rmkernmatch P2C(struct kern *, k, char *, s)
/*
* Recursive to one level.
*/
-void rmkern P3C(char *, s1, char *, s2, struct adobeinfo *, ai)
+static void
+rmkern(char *s1, char *s2, struct adobeinfo *ai)
{
if (ai == 0) {
if (strcmp(s1, "*") == 0) {
@@ -1771,8 +1783,8 @@ void rmkern P3C(char *, s1, char *, s2, struct adobeinfo *, ai)
/* Make the kerning for character S1 equivalent to that for S2.
If either S1 or S2 do not exist, do nothing.
If S1 already has kerning, do nothing. */
-void
-addkern P2C(char *, s1, char *, s2)
+static void
+addkern(char *s1, char *s2)
{
struct adobeinfo *ai1 = findadobe (s1);
struct adobeinfo *ai2 = findadobe (s2);
@@ -1790,7 +1802,8 @@ int sawligkern ;
* Reads a ligkern line, if this is one. Assumes the first character
* passed is `%'.
*/
-void checkligkern P1C(char *, s)
+static void
+checkligkern(char *s)
{
char *oparam = param ;
char *mlist[5] ;
@@ -1886,7 +1899,8 @@ void checkligkern P1C(char *, s)
* names like 0, .notdef, _foo_. We do not allow //abc.
*/
char smbuffer[100] ; /* for tokens */
-char *gettoken() {
+static char *
+gettoken(void) {
char *p, *q ;
while (1) {
@@ -1928,7 +1942,8 @@ char *gettoken() {
}
}
}
-void getligkerndefaults() {
+static void
+getligkerndefaults(void) {
int i ;
for (i=0; staticligkern[i]; i++) {
@@ -1942,7 +1957,8 @@ void getligkerndefaults() {
* This routine reads in an encoding file, given the name. It returns
* the final total structure. It performs a number of consistency checks.
*/
-struct encoding *readencoding P1C(char *, enc)
+static struct encoding *
+readencoding(char *enc)
{
char *p ;
int i ;
@@ -1958,7 +1974,7 @@ struct encoding *readencoding P1C(char *, enc)
#else
afmin = fopen(enc, "r") ;
#endif
- SET_BINARY(fileno(afmin)) ;
+ (void)SET_BINARY(fileno(afmin)) ;
param = 0 ;
if (afmin == 0)
#ifdef KPATHSEA
@@ -2005,12 +2021,12 @@ struct encoding *readencoding P1C(char *, enc)
/*
* This routine prints out the line that needs to be added to psfonts.map.
*/
+static void
+conspsfonts(void) {
#ifndef VMCMS
-void conspsfonts() {
(void)printf("%s %s", outname,
fontname) ;
#else /* VM/CMS: fontname is ascii, so we use ebfontname */
-void conspsfonts() {
(void)printf("%s %s", outname,
ebfontname) ;
#endif
@@ -2031,7 +2047,7 @@ void conspsfonts() {
#ifndef VMS
int
#endif
-main P2C(int, argc, char **, argv)
+main(int argc, char **argv)
{
int i ;
diff --git a/Build/source/texk/dvipsk/bbox.c b/Build/source/texk/dvipsk/bbox.c
index 113b0007c9f..c34811e9af9 100644
--- a/Build/source/texk/dvipsk/bbox.c
+++ b/Build/source/texk/dvipsk/bbox.c
@@ -32,7 +32,8 @@ typedef struct bbtft {
static bbfontmaptype *bbffont ;
-void bbtfmload P1C(register fontdesctype *, curfnt)
+void
+bbtfmload(register fontdesctype *curfnt)
{
register integer i, j ;
register integer li, cd = 0 ;
@@ -177,7 +178,8 @@ extern struct dvistack {
integer h, v, w, x, y, z ;
} stack[] ;
static integer llx, lly, urx, ury ;
-void bbspecial P3C(integer, h, integer, v, int, nbytes)
+void
+bbspecial(integer h, integer v, int nbytes)
{
float *r = bbdospecial(nbytes) ;
if (r) {
@@ -193,7 +195,8 @@ void bbspecial P3C(integer, h, integer, v, int, nbytes)
ury = (integer) (v - r[1] / conv) ;
}
}
-void bbdopage()
+void
+bbdopage(void)
{
register shalfword cmd ;
register bbchardesctype *bcd ;
@@ -344,7 +347,8 @@ case 242: bbspecial(h, v, (int)signedquad()) ; break ;
}
}
}
-void findbb P1C(integer, bop)
+void
+findbb(integer bop)
{
integer curpos = ftell(dvifile) ;
real conv = 72.0 * (real)num / (real)den * (real)mag / 254000000.0 ;
diff --git a/Build/source/texk/dvipsk/color.c b/Build/source/texk/dvipsk/color.c
index 803e8a7511a..9d7f3198dce 100644
--- a/Build/source/texk/dvipsk/color.c
+++ b/Build/source/texk/dvipsk/color.c
@@ -48,7 +48,8 @@ static char *cstack, *csp, *cend, *bg ;
* is a word followed by arguments, we send out the arguments and
* then the word prefixed by "TeXcolor".
*/
-void colorcmdout P1C(char *, s)
+void
+colorcmdout(char *s)
{
char *p ;
char tempword[100] ;
@@ -77,7 +78,7 @@ void colorcmdout P1C(char *, s)
* For a new dvi file, call this. Frees all allocated memory.
*/
#define DEFAULTCOLOR "Black"
-void initcolor() {
+void initcolor(void) {
int i ;
struct colorpage *p, *q ;
@@ -101,7 +102,7 @@ void initcolor() {
* stack during popcolors.
*/
void
-background P1C(char *, bkgrnd)
+background(char *bkgrnd)
{
if (bkgrnd && *bkgrnd) {
if (strlen(bkgrnd) > MAXCOLORLEN)
@@ -115,7 +116,7 @@ background P1C(char *, bkgrnd)
* and sets the color in the PostScript.
*/
void
-pushcolor P2C(char *, p, Boolean, outtops)
+pushcolor(char *p, Boolean outtops)
{
while (strlen(p) + csp > cend) {
int newlen = 3 * (cend - cstack) ;
@@ -137,7 +138,7 @@ pushcolor P2C(char *, p, Boolean, outtops)
* in the PostScript to the previous color.
*/
void
-popcolor P1C(Boolean, outtops)
+popcolor(Boolean outtops)
{
char *p = csp - 1 ;
@@ -158,7 +159,7 @@ popcolor P1C(Boolean, outtops)
* (this is now the root or global color).
*/
void
-resetcolorstack P2C(char *, p, int, outtops)
+resetcolorstack(char * p, int outtops)
{
char *q = csp - 1 ;
@@ -193,7 +194,7 @@ resetcolorstack P2C(char *, p, int, outtops)
* this is safe.
*/
void
-bopcolor P1C(int, outtops)
+bopcolor(int outtops)
{
integer pageloc = ftell(dvifile) ;
int h = pageloc % COLORHASH ;
diff --git a/Build/source/texk/dvipsk/config.h b/Build/source/texk/dvipsk/config.h
index fe3f8fbac1e..73e239315c6 100644
--- a/Build/source/texk/dvipsk/config.h
+++ b/Build/source/texk/dvipsk/config.h
@@ -17,11 +17,6 @@
repeating the definitions everywhere we need them. */
#include <kpathsea/tex-file.h>
-#ifdef __STDC__
-#define NeedFunctionPrototypes 1
-#include <kpathsea/c-proto.h>
-#endif
-
#include <c-auto.h>
/* For kpathsea, we don't have paths, we have formats. This is so
diff --git a/Build/source/texk/dvipsk/dopage.c b/Build/source/texk/dvipsk/dopage.c
index 74b2cd74b34..e910c564b94 100644
--- a/Build/source/texk/dvipsk/dopage.c
+++ b/Build/source/texk/dvipsk/dopage.c
@@ -66,7 +66,7 @@ integer H_BREAK ; /* An empirical parameter for guessing line breaks; needs
dpi dependence */
#endif
void
-dopage P1H(void)
+dopage(void)
{
register shalfword cmd ;
register integer p ;
diff --git a/Build/source/texk/dvipsk/dosection.c b/Build/source/texk/dvipsk/dosection.c
index 82d2e2134bc..9ee1ece4bc7 100644
--- a/Build/source/texk/dvipsk/dosection.c
+++ b/Build/source/texk/dvipsk/dosection.c
@@ -35,7 +35,7 @@ extern Boolean HPS_FLAG ;
* Now we have the main procedure.
*/
void
-dosection P2C(sectiontype *, s, int, c)
+dosection(sectiontype *s, int c)
{
charusetype *cu ;
integer prevptr ;
@@ -204,7 +204,8 @@ struct p_list_str {
/**********************************************************************/
/* Return true iff i is one of the desired output pages */
-int InPageList P1C(integer, i)
+int
+InPageList(integer i)
{
register struct p_list_str *pl = ppages;
@@ -216,7 +217,8 @@ int InPageList P1C(integer, i)
return 0;
}
-void InstallPL P2C(integer, pslow, integer, pshigh)
+void
+InstallPL(integer pslow, integer pshigh)
{
register struct p_list_str *pl;
@@ -231,7 +233,7 @@ void InstallPL P2C(integer, pslow, integer, pshigh)
side effect, the page selection(s) is (are) prepended to ppages. */
int
-ParsePages P1C(register char *, s)
+ParsePages(register char *s)
{
register int c ; /* current character */
register integer n = 0, /* current numeric value */
diff --git a/Build/source/texk/dvipsk/dospecial.c b/Build/source/texk/dvipsk/dospecial.c
index 620d2ef14a9..d65dd40d71f 100644
--- a/Build/source/texk/dvipsk/dospecial.c
+++ b/Build/source/texk/dvipsk/dospecial.c
@@ -65,7 +65,8 @@ struct bangspecial {
char actualstuff[1] ; /* more space will actually be allocated */
} *bangspecials = NULL ;
-void specerror P1C(char *, s)
+void
+specerror(char *s)
{
if (specialerrors > 0
#ifdef KPATHSEA
@@ -85,7 +86,8 @@ void specerror P1C(char *, s)
}
}
-static void outputstring P1C(register char *, p)
+static void
+outputstring(register char *p)
{
(void)putc('\n', bitfile) ;
while(*p) {
@@ -95,7 +97,8 @@ static void outputstring P1C(register char *, p)
(void)putc('\n', bitfile) ;
}
-static void trytobreakout P1C(register char *, p)
+static void
+trytobreakout(register char *p)
{
register int i ;
register int instring = 0 ;
@@ -131,7 +134,8 @@ static void trytobreakout P1C(register char *, p)
(void)putc('\n', bitfile) ;
}
-static void dobs P1C(register struct bangspecial *, q)
+static void
+dobs(register struct bangspecial *q)
{
if (q) {
dobs(q->next) ;
@@ -140,7 +144,7 @@ static void dobs P1C(register struct bangspecial *, q)
}
void
-outbangspecials P1H(void) {
+outbangspecials(void) {
if (bangspecials) {
cmdout("TeXDict") ;
cmdout("begin") ;
@@ -211,7 +215,8 @@ KeyDesc KeyTab[] = {{"psfile", String}, /* j==0 in the routine below */
/*
* compare strings, ignore case
*/
-char Tolower P1C(register char, c)
+char
+Tolower(register char c)
{
if ('A' <= c && c <= 'Z')
return(c+32) ;
@@ -222,7 +227,8 @@ char Tolower P1C(register char, c)
#endif /* IBM: VM/CMS */
#endif
#endif /* !KPATHSEA */
-int IsSame P2C(char *, a, char *, b)
+int
+IsSame(char *a, char *b)
{
for( ; *a != '\0'; ) {
if( TOLOWER(*a) != TOLOWER(*b) )
@@ -237,7 +243,8 @@ char *KeyStr, *ValStr ; /* Key and String values found */
long ValInt ; /* Integer value found */
float ValNum ; /* Number or Dimension value found */
-char *GetKeyVal P2C(char *, str, int *, tno) /* returns NULL if none found, else next scan point */
+char *
+GetKeyVal(char *str, int *tno) /* returns NULL if none found, else next scan point */
/* str : starting point for scan */
/* tno : table entry number of keyword, or -1 if keyword not found */
{
@@ -318,7 +325,8 @@ found: *tno = i ;
* new string buffer if necessary.
*/
-void predospecial P2C(integer, numbytes, Boolean, scanning)
+void
+predospecial(integer numbytes, Boolean scanning)
{
register char *p = nextstring ;
register int i = 0 ;
@@ -530,7 +538,8 @@ default:
scanfontcomments(ValStr) ;
}
-int maccess P1C(char *, s)
+int
+maccess(char *s)
{
FILE *f = search(figpath, s, "r") ;
if (f)
@@ -541,7 +550,8 @@ int maccess P1C(char *, s)
char *tasks[] = { 0, "iff2ps", "tek2ps" } ;
static char psfile[511] ;
-void dospecial P1C(integer, numbytes)
+void
+dospecial(integer numbytes)
{
register char *p = nextstring ;
register int i = 0 ;
@@ -863,7 +873,8 @@ extern char *realnameoffile;
extern char realnameoffile[] ;
extern char *pictpath ;
#endif
-void fil2ps P2C(char *, task, char *, iname)
+void
+fil2ps(char *task, char *iname)
{
char cmd[400] ;
FILE *f ;
@@ -899,7 +910,8 @@ void fil2ps P2C(char *, task, char *, iname)
* that do not use rotations.
*/
static float rbbox[4] ;
-float *bbdospecial P1C(int, nbytes)
+float *
+bbdospecial(int nbytes)
{
char *p = nextstring ;
int i, j ;
diff --git a/Build/source/texk/dvipsk/download.c b/Build/source/texk/dvipsk/download.c
index dba78211f6c..dee7ea9aeed 100644
--- a/Build/source/texk/dvipsk/download.c
+++ b/Build/source/texk/dvipsk/download.c
@@ -39,7 +39,8 @@ extern real conv ;
* We have a routine that downloads an individual character.
*/
static int lastccout ;
-void downchar P2C(chardesctype *, c, shalfword, cc)
+static void
+downchar(chardesctype *c, shalfword cc)
{
register long i, j ;
register halfword cheight, cwidth ;
@@ -186,7 +187,7 @@ void downchar P2C(chardesctype *, c, shalfword, cc)
static char goodnames[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
void
-makepsname P2C(register char *, s, register int, n)
+makepsname(register char *s, register int n)
{
n-- ;
*s++ = 'F' + n / (sizeof(goodnames)-1) ;
@@ -194,7 +195,7 @@ makepsname P2C(register char *, s, register int, n)
*s++ = 0 ;
}
void
-lfontout P1C(int, n)
+lfontout(int n)
{
char buf[10];
char *b = buf ;
@@ -206,7 +207,8 @@ lfontout P1C(int, n)
/*
* And the download procedure.
*/
-void download P2C(charusetype *, p, int, psfont)
+void
+download(charusetype *p, int psfont)
{
register int b, i ;
register halfword bit ;
@@ -436,7 +438,8 @@ static void addGlyph(char *glyphName) {
extern char *downloadedpsnames[];
extern int unused_top_of_psnames;
-void downpsfont P2C(charusetype *, p, charusetype *, all)
+static void
+downpsfont(charusetype *p, charusetype *all)
{
#ifdef DOWNLOAD_USING_PDFTEX
static unsigned char grid[256];
@@ -545,7 +548,8 @@ void downpsfont P2C(charusetype *, p, charusetype *, all)
}
}
-void dopsfont P1C(sectiontype *, fs)
+void
+dopsfont(sectiontype *fs)
{
charusetype *cu ;
diff --git a/Build/source/texk/dvipsk/dpicheck.c b/Build/source/texk/dvipsk/dpicheck.c
index fb4ecd3012f..200d6410274 100644
--- a/Build/source/texk/dvipsk/dpicheck.c
+++ b/Build/source/texk/dvipsk/dpicheck.c
@@ -4,6 +4,7 @@
* magnifications.
*/
#include "dvips.h" /* The copyright notice in that file is included too! */
+#include "protos.h"
extern int actualdpi ;
static integer existsizes[30] = { 0 , 99999999 } ;
@@ -11,7 +12,8 @@ static int checkdpi ;
/*
* This routine adds some sizes to `existsizes'.
*/
-void addsiz P1C(int, rhsize)
+void
+addsiz(int rhsize)
{
register integer *p ;
long t, hsize ;
@@ -26,7 +28,8 @@ void addsiz P1C(int, rhsize)
hsize = t ;
} while (hsize) ;
}
-void adddpi P1C(int, hsize)
+void
+adddpi(int hsize)
{
long a, b, c ;
int i ;
@@ -54,7 +57,7 @@ void adddpi P1C(int, hsize)
* Finally, the routine that checks a size for match.
*/
halfword
-dpicheck P1C(halfword, dpi)
+dpicheck(halfword dpi)
{
integer i ;
integer margin = 1 + dpi / 500 ;
diff --git a/Build/source/texk/dvipsk/drawPS.c b/Build/source/texk/dvipsk/drawPS.c
index c9c4f396a92..be5fe8f85d5 100644
--- a/Build/source/texk/dvipsk/drawPS.c
+++ b/Build/source/texk/dvipsk/drawPS.c
@@ -150,12 +150,12 @@ static integer penSize = 2; /* pen size in PS units */
/* forward declarations */
/* static void doShading(); */
-static double zPixRound P2H(double, double); /* (x/y)PixRound(x,y) */
+static double zPixRound(double, double); /* (x/y)PixRound(x,y) */
static double shadetp = 0.5;
/* shading level, initialized as requested by tpic 2.0 -- MJ */
void
-setPenSize P1C(char *, cp)
+setPenSize(char *cp)
{
long ps;
@@ -171,7 +171,7 @@ setPenSize P1C(char *, cp)
} /* end setPenSize */
void
-addPath P1C(char *, cp)
+addPath(char *cp)
{
double x,y;
@@ -183,7 +183,7 @@ addPath P1C(char *, cp)
} /* end of addPath */
void
-arc P2C(char *, cp, int, invis)
+arc(char *cp, int invis)
{
double xc, yc, xrad, yrad;
double startAngle, endAngle;
@@ -278,7 +278,7 @@ arc P2C(char *, cp, int, invis)
* The number of inches/dash must be adjusted accordingly.
*/
void
-flushDashedPath P2C(int, dotted, double, inchesPerDash)
+flushDashedPath(int dotted, double inchesPerDash)
{
register int i;
int nipd = (integer) convPS((int) inchesPerDash);
@@ -345,7 +345,7 @@ flushDashedPath P2C(int, dotted, double, inchesPerDash)
}
void
-flushPath P1C(int, invis)
+flushPath(int invis)
{
register int i;
@@ -443,7 +443,7 @@ flushPath P1C(int, invis)
} /* end of flushPath */
void
-flushDashed P2C(char *, cp, int, dotted)
+flushDashed(char *cp, int dotted)
{
double inchesPerDash;
int savelen = pathLen;
@@ -469,7 +469,7 @@ flushDashed P2C(char *, cp, int, dotted)
} /* end of flushDashed */
void
-flushSpline P1C(char *, cp)
+flushSpline(char *cp)
{ /* as exact as psdit!!! */
register long i ;
register double dxi, dyi, dxi1, dyi1;
@@ -547,7 +547,7 @@ flushSpline P1C(char *, cp)
/* Count number of black bits in the pattern together with total number, */
/* compute the average and use this as the PostScript gray level */
void
-SetShade P1C(register char *, cp)
+SetShade(register char *cp)
{
int blackbits = 0, totalbits = 0;
@@ -602,7 +602,7 @@ SetShade P1C(register char *, cp)
} /* end of SetShade */
void
-shadeLast P1C(char *, cp)
+shadeLast(char *cp)
{
char tpout[20];
@@ -628,22 +628,23 @@ shadeLast P1C(char *, cp)
} /* end of shadeLast */
void
-whitenLast P1H(void)
+whitenLast(void)
{
shading = WHITE;
cmdout("1 setgray");
} /* end of whitenLast */
void
-blackenLast P1H(void)
+blackenLast(void)
{
shading = BLACK;
cmdout("0 setgray"); /* actually this aint needed */
} /* end of whitenLast */
-/*
+#if 0
+/* Not used */
static void
-doShading P1H(void)
+doShading(void)
{
if (shading)
{
@@ -654,7 +655,7 @@ doShading P1H(void)
else
cmdout(STROKE);
} !* end of doShading *!
-*/
+#endif
/*
* We need to calculate (x * convDPI * mag) / (tpicResolution * 1000)
@@ -662,9 +663,9 @@ doShading P1H(void)
* on the speed of the program.)
*/
static double
-zPixRound P2C(register double, x, /* in DVI units */
- register double, convDPI /* dots per inch */
- ) /* return rounded number of pixels */
+zPixRound(register double x, /* in DVI units */
+ register double convDPI /* dots per inch */
+ ) /* return rounded number of pixels */
{
return ((x * mag * (double)convDPI /
(1000.0 * tpicRESOLUTION))) ;
diff --git a/Build/source/texk/dvipsk/dviinput.c b/Build/source/texk/dvipsk/dviinput.c
index 92bd81af32c..bd828ef2c65 100644
--- a/Build/source/texk/dvipsk/dviinput.c
+++ b/Build/source/texk/dvipsk/dviinput.c
@@ -11,13 +11,13 @@ extern FILE *dvifile ;
extern quarterword *curpos, *curlim ;
void
-abortpage P1H(void)
+abortpage(void)
{
error("! unexpected eof on DVI file") ;
}
shalfword /* the value returned is, however, between 0 and 255 */
-dvibyte P1H(void)
+dvibyte(void)
{
register shalfword i ;
if (curpos) {
@@ -30,21 +30,21 @@ dvibyte P1H(void)
}
halfword
-twobytes P1H(void)
+twobytes(void)
{
register halfword i ;
i = dvibyte() ;
return(i*256+dvibyte()) ; }
integer
-threebytes P1H(void)
+threebytes(void)
{
register integer i ;
i = twobytes() ;
return(i*256+dvibyte()) ; }
shalfword
-signedbyte P1H(void)
+signedbyte(void)
{
register shalfword i ;
if (curpos) {
@@ -58,7 +58,7 @@ signedbyte P1H(void)
}
shalfword
-signedpair P1H(void)
+signedpair(void)
{
register shalfword i ;
i = signedbyte() ;
@@ -66,7 +66,7 @@ signedpair P1H(void)
}
integer
-signedtrio P1H(void)
+signedtrio(void)
{
register integer i ;
i = signedpair() ;
@@ -74,7 +74,7 @@ signedtrio P1H(void)
}
integer
-signedquad P1H(void)
+signedquad(void)
{
register integer i ;
i = signedpair() ;
@@ -82,7 +82,7 @@ signedquad P1H(void)
}
void
-skipover P1C(int, i)
+skipover(int i)
{
while (i-->0) (void)dvibyte() ;
}
diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c
index db50f21ffeb..ac89d566c53 100644
--- a/Build/source/texk/dvipsk/dvips.c
+++ b/Build/source/texk/dvipsk/dvips.c
@@ -302,7 +302,7 @@ static char *helparr[] = {
" l = comma-separated list of page ranges (e.g., 1-4,7-9)", 0} ;
void
-help P1C(int, status)
+help(int status)
{
char **p;
FILE *f = status == 0 ? stdout : stderr;
@@ -318,7 +318,7 @@ help P1C(int, status)
#endif
}
-void
+static void
freememforpsnames(void)
{
int i;
@@ -335,7 +335,7 @@ freememforpsnames(void)
static char *progname ;
void
-error_with_perror P2C(char *, s, char *, fname)
+error_with_perror(char *s, char *fname)
{
if (prettycolumn > 0)
fprintf(stderr,"\n");
@@ -362,13 +362,14 @@ error_with_perror P2C(char *, s, char *, fname)
* character is !, it aborts the job.
*/
void
-error P1C(char *, s)
+error(char *s)
{
error_with_perror (s, NULL);
}
#ifndef KPATHSEA
-char *concat P2C(char *, s1, char *, s2)
+char *
+concat(char *s1, char *s2)
{
char *s = malloc(strlen(s1)+strlen(s2)+1);
if (s == NULL) {
@@ -385,7 +386,7 @@ char *concat P2C(char *, s1, char *, s2)
the user hasn't turned it off. */
void
-check_checksum P3C(unsigned, c1, unsigned, c2, const char *, name)
+check_checksum(unsigned c1, unsigned c2, const char *name)
{
if (c1 && c2 && c1 != c2
#ifdef KPATHSEA
@@ -407,7 +408,8 @@ check_checksum P3C(unsigned, c1, unsigned, c2, const char *, name)
#ifdef DEBUG
static integer totalalloc = 0 ;
#endif
-char *mymalloc P1C(integer, n)
+char *
+mymalloc(integer n)
{
char *p ;
@@ -433,14 +435,14 @@ char *mymalloc P1C(integer, n)
return p ;
}
void
-morestrings P1H(void) {
+morestrings(void) {
strings = mymalloc((integer)STRINGSIZE) ;
nextstring = strings ;
maxstring = strings + STRINGSIZE - 200 ;
*nextstring++ = 0 ;
}
void
-checkstrings P1H(void) {
+checkstrings(void) {
if (nextstring - strings > STRINGSIZE / 2)
morestrings() ;
}
@@ -448,7 +450,7 @@ checkstrings P1H(void) {
* Initialize sets up all the globals and data structures.
*/
void
-initialize P1H(void)
+initialize(void)
{
int i;
char *s;
@@ -485,7 +487,7 @@ initialize P1H(void)
* This routine copies a string into the string `pool', safely.
*/
char *
-newstring P1C(char *, s)
+newstring(char *s)
{
int l ;
@@ -501,7 +503,8 @@ newstring P1C(char *, s)
nextstring += l + 1 ;
return(s) ;
}
-void newoutname P1H(void) {
+void
+newoutname(void) {
static int seq = 0 ;
static char *seqptr = 0 ;
char *p ;
@@ -532,7 +535,8 @@ void newoutname P1H(void) {
* This routine reverses a list, where a list is defined to be any
* structure whose first element is a pointer to another such structure.
*/
-VOID *revlist P1C(VOID *, p)
+VOID *
+revlist(VOID *p)
{
struct list {
struct list *next ;
@@ -548,7 +552,7 @@ VOID *revlist P1C(VOID *, p)
}
/* this asks for a new set of arguments from the command line */
void
-queryargs P1H(void)
+queryargs(void)
{
fputs("Options: ",stdout);
fgets(queryline,256,stdin);
@@ -567,10 +571,10 @@ queryargs P1H(void)
*/
extern void handlepapersize() ;
#ifdef VMS
-main P1H(void)
+main(void)
#else
int
-main P2C(int, argc, char **, argv)
+main(int argc, char **argv)
#endif
{
int i, lastext = -1 ;
@@ -681,7 +685,7 @@ Primary author of Dvips: T. Rokicki.");
* than one file name is given, and uses stdin if none is given.
*/
#ifdef VMS
- vmscli P1H(void);
+ vmscli(void);
papsizes = (struct papsiz *)revlist((void *)papsizes) ; /* Added by PWD 21-Mar-1997 */
#else
queryoptions = 0;
diff --git a/Build/source/texk/dvipsk/dvips.h b/Build/source/texk/dvipsk/dvips.h
index 17cad479c70..ce063433ff7 100644
--- a/Build/source/texk/dvipsk/dvips.h
+++ b/Build/source/texk/dvipsk/dvips.h
@@ -351,56 +351,4 @@ struct papsiz {
#define ISALNUM(c) isalnum(c)
#define ISXDIGIT(c) (isascii (c) && isxdigit(c))
- /* To Prototype or not to prototype ? */
-#ifdef NeedFunctionPrototypes
-
-#define AA(args) args /* For an arbitrary number; ARGS must be in parens. */
-
-#define P1H(p1) (p1)
-#define P2H(p1,p2) (p1, p2)
-#define P3H(p1,p2,p3) (p1, p2, p3)
-#define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
-#define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
-#define P6H(p1,p2,p3,p4,p5,p6) (p1, p2, p3, p4, p5, p6)
-
-#define P1C(t1,n1)(t1 n1)
-#define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
-#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
-#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
-#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
- (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
-#define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) \
- (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
-
-#else /* no function prototypes */
-
-#define AA(args) ()
-
-#define P1H(p1) ()
-#define P2H(p1, p2) ()
-#define P3H(p1, p2, p3) ()
-#define P4H(p1, p2, p3, p4) ()
-#define P5H(p1, p2, p3, p4, p5) ()
-#define P6H(p1, p2, p3, p4, p5, p6) ()
-
-#define P1C(t1,n1) (n1) t1 n1;
-#define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
-#define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
-#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
- t1 n1; t2 n2; t3 n3; t4 n4;
-#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1,n2,n3,n4,n5) \
- t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
-#define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) (n1,n2,n3,n4,n5,n6) \
- t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6;
-
-#endif /* function prototypes */
-
-#ifdef NeedFunctionPrototypes
-#define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
- (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8, t9 n9)
-#else
-#define P9C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7, t8,n8, t9,n9) \
- t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; t8 n8; t9 n9;
-#endif
-
#endif
diff --git a/Build/source/texk/dvipsk/emspecial.c b/Build/source/texk/dvipsk/emspecial.c
index 9f6861c07c4..c9a826db0dc 100644
--- a/Build/source/texk/dvipsk/emspecial.c
+++ b/Build/source/texk/dvipsk/emspecial.c
@@ -80,7 +80,7 @@ struct emunit emtable[] = {
/* clear the empoints array if necessary */
void
-emclear P1H(void)
+emclear(void)
{
int i;
if (emused && empoints)
@@ -90,7 +90,8 @@ emclear P1H(void)
}
/* put an empoint into the empoints array */
-struct empt *emptput P3C(shalfword, point, integer, x, integer, y)
+struct empt *
+emptput(shalfword point, integer x, integer y)
{
struct empt *p ;
int start ;
@@ -115,7 +116,8 @@ struct empt *emptput P3C(shalfword, point, integer, x, integer, y)
}
/* get an empoint from the empoints array */
-struct empt *emptget P1C(shalfword, point)
+struct empt *
+emptget(shalfword point)
{
struct empt *p ;
int start;
@@ -136,7 +138,8 @@ struct empt *emptget P1C(shalfword, point)
/* convert width into dpi units */
-float emunits P2C(float, width, char *, unit)
+float
+emunits(float width, char *unit)
{
struct emunit *p;
for (p=emtable; p->unit; p++) {
@@ -149,7 +152,8 @@ struct emunit *p;
/* The main routine for \special{em:graph ...} called from dospecial.c */
/* the line cut parameter is not supported (and is ignored) */
-void emspecial P1C(char *, p)
+void
+emspecial(char *p)
{
float emwidth, emheight;
shalfword empoint1, empoint2;
@@ -358,7 +362,8 @@ void emgraph();
/* 8 Oct 92 */
/* Routines to read binary numbers from IBM PC file types */
-integer readinteger P1C(FILE *, f)
+integer
+readinteger(FILE *f)
{
integer i;
int r;
@@ -371,7 +376,8 @@ integer readinteger P1C(FILE *, f)
return(i);
}
-halfword readhalfword P1C(FILE *, f)
+halfword
+readhalfword(FILE *f)
{
halfword i;
int r;
@@ -417,7 +423,8 @@ typedef struct
quarterword fill[58];
} PCXHEAD;
-int PCXreadhead P2C(FILE *, pcxf, PCXHEAD *, pcxh)
+static int
+PCXreadhead(FILE *pcxf, PCXHEAD *pcxh)
{
pcxh->man = readquarterword(pcxf);
pcxh->ver = readquarterword(pcxf);
@@ -445,9 +452,10 @@ int PCXreadhead P2C(FILE *, pcxf, PCXHEAD *, pcxh)
return(1); /* success */
}
-int PCXreadline P3C(FILE *, pcxf,
- unsigned char *, pcxbuf,
- unsigned int, byteperline)
+int
+PCXreadline(FILE *pcxf,
+ unsigned char *pcxbuf,
+ unsigned int byteperline)
{
int n;
int c;
@@ -470,10 +478,11 @@ int PCXreadline P3C(FILE *, pcxf,
return(n);
}
-void PCXgetpalette P5C( FILE *, pcxf, PCXHEAD *, pcxh,
- unsigned char *, r,
- unsigned char *, g,
- unsigned char *, b)
+static void
+PCXgetpalette(FILE *pcxf, PCXHEAD *pcxh,
+ unsigned char *r,
+ unsigned char *g,
+ unsigned char *b)
{
int i;
@@ -561,9 +570,10 @@ void PCXgetpalette P5C( FILE *, pcxf, PCXHEAD *, pcxh,
}
}
-void PCXshowpicture P9C(FILE *, pcxf, int, wide, int, high, int, bytes,
- int, cp, int, bp, unsigned char *, r,
- unsigned char *, g, unsigned char *, b)
+void
+PCXshowpicture(FILE *pcxf, int wide, int high, int bytes,
+ int cp, int bp, unsigned char *r,
+ unsigned char *g, unsigned char *b)
{
int x;
int y;
@@ -656,8 +666,9 @@ void PCXshowpicture P9C(FILE *, pcxf, int, wide, int, high, int, bytes,
free(rowa[0]);
}
-void imagehead P5C(char *, filename, int, wide, int, high,
- float, emwidth, float, emheight)
+void
+imagehead(char *filename, int wide, int high,
+ float emwidth, float emheight)
{
char *fullname = NULL, *name ;
if (!quiet) {
@@ -703,7 +714,8 @@ void imagehead P5C(char *, filename, int, wide, int, high,
#endif
}
-void imagetail P1H(void)
+void
+imagetail(void)
{
if (!disablecomments) {
(void)fprintf(bitfile, "\n%%%%EndDocument\n") ;
@@ -716,8 +728,9 @@ void imagetail P1H(void)
}
}
-void pcxgraph P4C(FILE *, pcxf, char *, filename,
- float, emwidth, float, emheight /* dimension in pixels */ )
+void
+pcxgraph(FILE *pcxf, char *filename,
+ float emwidth, float emheight /* dimension in pixels */ )
{
PCXHEAD pcxh;
unsigned char red[256];
@@ -765,7 +778,8 @@ struct wpnt_1 {
#define WPAINT_1 1
#define WPAINT_2 2
-void MSP_2_ps P3C(FILE *, f, int, wide, int, high)
+void
+MSP_2_ps(FILE *f, int wide, int high)
{
char *line;
char *l;
@@ -846,7 +860,8 @@ void MSP_2_ps P3C(FILE *, f, int, wide, int, high)
free(line);
}
-void MSP_1_ps P3C(FILE *, f, int, wide, int, high)
+void
+MSP_1_ps(FILE *f, int wide, int high)
{
char *line;
int i;
@@ -888,7 +903,8 @@ void MSP_1_ps P3C(FILE *, f, int, wide, int, high)
}
-void mspgraph P4C(FILE *, f, char *, filename, float, emwidth, float, emheight)
+void
+mspgraph(FILE *f, char *filename, float emwidth, float emheight)
{
struct wpnt_1 head;
int paint_type = 0;
@@ -973,7 +989,8 @@ struct bitmapfileheader {
integer offbits;
};
-void rgbread P4C(FILE *, f, int, w, int, b, char *, s)
+void
+rgbread(FILE *f, int w, int b, char *s)
{
int i;
@@ -1001,7 +1018,8 @@ unsigned rle_dx = 0; /* delta command horizontal offset */
unsigned rle_dy = 0; /* delta command vertical offset */
/* checked against output from Borland Resource Workshop */
-void rle4read P4C(FILE *, f, int, w, int, b, char *, s)
+void
+rle4read(FILE *f, int w, int b, char *s)
{
int i;
int limit;
@@ -1077,7 +1095,8 @@ void rle4read P4C(FILE *, f, int, w, int, b, char *, s)
}
/* untested */
-void rle8read P4C(FILE *, f, int, w, int, b, char *, s)
+void
+rle8read(FILE *f, int w, int b, char *s)
{
int i;
int limit;
@@ -1132,7 +1151,8 @@ void rle8read P4C(FILE *, f, int, w, int, b, char *, s)
}
}
-void bmpgraph P4C(FILE *, f, char *, filename, float, emwidth, float, emheight)
+void
+bmpgraph(FILE *f, char *filename, float emwidth, float emheight)
{
struct bitmapfileheader bmfh;
struct bitmapinfoheader bmih;
@@ -1364,7 +1384,8 @@ void bmpgraph P4C(FILE *, f, char *, filename, float, emwidth, float, emheight)
char *extarr[]=
{ ".pcx", ".msp", ".bmp", NULL };
-void emgraph P3C(char *, filename, float, emwidth, float, emheight)
+void
+emgraph(char *filename, float emwidth, float emheight)
{
char fname[80];
int filetype;
@@ -1441,7 +1462,8 @@ void emgraph P3C(char *, filename, float, emwidth, float, emheight)
}
#else
-void emspecial P1C(char *, p)
+void
+emspecial(char *p)
{
sprintf(errbuf,"emTeX specials not compiled in this version");
specerror(errbuf);
diff --git a/Build/source/texk/dvipsk/finclude.c b/Build/source/texk/dvipsk/finclude.c
index 2396c3cbe88..e9cc9b45caa 100644
--- a/Build/source/texk/dvipsk/finclude.c
+++ b/Build/source/texk/dvipsk/finclude.c
@@ -66,8 +66,8 @@ extern int unused_top_of_psnames;
* encountered by fontdef() (if that ever happens).
*/
fontdesctype *
-ifontdef P5C(char *, name, char *, area,
- int, scsize, int, dssize, char *, scname)
+ifontdef(char *name, char *area,
+ int scsize, int dssize, char *scname)
{
fontdesctype *fp;
@@ -82,7 +82,7 @@ ifontdef P5C(char *, name, char *, area,
* links it into the fonthd[] array.
*/
void
-setfamily P1C(fontdesctype *, f)
+setfamily(fontdesctype *f)
{
int i ;
@@ -106,7 +106,7 @@ setfamily P1C(fontdesctype *, f)
* string is the return value.
*/
char*
-getname P1C(char *, s)
+getname(char *s)
{
char *a, *p, sav;
@@ -132,7 +132,7 @@ getname P1C(char *, s)
* usages.
*/
void
-includechars P2C(fontdesctype *, f, char *, s)
+includechars(fontdesctype *f, char *s)
{
int b, c, d ;
int l = strlen(s) ;
@@ -175,7 +175,7 @@ includechars P2C(fontdesctype *, f, char *, s)
* to change.
*/
void
-scan1fontcomment P1C(char *, p)
+scan1fontcomment(char *p)
{
char *q, *name, *area;
char *scname; /* location in buffer where we got scsize */
@@ -227,7 +227,7 @@ scan1fontcomment P1C(char *, p)
* if there are two arguments we take the maximum.
*/
integer
-scanvm P1C(char *, p)
+scanvm(char *p)
{
char* q;
integer vm, vmmax;
@@ -250,7 +250,7 @@ scanvm P1C(char *, p)
* is added with add_header.
*/
void
-scan_fontnames P2C(char *, str, char *, psfile)
+scan_fontnames(char *str, char *psfile)
{
char *p,*pe;
struct resfont *re;
@@ -349,7 +349,7 @@ static int fc_state = 0;
static int check_atend = 0;
void
-scanfontusage P2C(char *, p, char *, psfile)
+scanfontusage(char *p, char *psfile)
{
if (strncmp(p, "%%DocumentFonts: ",17) == 0) {
p += 17 ;
@@ -401,7 +401,7 @@ scanfontusage P2C(char *, p, char *, psfile)
* usage specifications. This does not handle the "atend" construction.
*/
void
-scanfontcomments P1C(char *, filename)
+scanfontcomments(char *filename)
{
char p[500];
char *r;
@@ -426,7 +426,7 @@ scanfontcomments P1C(char *, filename)
f = search(figpath, filename, READ) ;
}
if (f) {
- SET_BINARY(fileno(f)) ;
+ (void)SET_BINARY(fileno(f)) ;
fc_state = 0;
check_atend = 0;
while (fgets(p,500,f) && p[0]=='%' &&
@@ -481,7 +481,7 @@ scanfontcomments P1C(char *, filename)
* that are not allowed in PostScript commands.
*/
Boolean
-okascmd P1C(char *, ss)
+okascmd(char *ss)
{
register int c = 0 ;
register char *s = ss ;
@@ -495,7 +495,7 @@ okascmd P1C(char *, ss)
* Output font area and font name strings as a literal string
*/
void
-nameout P2C(char *, area, char *, name)
+nameout(char *area, char *name)
{
char buf[30] ;
char *s ;
@@ -517,7 +517,7 @@ nameout P2C(char *, area, char *, name)
* fonts used in included psfiles in the current section.
*/
void
-fonttableout P1H(void)
+fonttableout(void)
{
int i, k;
fontdesctype *f;
diff --git a/Build/source/texk/dvipsk/flib.c b/Build/source/texk/dvipsk/flib.c
index 78dd3e5df26..532c7554022 100644
--- a/Build/source/texk/dvipsk/flib.c
+++ b/Build/source/texk/dvipsk/flib.c
@@ -46,7 +46,7 @@ struct fli_centry *fli_cache[FLICSIZE];
Boolean flib = 0; /* non zero if reading a font library */
halfword
-pkdouble P1H(void)
+pkdouble(void)
{
register halfword i ;
i = pkbyte() ;
@@ -60,7 +60,7 @@ extern char name[] ;
* fli_cache is initialized.
*/
void
-fliload P1H(void)
+fliload(void)
{
int i ;
halfword version1, version2;
@@ -182,7 +182,7 @@ fliload P1H(void)
* flisearch caches file pointers for 4 font libraries.
*/
FILE *
-flisearch P2C(char *, n, halfword, dpi)
+flisearch(char *n, halfword dpi)
{
halfword dpi1, numsizes, numfonts;
struct fli_lib *lib=NULL;
@@ -288,7 +288,7 @@ flisearch P2C(char *, n, halfword, dpi)
* Directory names have a trailing DIRSEP.
*/
char *
-fliparse P2C(char *, path, char *, name)
+fliparse(char *path, char *name)
{
char *p, *prevp ; /* pointers to path */
char *n, *prevn ; /* pointers to name */
diff --git a/Build/source/texk/dvipsk/fontdef.c b/Build/source/texk/dvipsk/fontdef.c
index 606fedb6958..4fdeaa25386 100644
--- a/Build/source/texk/dvipsk/fontdef.c
+++ b/Build/source/texk/dvipsk/fontdef.c
@@ -32,8 +32,8 @@ extern integer fsizetol ;
* returns a pointer to the new object.
*/
fontdesctype*
-newfontdesc P5C(integer, cksum, integer, scsize, integer, dssize,
- char *, name, char *, area)
+newfontdesc(integer cksum, integer scsize, integer dssize,
+ char *name, char *area)
{
register fontdesctype *fp ;
@@ -92,7 +92,7 @@ newfontdesc P5C(integer, cksum, integer, scsize, integer, dssize,
* read from an included psfile.
*/
fontdesctype *
-matchfont P4C(char *, name, char *, area, integer, scsize, char *, scname)
+matchfont(char *name, char *area, integer scsize, char *scname)
{
register fontdesctype *fp;
register integer smin, smax;
@@ -121,7 +121,7 @@ matchfont P4C(char *, name, char *, area, integer, scsize, char *, scname)
* into its data structures.
*/
void
-fontdef P1C(int, siz)
+fontdef(int siz)
{
register integer i, j, fn ;
register fontdesctype *fp ;
@@ -179,7 +179,7 @@ alreadydefined:
* Now handles specials (but ignores them)
*/
int
-skipnop P1H(void)
+skipnop(void)
{
register int cmd ;
diff --git a/Build/source/texk/dvipsk/header.c b/Build/source/texk/dvipsk/header.c
index c3b5539b65c..f2b9db74158 100644
--- a/Build/source/texk/dvipsk/header.c
+++ b/Build/source/texk/dvipsk/header.c
@@ -33,7 +33,7 @@ extern Boolean HPS_FLAG ;
#endif
int
-add_name P2C(char *, s, struct header_list **, what)
+add_name(char *s, struct header_list **what)
{
return (int) add_name_general (s, what, NULL, NULL);
}
@@ -43,7 +43,7 @@ add_name P2C(char *, s, struct header_list **, what)
* names.
*/
int
-add_name_general P4C(char *, s, struct header_list **, what, char *, pre, char *, post)
+add_name_general(char *s, struct header_list **what, char *pre, char *post)
{
struct header_list *p, *q ;
@@ -70,7 +70,8 @@ add_name_general P4C(char *, s, struct header_list **, what, char *, pre, char *
* If we can find a VMusage comment, we use that; otherwise, we use
* length of the file.
*/
-void checkhmem P3C(char *, s, char *, pre, char *, post)
+void
+checkhmem(char *s, char *pre, char *post)
{
FILE *f ;
@@ -120,13 +121,13 @@ void checkhmem P3C(char *, s, char *, pre, char *, post)
* use that; otherwise, we use the length of the file.
*/
int
-add_header P1C(char *, s)
+add_header(char *s)
{
return (int) add_header_general (s, NULL, NULL);
}
int
-add_header_general P3C(char *, s, char *, pre, char *, post)
+add_header_general(char *s, char *pre, char *post)
{
int r ;
@@ -151,7 +152,7 @@ add_header_general P3C(char *, s, char *, pre, char *, post)
*/
static struct header_list *CUR_head = NULL ;
char *
-get_name P1C(struct header_list **, what)
+get_name(struct header_list **what)
{
if (what && *what) {
char *p = (*what)->name ;
@@ -166,7 +167,7 @@ get_name P1C(struct header_list **, what)
* This routine actually sends the headers.
*/
void
-send_headers P1H(void) {
+send_headers(void) {
struct header_list *p = header_head ;
char *q ;
diff --git a/Build/source/texk/dvipsk/hps.c b/Build/source/texk/dvipsk/hps.c
index 391ddc9e67b..f6f904dd094 100644
--- a/Build/source/texk/dvipsk/hps.c
+++ b/Build/source/texk/dvipsk/hps.c
@@ -118,7 +118,8 @@ char *hs = NULL ; /* html string to be handled */
char *url_name = NULL ; /* url between double quotes */
/* parse anchor into link */
-void do_html P1C(char *, s)
+void
+do_html(char *s)
{
Hps_link *nl ;
url_name = (char *)malloc(strlen(s)+1) ;
@@ -183,7 +184,8 @@ void do_html P1C(char *, s)
return ;
}
-int href_or_name P1H(void) {
+int
+href_or_name(void) {
if ((strncmp(hs, "href", 4) == 0) || (strncmp(hs, "HREF", 4) == 0)) {
ISHREF = TRUE ;
} else if ((strncmp(hs, "name", 4) == 0)
@@ -205,7 +207,8 @@ int href_or_name P1H(void) {
return(NO_ERROR) ;
}
-int parseref P1H(void) {
+int
+parseref(void) {
int i = 0 ;
for(i=0 ; i++ < 4 ; hs++) ; /* skip href or name in html string */
skip_space(hs) ;
@@ -219,7 +222,8 @@ int parseref P1H(void) {
return(NO_ERROR) ; /* extract stuff between double quotes */
}
-int get_string P1H(void) {
+int
+get_string(void) {
char *v = url_name ;
skip_space(hs) ;
@@ -240,7 +244,8 @@ int get_string P1H(void) {
}
}
-int do_link P2C(char *, s, int, type)
+int
+do_link(char *s, int type)
{
Hps_link *p ;
@@ -277,7 +282,8 @@ int do_link P2C(char *, s, int, type)
return(NO_ERROR) ;
}
-unsigned int hash_string P1C(char *, s)
+unsigned int
+hash_string(char *s)
{
unsigned hashval ;
for (hashval = 0 ; *s != '\0' ; s++)
@@ -287,7 +293,8 @@ unsigned int hash_string P1C(char *, s)
/* lookup a hashed name */
-struct nlist *lookup_link P2C(char *, s, int, type)
+struct nlist *
+lookup_link(char *s, int type)
{
struct nlist *np ;
@@ -298,7 +305,8 @@ struct nlist *lookup_link P2C(char *, s, int, type)
return NULL ; /* not found */
}
-struct nlist *install_link P3C(char *, name, Hps_link *, defn, int, type)
+struct nlist *
+install_link(char *name, Hps_link *defn, int type)
{
struct nlist *np ;
unsigned hashval ;
@@ -314,7 +322,8 @@ struct nlist *install_link P3C(char *, name, Hps_link *, defn, int, type)
}
#ifndef KPATHSEA
-char *dup_str P1C(char *, w) /* make a duplicate of s */
+char *
+dup_str(char *w) /* make a duplicate of s */
{
char *p ;
p = (char *)malloc(strlen(w)+1) ;
@@ -324,7 +333,8 @@ char *dup_str P1C(char *, w) /* make a duplicate of s */
}
#endif
-Hps_link *link_dup P1C(Hps_link *, s) /* make a duplicate link */
+Hps_link *
+link_dup(Hps_link *s) /* make a duplicate link */
{
Hps_link *p ;
@@ -334,7 +344,8 @@ Hps_link *link_dup P1C(Hps_link *, s) /* make a duplicate link */
return p ;
}
-double dvi_to_hps_conv P2C(int, i, int, dir)
+double
+dvi_to_hps_conv(int i, int dir)
{
double hps_coor ;
/* Convert dvi integers into proper hps coordinates
@@ -344,7 +355,8 @@ double dvi_to_hps_conv P2C(int, i, int, dir)
return(hps_coor) ;
}
-int vert_loc P1C(int, i)
+int
+vert_loc(int i)
{
int return_value ;
return_value = (int) (i + (PAGESIZE / 4) + FUDGE) ;
@@ -355,7 +367,8 @@ int vert_loc P1C(int, i)
} else return(return_value) ;
}
-Hps_link *dest_link P1C(char *, s)
+Hps_link *
+dest_link(char *s)
{
/* Assume for now that only one entry with same NAME, i.e.
Should be true for all legitimate papers.
@@ -375,7 +388,8 @@ Hps_link *dest_link P1C(char *, s)
return NULL ; /* not found */
}
-int count_targets P1H(void) {
+int
+count_targets(void) {
int count=0 ;
int i ;
struct nlist *np ;
@@ -386,7 +400,8 @@ int count_targets P1H(void) {
return count ;
}
-void do_targets P1H(void) {
+void
+do_targets(void) {
struct nlist *np ;
int i ;
@@ -402,7 +417,8 @@ void do_targets P1H(void) {
}
}
-void do_target_dict P1H(void)
+void
+do_target_dict(void)
{
struct nlist *np ;
int i ;
@@ -420,7 +436,8 @@ void do_target_dict P1H(void)
(void)fprintf(bitfile,"end targetdump-hook def end\n") ;
}
-int href_name_match P2C(char *, h, char *, n)
+int
+href_name_match(char *h, char *n)
{
int count = 0 ;
int name_length = strlen(n) ;
@@ -437,7 +454,8 @@ int href_name_match P2C(char *, h, char *, n)
}
}
-void stamp_hps P1C(Hps_link *, pl)
+void
+stamp_hps(Hps_link *pl)
{
char * tmpbuf;
if (pl == NULL) {
@@ -467,7 +485,8 @@ void stamp_hps P1C(Hps_link *, pl)
/* For external URL's, we just pass them through as a string. The hyperps
* interpreter can then do what is wants with them.
*/
-void stamp_external P2C(char *, s, Hps_link *, pl)
+void
+stamp_external(char *s, Hps_link *pl)
{
char *tmpbuf;
if (pl == NULL) {
@@ -492,7 +511,8 @@ void stamp_external P2C(char *, s, Hps_link *, pl)
free(tmpbuf);
}
-void finish_hps P1H(void) {
+void
+finish_hps(void) {
extern int dvips_debug_flag;
extern int debug_flag;
@@ -514,7 +534,8 @@ void finish_hps P1H(void) {
}
}
-void set_bitfile P2C(char *, s, int, mode)
+void
+set_bitfile(char *s, int mode)
{
if ((bitfile=fopen(s, mode ? FOPEN_ABIN_MODE : FOPEN_WBIN_MODE))==NULL) {
error(s) ;
@@ -523,7 +544,8 @@ if ((bitfile=fopen(s, mode ? FOPEN_ABIN_MODE : FOPEN_WBIN_MODE))==NULL) {
linepos = 0 ;
}
-void vertical_in_hps P1H(void) {
+void
+vertical_in_hps(void) {
Rect_list *rl ;
/*printf("in vertical_in_hps") ; */
if (current_type == NAME) return; /* Handle this case later */
@@ -544,7 +566,8 @@ void vertical_in_hps P1H(void) {
if (POPPED) start_new_box() ;
}
-void print_rect_list P1H(void) {
+void
+print_rect_list(void) {
Rect_list *rl, *rln ;
for(rl = current_rect_list ; rl != NULL ; rl = rln) {
@@ -555,7 +578,8 @@ void print_rect_list P1H(void) {
}
}
-void end_current_box P1H(void) {
+void
+end_current_box(void) {
Hps_link *nl ;
POPPED = TRUE ;
@@ -583,7 +607,8 @@ void end_current_box P1H(void) {
}
}
-void start_new_box P1H(void) {
+void
+start_new_box(void) {
POPPED = FALSE ;
do_link(current_name, current_type) ;
}
diff --git a/Build/source/texk/dvipsk/loadfont.c b/Build/source/texk/dvipsk/loadfont.c
index 1c22de9d062..97a66b309a3 100644
--- a/Build/source/texk/dvipsk/loadfont.c
+++ b/Build/source/texk/dvipsk/loadfont.c
@@ -55,14 +55,14 @@ extern Boolean flib ;
FILE *pkfile ;
char name[MAXPATHLEN] ;
void
-badpk P1C(char *, s)
+badpk(char *s)
{
(void)sprintf(errbuf,"! Bad PK file %s: %s",name,s) ;
error(errbuf);
}
shalfword
-pkbyte P1H(void)
+pkbyte(void)
{
register shalfword i ;
@@ -72,7 +72,7 @@ pkbyte P1H(void)
}
integer
-pkquad P1H(void)
+pkquad(void)
{
register integer i ;
@@ -86,7 +86,7 @@ pkquad P1H(void)
}
integer
-pktrio P1H(void)
+pktrio(void)
{
register integer i ;
@@ -116,7 +116,7 @@ int dontmakefont = 0 ; /* if makefont fails once we won't try again */
#endif
void
-lectureuser P1H(void) {
+lectureuser(void) {
static int userwarned = 0 ;
if (! userwarned) {
@@ -125,7 +125,7 @@ lectureuser P1H(void) {
}
}
Boolean
-pkopen P1C(register fontdesctype *, fd)
+pkopen(register fontdesctype *fd)
{
register char *d, *n ;
char *name_ret ;
@@ -153,7 +153,7 @@ pkopen P1C(register fontdesctype *, fd)
#ifdef KPATHSEA
char *this_name = concat (d, n);
- pkfile=pksearch(pkpath, this_name, READBIN, fd->dpi, &name_ret, &dpi_ret);
+ pkfile=pksearch(this_name, READBIN, fd->dpi, &name_ret, &dpi_ret);
if (!pkfile || !FILESTRCASEEQ (this_name, name_ret))
{
@@ -321,7 +321,7 @@ pkopen P1C(register fontdesctype *, fd)
* structure, along with everything else.)
*/
void
-loadfont P1C(register fontdesctype *, curfnt)
+loadfont(register fontdesctype *curfnt)
{
register integer i ;
register shalfword cmd ;
diff --git a/Build/source/texk/dvipsk/makefont.c b/Build/source/texk/dvipsk/makefont.c
index 10689c4ac89..63a40fd8006 100644
--- a/Build/source/texk/dvipsk/makefont.c
+++ b/Build/source/texk/dvipsk/makefont.c
@@ -24,7 +24,7 @@ extern int vactualdpi ;
* Write mfjob file
*/
void
-mfjobout P2C(char *, font, double, mag)
+mfjobout(char *font, double mag)
{
if (mfjobfile == (FILE *)NULL) {
char pkout[128];
@@ -82,7 +82,7 @@ mfjobout P2C(char *, font, double, mag)
* Calculate magstep values.
*/
static int
-magstep P2C(register int, n, register int, bdpi)
+magstep(register int n, register int bdpi)
{
register float t ;
int neg = 0 ;
@@ -139,7 +139,7 @@ char *command = 0 ;
*/
static char buf[125] ;
void
-makefont P3C(char *, name, int, dpi, int, bdpi)
+makefont(char *name, int dpi, int bdpi)
{
register char *p, *q ;
register int m, n ;
diff --git a/Build/source/texk/dvipsk/output.c b/Build/source/texk/dvipsk/output.c
index bec39b840f3..b5a9d0fae9c 100644
--- a/Build/source/texk/dvipsk/output.c
+++ b/Build/source/texk/dvipsk/output.c
@@ -81,7 +81,7 @@ static Boolean lastspecial = 1 ;
static shalfword d ;
static Boolean popened = 0 ;
int lastfont ; /* exported to dospecial to fix rotate.tex problem */
-static void chrcmd P1H(char c); /* just a forward declaration */
+static void chrcmd(char c); /* just a forward declaration */
static char strbuffer[LINELENGTH + 20], *strbp = strbuffer ;
static struct papsiz *finpapsiz ;
static struct papsiz defpapsiz = {
@@ -111,7 +111,7 @@ extern char *infont ;
static char possibleDSCLine[81],
*dscLinePointer = possibleDSCLine, *dscLineEnd = possibleDSCLine + 80 ;
void
-copyfile_general P2C(char *, s, struct header_list *, cur_header)
+copyfile_general(char *s, struct header_list *cur_header)
{
extern char *realnameoffile ;
FILE *f = NULL ;
@@ -179,7 +179,7 @@ copyfile_general P2C(char *, s, struct header_list *, cur_header)
(void)sprintf(errbuf, "Execution of <%s> failed ", s) ;
f = popen(s, "r") ;
if (f != 0)
- SET_BINARY(fileno(f)) ;
+ (void)SET_BINARY(fileno(f)) ;
}
else {
(void)sprintf(errbuf,"Secure mode is %d so execute <%s> will not run", secure,s) ;
@@ -657,7 +657,7 @@ msdosdone:
}
void
-copyfile P1C(char *, s)
+copyfile(char *s)
{
copyfile_general(s, NULL) ;
}
@@ -666,7 +666,8 @@ copyfile P1C(char *, s)
* For included PostScript graphics, we use the above routine, but
* with no fatal error message.
*/
-void figcopyfile P2C(char *, s, int, systemtype)
+void
+figcopyfile(char *s, int systemtype)
{
infigure = systemtype ? 2 : 1 ;
copyfile(s) ;
@@ -678,7 +679,7 @@ void figcopyfile P2C(char *, s, int, systemtype)
* preceding token.
*/
void
-specialout P1C(char, c)
+specialout(char c)
{
if (linepos >= LINELENGTH) {
(void)putc('\n', bitfile) ;
@@ -690,7 +691,7 @@ specialout P1C(char, c)
}
void
-stringend P1H(void)
+stringend(void)
{
if (linepos + instring >= LINELENGTH - 2) {
(void)putc('\n', bitfile) ;
@@ -711,7 +712,8 @@ stringend P1H(void)
* moving chars 0-32 and 127 to higher positions
* is desirable when using some fonts
*/
-int T1Char P1C(int, c)
+int
+T1Char(int c)
{
int tmpchr = c;
if (shiftlowchars && curfnt->resfont) {
@@ -734,7 +736,7 @@ int T1Char P1C(int, c)
#endif
void
-scout P1C(unsigned char, c) /* string character out */
+scout(unsigned char c) /* string character out */
{
/*
* Is there room in the buffer? LINELENGTH-6 is used because we
@@ -776,8 +778,8 @@ scout P1C(unsigned char, c) /* string character out */
}
}
-void
-scout2 P1C(int, c)
+static void
+scout2(int c)
{
char s[64] ;
@@ -786,7 +788,7 @@ scout2 P1C(int, c)
}
void
-cmdout P1C(char *, s)
+cmdout(char *s)
{
int l ;
@@ -812,7 +814,7 @@ cmdout P1C(char *, s)
static void
-chrcmd P1C(char, c)
+chrcmd(char c)
{
if ((! lastspecial && linepos >= LINELENGTH - 20) ||
linepos + 2 > LINELENGTH) {
@@ -829,7 +831,7 @@ chrcmd P1C(char, c)
}
void
-floatout P1C(float, n)
+floatout(float n)
{
char buf[20] ;
@@ -837,7 +839,8 @@ floatout P1C(float, n)
cmdout(buf) ;
}
-void doubleout P1C(double, n)
+void
+doubleout(double n)
{
char buf[40] ;
@@ -846,7 +849,7 @@ void doubleout P1C(double, n)
}
void
-numout P1C(integer, n)
+numout(integer n)
{
char buf[10] ;
@@ -859,8 +862,8 @@ numout P1C(integer, n)
}
void
-mhexout P2C(register unsigned char *, p,
- register long, len)
+mhexout(register unsigned char *p,
+ register long len)
{
register char *hexchar = hxdata ;
register int n, k ;
@@ -884,7 +887,7 @@ mhexout P2C(register unsigned char *, p,
}
void
-fontout P1C(int, n)
+fontout(int n)
{
char buf[6] ;
@@ -897,7 +900,7 @@ fontout P1C(int, n)
}
void
-hvpos P1H(void)
+hvpos(void)
{
if (rvv != vv) {
if (instring) {
@@ -955,7 +958,8 @@ hvpos P1H(void)
* initprinter opens the bitfile and writes the initialization sequence
* to it.
*/
-void newline P1H(void)
+void
+newline(void)
{
if (linepos != 0) {
(void)fprintf(bitfile, "\n") ;
@@ -965,7 +969,7 @@ void newline P1H(void)
}
void
-nlcmdout P1C(char *, s)
+nlcmdout(char *s)
{
newline() ;
cmdout(s) ;
@@ -975,7 +979,8 @@ nlcmdout P1C(char *, s)
* Is the dimension close enough for a match? We use 5bp
* as a match; this is 65536*72.27*5/72 or 328909 scaled points.
*/
-static int indelta P1C(integer, i)
+static int
+indelta(integer i)
{
if (i < 0)
i = -i ;
@@ -984,14 +989,16 @@ static int indelta P1C(integer, i)
/*
* A case-irrelevant string compare.
*/
-int mlower P1C(int, c)
+int
+mlower(int c)
{
if ('A' <= c && c <= 'Z')
return c - 'A' + 'a' ;
else
return c ;
}
-int ncstrcmp P2C(char *, a, char *, b)
+int
+ncstrcmp(char *a, char *b)
{
while (*a && (*a == *b ||
mlower(*a) == mlower(*b)))
@@ -1004,7 +1011,8 @@ int ncstrcmp P2C(char *, a, char *, b)
/*
* Find the paper size.
*/
-void findpapersize P1H(void) {
+void
+findpapersize(void) {
if (finpapsiz == 0) {
struct papsiz *ps ;
struct papsiz *fps = 0 ;
@@ -1172,7 +1180,8 @@ void findpapersize P1H(void) {
* as return (i * 72 / (65536 * 72.27)), which is the same as
* dividing by 65781.76, but we want to round up.
*/
-static int topoints P1C(integer, i)
+static int
+topoints(integer i)
{
i += 65780L ;
return (i / 6578176L)*100 + (i % 6578176) * 100 / 6578176 ;
@@ -1181,7 +1190,8 @@ static int topoints P1C(integer, i)
* Send out the special paper stuff. If `hed' is non-zero, only
* send out lines starting with `!' else send all other lines out.
*/
-void paperspec P2C(char *, s, int, hed)
+void
+paperspec(char *s, int hed)
{
int sendit ;
@@ -1205,7 +1215,8 @@ void paperspec P2C(char *, s, int, hed)
}
}
}
-char *epsftest P1C(integer, bop)
+char *
+epsftest(integer bop)
{
if (tryepsf && paperfmt == 0 && *iname) {
findbb(bop+44) ;
@@ -1215,7 +1226,8 @@ char *epsftest P1C(integer, bop)
}
static char *isepsf = 0 ;
static int endprologsent ;
-void open_output P1H(void) {
+void
+open_output(void) {
FILE * pf = NULL;
if (*oname != 0) {
/*
@@ -1300,7 +1312,7 @@ void open_output P1H(void) {
SET_BINARY(fileno(bitfile)) ;
}
void
-initprinter P1C(sectiontype *, sect)
+initprinter(sectiontype *sect)
{
void tell_needed_fonts() ;
int n = sect->numpages * pagecopies * collatedcopies ;
@@ -1418,7 +1430,8 @@ initprinter P1C(sectiontype *, sect)
if (! headers_off)
send_headers() ;
}
-void setup P1H(void) {
+void
+setup(void) {
newline() ;
if (endprologsent == 0 && !disablecomments) {
(void)fprintf(bitfile, "%%%%EndProlog\n") ;
@@ -1477,7 +1490,7 @@ void setup P1H(void) {
* cleanprinter is the antithesis of the above routine.
*/
void
-cleanprinter P1H(void)
+cleanprinter(void)
{
(void)fprintf(bitfile, "\n") ;
(void)fprintf(bitfile, "userdict /end-hook known{end-hook}if\n") ;
@@ -1514,7 +1527,8 @@ cleanprinter P1H(void)
/* this tells dvips that it has no clue where it is. */
static int thispage = 0 ;
static integer rulex, ruley ;
-void psflush P1H(void) {
+void
+psflush(void) {
rulex = ruley = rhh = rvv = -314159265 ;
lastfont = -1 ;
}
@@ -1522,12 +1536,12 @@ void psflush P1H(void) {
* pageinit initializes the output variables.
*/
void
-pageinit P1H(void)
+pageinit(void)
{
psflush() ;
newline() ;
thispage++ ;
- if (!disablecomments)
+ if (!disablecomments) {
if (multiplesects)
#ifdef SHORTINT
(void)fprintf(bitfile, "%%DVIPSSectionPage: %ld\n", pagenum) ;
@@ -1538,6 +1552,7 @@ pageinit P1H(void)
else if (! isepsf)
(void)fprintf(bitfile, "%%%%Page: %d %d\n", pagenum, thispage) ;
#endif
+ }
linepos = 0 ;
cmdout("TeXDict") ;
cmdout("begin") ;
@@ -1560,7 +1575,7 @@ pageinit P1H(void)
* This routine ends a page.
*/
void
-pageend P1H(void)
+pageend(void)
{
if (instring) {
stringend() ;
@@ -1582,7 +1597,7 @@ pageend P1H(void)
* output size almost always.)
*/
void
-drawrule P2C(integer, rw, integer, rh)
+drawrule(integer rw, integer rh)
{
numout((integer)hh) ;
numout((integer)vv) ;
@@ -1601,7 +1616,7 @@ drawrule P2C(integer, rw, integer, rh)
* drawchar draws a character at the specified position.
*/
void
-drawchar P2C(chardesctype *, c, int, cc)
+drawchar(chardesctype *c, int cc)
{
hvpos() ;
if (lastfont != curfnt->psname) {
@@ -1615,7 +1630,8 @@ drawchar P2C(chardesctype *, c, int, cc)
/*
* This routine sends out the document fonts comment.
*/
-void tell_needed_fonts P1H(void) {
+void
+tell_needed_fonts(void) {
struct header_list *hl = ps_fonts_used ;
char *q ;
int roomleft = -1 ;
diff --git a/Build/source/texk/dvipsk/papersiz.c b/Build/source/texk/dvipsk/papersiz.c
index 1fde1f5f1a0..0a67b82ba7f 100644
--- a/Build/source/texk/dvipsk/papersiz.c
+++ b/Build/source/texk/dvipsk/papersiz.c
@@ -13,7 +13,8 @@
*/
#include "dvips.h" /* The copyright notice in that file is included too! */
#include "protos.h"
-static long scale P4C(long, whole, long, num, long, den, long, sf)
+static long
+scale(long whole, long num, long den, long sf)
{
long v ;
@@ -28,7 +29,8 @@ static long scale P4C(long, whole, long, num, long, den, long, sf)
* Convert a sequence of digits into a long; return -1 if no digits.
* Advance the passed pointer as well.
*/
-static long myatol P1C(char **, s)
+static long
+myatol(char **s)
{
register char *p ;
register long result ;
@@ -61,7 +63,8 @@ static long myatol P1C(char **, s)
static long scalevals[] = { 1864680L, 65536L, 786432L, 186468L,
1L, 65782L, 70124L, 841489L, 4736286L } ;
static char *scalenames = "cmptpcmmspbpddccin" ;
-long myatodim P1C(char **, s)
+long
+myatodim(char **s)
{
register long w, num, den, sc ;
register char *q ;
@@ -117,7 +120,8 @@ long myatodim P1C(char **, s)
* The routine where we handle the paper size special. We need to pass in
* the string after the `papersize=' specification.
*/
-void handlepapersize P3C(char *, p, integer *, x, integer *, y)
+void
+handlepapersize(char *p, integer *x, integer *y)
{
while (*p == ' ')
p++ ;
diff --git a/Build/source/texk/dvipsk/pprescan.c b/Build/source/texk/dvipsk/pprescan.c
index 7f4e228933e..dabc071a47f 100644
--- a/Build/source/texk/dvipsk/pprescan.c
+++ b/Build/source/texk/dvipsk/pprescan.c
@@ -38,7 +38,7 @@ Boolean pprescan ;
* that the tfm or vf (but not pk) file is loaded.
*/
static void
-ppreselectfont P1C(fontdesctype *, f)
+ppreselectfont(fontdesctype *f)
{
int i ;
@@ -56,7 +56,7 @@ ppreselectfont P1C(fontdesctype *, f)
* Now our scanpage routine.
*/
static void
-pscanpage P1H(void)
+pscanpage(void)
{
register shalfword cmd ;
register chardesctype *cd ;
@@ -187,7 +187,7 @@ case 140: /* eop or end of virtual char */
*/
static integer firstmatch = -1, lastmatch = -1 ;
void
-pprescanpages P1H(void)
+pprescanpages(void)
{
register int cmd ;
integer lmaxpages = maxpages ;
diff --git a/Build/source/texk/dvipsk/prescan.c b/Build/source/texk/dvipsk/prescan.c
index 534f58d9fb6..f9dce65d3e1 100644
--- a/Build/source/texk/dvipsk/prescan.c
+++ b/Build/source/texk/dvipsk/prescan.c
@@ -47,7 +47,7 @@ extern char preamblecomment[] ;
* This routine handles the processing of the preamble in the dvi file.
*/
void
-readpreamble P1H(void)
+readpreamble(void)
{
register int i ;
char *p ;
@@ -88,7 +88,7 @@ readpreamble P1H(void)
*/
static integer firstmatch = -1, lastmatch = -1 ;
void
-prescanpages P1H(void)
+prescanpages(void)
{
register int cmd ;
short ret = 0 ;
diff --git a/Build/source/texk/dvipsk/protos.h b/Build/source/texk/dvipsk/protos.h
index 9fd882e89ac..69b926e64b9 100644
--- a/Build/source/texk/dvipsk/protos.h
+++ b/Build/source/texk/dvipsk/protos.h
@@ -10,365 +10,367 @@ struct String;
struct tcd;
/* prototypes for functions from bbox.c */
-extern void bbtfmload P1H(fontdesctype *curfnt);
-extern void bbspecial P3H(int h, int v, int nbytes);
-extern void bbdopage P1H(void);
-extern void findbb P1H(int bop);
+extern void bbtfmload(fontdesctype *curfnt);
+extern void bbspecial(int h, int v, int nbytes);
+extern void bbdopage(void);
+extern void findbb(int bop);
/* prototypes for functions from color.c */
-extern void colorcmdout P1H(char *s);
-extern void initcolor P1H(void);
-extern void background P1H(char *bkgrnd);
-extern void resetcolorstack P2H(char *p, int outtops);
-extern void bopcolor P1H(int outtops);
-extern void pushcolor P2H(char *p, Boolean outtops);
-extern void popcolor P1H(Boolean outtops);
+extern void colorcmdout(char *s);
+extern void initcolor(void);
+extern void background(char *bkgrnd);
+extern void resetcolorstack(char *p, int outtops);
+extern void bopcolor(int outtops);
+extern void pushcolor(char *p, Boolean outtops);
+extern void popcolor(Boolean outtops);
/* prototypes for functions from dopage.c */
-extern void dopage P1H(void);
+extern void dopage(void);
/* prototypes for functions from dosection.c */
-extern void dosection P2H(sectiontype *s, int c);
-extern int InPageList P1H(int i);
-extern void InstallPL P2H(int pslow, int pshigh);
-extern int ParsePages P1H(char *s);
+extern void dosection(sectiontype *s, int c);
+extern int InPageList(int i);
+extern void InstallPL(int pslow, int pshigh);
+extern int ParsePages(char *s);
/* prototypes for functions from dospecial.c */
-extern void specerror P1H(char *s);
-extern void outbangspecials P1H(void);
-extern int IsSame P2H(char *a, char *b);
-extern char *GetKeyVal P2H(char *str, int *tno);
-extern void predospecial P2H(int numbytes, Boolean scanning);
-extern int maccess P1H(char *s);
-extern void dospecial P1H(int numbytes);
-extern void fil2ps P2H(char *task, char *iname);
-extern float *bbdospecial P1H(int nbytes);
+extern void specerror(char *s);
+extern void outbangspecials(void);
+extern int IsSame(char *a, char *b);
+extern char *GetKeyVal(char *str, int *tno);
+extern void predospecial(int numbytes, Boolean scanning);
+extern int maccess(char *s);
+extern void dospecial(int numbytes);
+extern void fil2ps(char *task, char *iname);
+extern float *bbdospecial(int nbytes);
/* prototypes for functions from download.c */
-extern void download P2H(charusetype *p, int psfont);
-extern void makepsname P2H(char *s, int n);
-extern void lfontout P1H(int n);
-extern void dopsfont P1H(sectiontype *fs);
+extern void download(charusetype *p, int psfont);
+extern void makepsname(char *s, int n);
+extern void lfontout(int n);
+extern void dopsfont(sectiontype *fs);
/* prototypes for functions from dpicheck.c */
-extern void addsiz P1H(int rhsize);
-extern void adddpi P1H(int hsize);
-extern unsigned short dpicheck P1H(unsigned short dpi);
+extern void addsiz(int rhsize);
+extern void adddpi(int hsize);
+extern unsigned short dpicheck(unsigned short dpi);
/* prototypes for functions from drawPS.c */
#ifdef TPIC
-extern void setPenSize P1H(char *cp);
-extern void addPath P1H(char *cp);
-extern void arc P2H(char *cp, int invis);
-extern void flushDashedPath P2H(int dotted, double inchesPerDash);
-extern void flushPath P1H(int invis);
-extern void flushDashed P2H(char *cp, int dotted);
-extern void flushSpline P1H(char *cp);
-extern void SetShade P1H(char *cp);
-extern void shadeLast P1H(char *cp);
-extern void whitenLast P1H(void);
-extern void blackenLast P1H(void);
+extern void setPenSize(char *cp);
+extern void addPath(char *cp);
+extern void arc(char *cp, int invis);
+extern void flushDashedPath(int dotted, double inchesPerDash);
+extern void flushPath(int invis);
+extern void flushDashed(char *cp, int dotted);
+extern void flushSpline(char *cp);
+extern void SetShade(char *cp);
+extern void shadeLast(char *cp);
+extern void whitenLast(void);
+extern void blackenLast(void);
#endif /* TPIC */
/* prototypes for functions from dviinput.c */
-extern void abortpage P1H(void);
-extern short dvibyte P1H(void);
-extern unsigned short twobytes P1H(void);
-extern int threebytes P1H(void);
-extern short signedbyte P1H(void);
-extern short signedpair P1H(void);
-extern int signedtrio P1H(void);
-extern int signedquad P1H(void);
-extern void skipover P1H(int i);
+extern void abortpage(void);
+extern short dvibyte(void);
+extern unsigned short twobytes(void);
+extern int threebytes(void);
+extern short signedbyte(void);
+extern short signedpair(void);
+extern int signedtrio(void);
+extern int signedquad(void);
+extern void skipover(int i);
/* prototypes for functions from dvips.c */
-extern void help P1H(int status);
-extern void error_with_perror P2H(char *s, char *fname);
-extern void error P1H(char *s);
-extern void check_checksum P3H(unsigned int c1, unsigned int c2, const char *name);
-extern char *mymalloc P1H(int n);
-extern void morestrings P1H(void);
-extern void checkstrings P1H(void);
-extern void initialize P1H(void);
-extern char *newstring P1H(char *s);
-extern void newoutname P1H(void);
-extern void *revlist P1H(void *p);
-extern void queryargs P1H(void);
+extern void help(int status);
+extern void error_with_perror(char *s, char *fname);
+extern void error(char *s);
+extern void check_checksum(unsigned int c1, unsigned int c2, const char *name);
+extern char *mymalloc(int n);
+extern void morestrings(void);
+extern void checkstrings(void);
+extern void initialize(void);
+extern char *newstring(char *s);
+extern void newoutname(void);
+extern void *revlist(void *p);
+extern void queryargs(void);
/* prototypes for functions from emspecial.c */
-extern void emclear P1H(void);
-extern struct empt *emptput P3H(short point, int x, int y);
-extern struct empt *emptget P1H(short point);
-extern float emunits P2H(float width, char *unit);
-extern void emspecial P1H(char *p);
-extern int readinteger P1H(FILE *f);
-extern unsigned short readhalfword P1H(FILE *f);
-extern int PCXreadline P3H(FILE *pcxf, unsigned char *pcxbuf, unsigned int byteperline);
-/* void PCXgetpalette P5H(FILE *pcxf, struct *pcxh, unsigned char *r, unsigned char *g, unsigned char *b); */
+extern void emclear(void);
+extern struct empt *emptput(short point, int x, int y);
+extern struct empt *emptget(short point);
+extern float emunits(float width, char *unit);
+extern void emspecial(char *p);
+extern int readinteger(FILE *f);
+extern unsigned short readhalfword(FILE *f);
+extern int PCXreadline(FILE *pcxf, unsigned char *pcxbuf, unsigned int byteperline);
extern void PCXshowpicture(FILE *pcxf,int wide,int high,int bytes,int cp,int bp,unsigned char *r,unsigned char *g,unsigned char *b);
-extern void imagehead P5H(char *filename, int wide, int high, float emwidth, float emheight);
-extern void imagetail P1H(void);
-extern void pcxgraph P4H(FILE *pcxf, char *filename, float emwidth, float emheight);
-extern void MSP_2_ps P3H(FILE *f, int wide, int high);
-extern void MSP_1_ps P3H(FILE *f, int wide, int high);
-extern void mspgraph P4H(FILE *f, char *filename, float emwidth, float emheight);
-extern void rgbread P4H(FILE *f, int w, int b, char *s);
-extern void rle4read P4H(FILE *f, int w, int b, char *s);
-extern void rle8read P4H(FILE *f, int w, int b, char *s);
-extern void bmpgraph P4H(FILE *f, char *filename, float emwidth, float emheight);
-extern void emgraph P3H(char *filename, float emwidth, float emheight);
+extern void imagehead(char *filename, int wide, int high, float emwidth, float emheight);
+extern void imagetail(void);
+extern void pcxgraph(FILE *pcxf, char *filename, float emwidth, float emheight);
+extern void MSP_2_ps(FILE *f, int wide, int high);
+extern void MSP_1_ps(FILE *f, int wide, int high);
+extern void mspgraph(FILE *f, char *filename, float emwidth, float emheight);
+extern void rgbread(FILE *f, int w, int b, char *s);
+extern void rle4read(FILE *f, int w, int b, char *s);
+extern void rle8read(FILE *f, int w, int b, char *s);
+extern void bmpgraph(FILE *f, char *filename, float emwidth, float emheight);
+extern void emgraph(char *filename, float emwidth, float emheight);
/* prototypes for functions from finclude.c */
-extern fontdesctype *ifontdef P5H(char *name, char *area, int scsize, int dssize, char *scname);
-extern void setfamily P1H(fontdesctype *f);
-extern char *getname P1H(char *s);
-extern void includechars P2H(fontdesctype *f, char *s);
-extern void scan1fontcomment P1H(char *p);
-extern int scanvm P1H(char *p);
-extern void scan_fontnames P2H(char *str, char *psfile);
-extern void scanfontusage P2H(char *p, char *psfile);
-extern void scanfontcomments P1H(char *filename);
-extern Boolean okascmd P1H(char *ss);
-extern void nameout P2H(char *area, char *name);
-extern void fonttableout P1H(void);
+extern fontdesctype *ifontdef(char *name, char *area, int scsize, int dssize, char *scname);
+extern void setfamily(fontdesctype *f);
+extern char *getname(char *s);
+extern void includechars(fontdesctype *f, char *s);
+extern void scan1fontcomment(char *p);
+extern int scanvm(char *p);
+extern void scan_fontnames(char *str, char *psfile);
+extern void scanfontusage(char *p, char *psfile);
+extern void scanfontcomments(char *filename);
+extern Boolean okascmd(char *ss);
+extern void nameout(char *area, char *name);
+extern void fonttableout(void);
/* prototypes for functions from flib.c */
#ifdef FONTLIB
-extern void fliload P1H(void);
+extern void fliload(void);
#endif
/* prototypes for functions from fontdef.c */
-extern fontdesctype *newfontdesc P5H(int cksum, int scsize, int dssize, char *name, char *area);
-extern fontdesctype *matchfont P4H(char *name, char *area, int scsize, char *scname);
-extern void fontdef P1H(int siz);
-extern int skipnop P1H(void);
+extern fontdesctype *newfontdesc(int cksum, int scsize, int dssize, char *name, char *area);
+extern fontdesctype *matchfont(char *name, char *area, int scsize, char *scname);
+extern void fontdef(int siz);
+extern int skipnop(void);
/* prototypes for functions from header.c */
-extern int add_name P2H(char *s, struct header_list **what );
-extern int add_name_general P4H(char *s, struct header_list **what,
- char *pre, char *post);
-extern void checkhmem P3H(char *s, char *p, char *q);
-extern int add_header P1H(char *s);
-extern int add_header_general P3H(char *s, char *pre, char* post);
-extern char *get_name P1H(struct header_list **what );
-extern void send_headers P1H(void);
+extern int add_name(char *s, struct header_list **what );
+extern int add_name_general(char *s, struct header_list **what,
+ char *pre, char *post);
+extern void checkhmem(char *s, char *p, char *q);
+extern int add_header(char *s);
+extern int add_header_general(char *s, char *pre, char* post);
+extern char *get_name(struct header_list **what );
+extern void send_headers(void);
/* prototypes for functions from hps.c */
#ifdef HPS
-extern void do_html P1H(char *s);
-extern int href_or_name P1H(void);
-extern int parseref P1H(void);
-extern int get_string P1H(void);
-extern int do_link P2H(char *s, int type);
-extern unsigned int hash_string P1H(char *s);
-extern struct nlist *lookup_link P2H(char *s, int type);
-extern struct nlist *install_link P3H(char *name, struct hps_link *defn, int type);
-extern struct hps_link *link_dup P1H(struct hps_link *s);
-extern double dvi_to_hps_conv P2H(int i, int dir);
-extern int vert_loc P1H(int i);
-extern struct hps_link *dest_link P1H(char *s);
-extern int count_targets P1H(void);
-extern void do_targets P1H(void);
-extern void do_target_dict P1H(void);
-extern int href_name_match P2H(char *h, char *n);
-extern void stamp_hps P1H(struct hps_link *pl);
-extern void stamp_external P2H(char *s, struct hps_link *pl);
-extern void finish_hps P1H(void);
-extern void set_bitfile P2H(char *s, int mode);
-extern void vertical_in_hps P1H(void);
-extern void print_rect_list P1H(void);
-extern void end_current_box P1H(void);
-extern void start_new_box P1H(void);
+extern void do_html(char *s);
+extern int href_or_name(void);
+extern int parseref(void);
+extern int get_string(void);
+extern int do_link(char *s, int type);
+extern unsigned int hash_string(char *s);
+extern struct nlist *lookup_link(char *s, int type);
+extern struct nlist *install_link(char *name, struct hps_link *defn, int type);
+extern struct hps_link *link_dup(struct hps_link *s);
+extern double dvi_to_hps_conv(int i, int dir);
+extern int vert_loc(int i);
+extern struct hps_link *dest_link(char *s);
+extern int count_targets(void);
+extern void do_targets(void);
+extern void do_target_dict(void);
+extern int href_name_match(char *h, char *n);
+extern void stamp_hps(struct hps_link *pl);
+extern void stamp_external(char *s, struct hps_link *pl);
+extern void finish_hps(void);
+extern void set_bitfile(char *s, int mode);
+extern void vertical_in_hps(void);
+extern void print_rect_list(void);
+extern void end_current_box(void);
+extern void start_new_box(void);
#endif /* HPS */
/* prototypes for functions from loadfont.c */
-extern void badpk P1H(char *s);
-extern short pkbyte P1H(void);
-extern int pkquad P1H(void);
-extern int pktrio P1H(void);
-extern void lectureuser P1H(void);
-extern Boolean pkopen P1H(fontdesctype *fd);
-extern void loadfont P1H(fontdesctype *curfnt);
+extern void badpk(char *s);
+extern short pkbyte(void);
+extern int pkquad(void);
+extern int pktrio(void);
+extern void lectureuser(void);
+extern Boolean pkopen(fontdesctype *fd);
+extern void loadfont(fontdesctype *curfnt);
/* prototypes for functions from makefont.c */
-extern void makefont P3H(char *name, int dpi, int bdpi);
+extern void makefont(char *name, int dpi, int bdpi);
/* prototypes for functions from output.c */
-extern void copyfile P1H(char *s);
-extern void copyfile_general P2H(char *s, struct header_list *h);
-extern void figcopyfile P2H(char *s, int systemtype);
-extern void specialout P1H(char c);
-extern void stringend P1H(void);
+extern void copyfile(char *s);
+extern void copyfile_general(char *s, struct header_list *h);
+extern void figcopyfile(char *s, int systemtype);
+extern void specialout(char c);
+extern void stringend(void);
#ifdef SHIFTLOWCHARS
-extern int T1Char P1H(int c);
+extern int T1Char(int c);
#endif
-extern void scout P1H(unsigned char c);
-extern void cmdout P1H(char *s);
-extern void floatout P1H(float n);
-extern void doubleout P1H(double n);
-extern void numout P1H(int n);
-extern void mhexout P2H(unsigned char *p, long len);
-extern void fontout P1H(int n);
-extern void hvpos P1H(void);
-extern void newline P1H(void);
-extern void nlcmdout P1H(char *s);
-extern int mlower P1H(int c);
-extern int ncstrcmp P2H(char *a, char *b);
-extern void findpapersize P1H(void);
-extern void paperspec P2H(char *s, int hed);
-extern char *epsftest P1H(int bop);
-extern void open_output P1H(void);
-extern void initprinter P1H(sectiontype *sect);
-extern void setup P1H(void);
-extern void cleanprinter P1H(void);
-extern void psflush P1H(void);
-extern void pageinit P1H(void);
-extern void pageend P1H(void);
-extern void drawrule P2H(int rw, int rh);
-
-extern void drawchar P2H(chardesctype * c, int cc);
-extern void tell_needed_fonts P1H(void);
+extern void scout(unsigned char c);
+extern void cmdout(char *s);
+extern void floatout(float n);
+extern void doubleout(double n);
+extern void numout(int n);
+extern void mhexout(unsigned char *p, long len);
+extern void fontout(int n);
+extern void hvpos(void);
+extern void newline(void);
+extern void nlcmdout(char *s);
+extern int mlower(int c);
+extern int ncstrcmp(char *a, char *b);
+extern void findpapersize(void);
+extern void paperspec(char *s, int hed);
+extern char *epsftest(int bop);
+extern void open_output(void);
+extern void initprinter(sectiontype *sect);
+extern void setup(void);
+extern void cleanprinter(void);
+extern void psflush(void);
+extern void pageinit(void);
+extern void pageend(void);
+extern void drawrule(int rw, int rh);
+
+extern void drawchar(chardesctype * c, int cc);
+extern void tell_needed_fonts(void);
/* prototypes for functions from papersiz.c */
-extern long myatodim P1H(char **s );
-extern void handlepapersize P3H(char *p, int *x, int *y);
+extern long myatodim(char **s );
+extern void handlepapersize(char *p, int *x, int *y);
/* prototypes for functions from pprescan.c */
-extern void pprescanpages P1H(void);
+extern void pprescanpages(void);
/* prototypes for functions from prescan.c */
-extern void readpreamble P1H(void);
-extern void prescanpages P1H(void);
+extern void readpreamble(void);
+extern void prescanpages(void);
/* prototypes for functions from repack.c */
-extern void was_putlong P2H(char *a, long i);
-extern long getlong P1H(unsigned char *a);
-extern void dochar P3H(unsigned char *from, short width, short height);
-extern char *makecopy P3H(unsigned char *what, long len, unsigned char *p);
-extern void repack P1H(struct tcd *cp);
+extern void was_putlong(char *a, long i);
+extern long getlong(unsigned char *a);
+extern void dochar(unsigned char *from, short width, short height);
+extern char *makecopy(unsigned char *what, long len, unsigned char *p);
+extern void repack(struct tcd *cp);
/* prototypes for functions from resident.c */
-extern int hash P1H(char *s);
-extern void revpslists P1H(void);
-extern void cleanres P1H(void);
-extern struct resfont *lookup P1H(char *name);
-extern struct resfont *findPSname P1H(char *name);
-extern void add_entry P6H(char *TeXname, char *PSname, char *Fontfile, char *Vectfile, char *specinfo, char *downloadinfo);
-extern int residentfont P1H(fontdesctype *curfnt);
-extern void bad_config P1H(char *err);
-extern char *configstring P2H(char *s, int nullok);
-extern Boolean getdefaults P1H(char *s);
-extern void getpsinfo P1H(char *name);
-extern void checkenv P1H(int which);
+extern int hash(char *s);
+extern void revpslists(void);
+extern void cleanres(void);
+extern struct resfont *lookup(char *name);
+extern struct resfont *findPSname(char *name);
+extern void add_entry(char *TeXname, char *PSname, char *Fontfile, char *Vectfile, char *specinfo, char *downloadinfo);
+extern int residentfont(fontdesctype *curfnt);
+extern void bad_config(char *err);
+extern char *configstring(char *s, int nullok);
+extern Boolean getdefaults(char *s);
+extern void getpsinfo(char *name);
+extern void checkenv(int which);
/* prototypes for functions from scalewidth.c */
-extern int scalewidth P2H(int a, int b);
+extern int scalewidth(int a, int b);
/* prototypes for functions from scanpage.c */
-extern Boolean prescanchar P1H(chardesctype *cd);
-extern Boolean preselectfont P1H(fontdesctype *f);
-extern short scanpage P1H(void);
+extern Boolean prescanchar(chardesctype *cd);
+extern Boolean preselectfont(fontdesctype *f);
+extern short scanpage(void);
/* prototypes for functions from search.c */
#ifdef KPATHSEA
-extern FILE *search P3H(kpse_file_format_type format, char *file, char *mode);
-extern FILE *pksearch P6H(kpse_file_format_type format, char *file, char *mode, unsigned short dpi, char **name_ret , int *dpi_ret);
+extern FILE *search(kpse_file_format_type format, char *file, char *mode);
+extern FILE *pksearch(char *file, char *mode, halfword dpi, char **name_ret, int *dpi_ret);
#else /* !KPATSHEA */
-extern FILE *search P3H(char *path, char *file, char *mode);
-extern FILE *pksearch P6H(char *path, char *file, char *mode, unsigned short dpi, char **name_ret , int *dpi_ret);
+extern FILE *search(char *path, char *file, char *mode);
+extern FILE *pksearch(char *path, char *file, char *mode, char *n, halfword dpi, halfword vdpi);
#endif /* KPATHSEA */
-extern FILE *my_real_fopen P2H(char *n, char *t);
-extern int close_file P1H(FILE *f);
+extern FILE *my_real_fopen(char *n, char *t);
+extern int close_file(FILE *f);
/* prototypes for functions from skippage.c */
-extern void skippage P1H(void);
+extern void skippage(void);
/* prototypes for functions from squeeze.c */
-extern void specialout P1H(char c);
-extern void strout P1H(char *s);
-extern void cmdout P1H(char *s);
+extern void specialout(char c);
+extern void strout(char *s);
+extern void cmdout(char *s);
/* prototypes for functions from t1part.c */
-extern int DefTypeFont P1H(unsigned char *name);
-extern int GetZeroLine P1H(unsigned char *str);
-extern int GetWord P1H(unsigned char *mem);
-extern int GetToken P1H(void);
-extern int GetNum P1H(void);
-extern int PassToken P1H(void);
-extern int PassString P1H(unsigned char flg);
-extern void *getmem P1H(unsigned int size);
-extern struct Char *AddChar P3H(struct Char *TmpChar, unsigned char *CharName, int num);
-extern void AddStr P2H(unsigned char *name, int num);
-extern void RevChar P1H(struct Char *TmpChar);
-extern void OutChar P2H(struct Char *TmpChar, FILE *fout);
-extern void Reverse P1H(struct String *TmpStr);
-extern void OutStr P2H(struct String *TmpStr, FILE *fout);
-extern void PrintChar P1H(struct Char *TmpChar);
-extern int ClearB P1H(void);
-extern int ChooseChar P2H(unsigned char *name, struct Char *TmpChar);
-extern int FindSeac P1H(int num);
-extern int FindCharW P2H(unsigned char *name, int length);
-extern void ClearCW P1H(struct Char *ThisChar);
-extern int WorkVect P1H(struct Char *TmpChar);
-extern void UnDefineCharsW P1H(void);
-extern struct Char *UnDefineChars P1H(struct Char *TmpChar);
-extern void UnDefineStr P1H(void);
-extern void ScanSubrs P1H(int i);
-extern void ViewReturnCall P5H(int num_err, int top, int *pstack, int j, int depth);
-extern int DeCodeStr P2H(int num, int numseac);
-extern void ScanChars P1H(int i);
-extern void LastLook P1H(void);
-extern int FindKeyWord P2H(int First_Key, int lastkey);
-extern int ScanBinary P1H(void);
-extern unsigned char *itoasp P3H(int n, unsigned char *s, int len);
-extern void SubstNum P1H(void);
-extern unsigned long little4 P1H(unsigned char *buff);
-extern unsigned char CDeCrypt P2H(unsigned char cipher, unsigned int *lcdr);
-extern int EndOfEncoding P1H(int err_num);
-extern void CorrectGrid P1H(void);
-extern int CharEncoding P1H(void);
-extern void FindEncoding P1H(void);
-extern void CheckChoosing P1H(void);
-extern void OutASCII P3H(FILE *fout, unsigned char *buff, unsigned long len);
-extern void BinEDeCrypt P2H(unsigned char *buff, unsigned long len);
-extern void HexEDeCrypt P1H(unsigned char *mem);
-extern int PartialPFA P2H(FILE *fin, FILE *fout);
-extern int PartialPFB P2H(FILE *fin, FILE *fout);
-extern void OutHEX P1H(FILE *fout);
-extern int Afm P1H(void);
-extern int FontPart P3H(FILE *fout, unsigned char *fontfile, unsigned char *vectfile);
-extern int LoadVector P2H(int num, struct Char *TmpChar);
-extern int ChooseVect P1H(struct Char *tmpChar);
-extern void ErrorOfScan P1H(int err);
-extern void NameOfProgram P1H(void);
+extern int DefTypeFont(unsigned char *name);
+extern int GetZeroLine(unsigned char *str);
+extern int GetWord(unsigned char *mem);
+extern int GetToken(void);
+extern int GetNum(void);
+extern int PassToken(void);
+extern int PassString(unsigned char flg);
+extern void *getmem(unsigned int size);
+extern struct Char *AddChar(struct Char *TmpChar, unsigned char *CharName, int num);
+extern void AddStr(unsigned char *name, int num);
+extern void RevChar(struct Char *TmpChar);
+extern void OutChar(struct Char *TmpChar, FILE *fout);
+extern void Reverse(struct String *TmpStr);
+extern void OutStr(struct String *TmpStr, FILE *fout);
+extern void PrintChar(struct Char *TmpChar);
+extern int ClearB(void);
+extern int ChooseChar(unsigned char *name, struct Char *TmpChar);
+extern int FindSeac(int num);
+extern int FindCharW(unsigned char *name, int length);
+extern void ClearCW(struct Char *ThisChar);
+extern int WorkVect(struct Char *TmpChar);
+extern void UnDefineCharsW(void);
+extern struct Char *UnDefineChars(struct Char *TmpChar);
+extern void UnDefineStr(void);
+extern void ScanSubrs(int i);
+extern void ViewReturnCall(int num_err, int top, int *pstack, int j, int depth);
+extern int DeCodeStr(int num, int numseac);
+extern void ScanChars(int i);
+extern void LastLook(void);
+extern int FindKeyWord(int First_Key, int lastkey);
+extern int ScanBinary(void);
+extern unsigned char *itoasp(int n, unsigned char *s, int len);
+extern void SubstNum(void);
+extern unsigned long little4(unsigned char *buff);
+extern unsigned char CDeCrypt(unsigned char cipher, unsigned int *lcdr);
+extern int EndOfEncoding(int err_num);
+extern void CorrectGrid(void);
+extern int CharEncoding(void);
+extern void FindEncoding(void);
+extern void CheckChoosing(void);
+extern void OutASCII(FILE *fout, unsigned char *buff, unsigned long len);
+extern void BinEDeCrypt(unsigned char *buff, unsigned long len);
+extern void HexEDeCrypt(unsigned char *mem);
+extern int PartialPFA(FILE *fin, FILE *fout);
+extern int PartialPFB(FILE *fin, FILE *fout);
+extern void OutHEX(FILE *fout);
+extern int Afm(void);
+extern int FontPart(FILE *fout, unsigned char *fontfile, unsigned char *vectfile);
+extern int LoadVector(int num, struct Char *TmpChar);
+extern int ChooseVect(struct Char *tmpChar);
+extern void ErrorOfScan(int err);
+extern void NameOfProgram(void);
/* prototypes for functions from tfmload.c */
-extern void badtfm P1H(char *s);
-extern void tfmopen P1H(fontdesctype *fd);
-extern short tfmbyte P1H(void);
-extern unsigned short tfm16 P1H(void);
-extern int tfm32 P1H(void);
-extern int tfmload P1H(fontdesctype *curfnt);
+extern void badtfm(char *s);
+extern void tfmopen(fontdesctype *fd);
+extern short tfmbyte(void);
+extern unsigned short tfm16(void);
+extern int tfm32(void);
+extern int tfmload(fontdesctype *curfnt);
/* prototypes for functions from unpack.c */
-extern short getnyb P1H(void);
-extern Boolean getbit P1H(void);
-extern long pkpackednum P1H(void);
-extern void flip P2H(char *s, long howmany);
-extern long unpack P5H(unsigned char *pack, unsigned short *raster, unsigned short cwidth, unsigned short cheight, unsigned short cmd);
+extern short getnyb(void);
+extern Boolean getbit(void);
+extern long pkpackednum(void);
+extern void flip(char *s, long howmany);
+extern long unpack(unsigned char *pack, unsigned short *raster, unsigned short cwidth, unsigned short cheight, unsigned short cmd);
/* prototypes for functions from virtualfont.c */
-extern void badvf P1H(char *s);
-extern short vfbyte P1H(void);
-extern int vfquad P1H(void);
-extern int vftrio P1H(void);
-extern int vfopen P1H(fontdesctype *fd);
-extern struct tft *vfontdef P2H(int s, int siz);
-extern Boolean virtualfont P1H(fontdesctype *curfnt);
+extern void badvf(char *s);
+extern short vfbyte(void);
+extern int vfquad(void);
+extern int vftrio(void);
+extern int vfopen(fontdesctype *fd);
+extern struct tft *vfontdef(int s, int siz);
+extern Boolean virtualfont(fontdesctype *curfnt);
/* prototypes for functions from writet1.c */
-extern void load_enc P2H(char *, char **);
-extern boolean t1_subset_2 P3H(char *, unsigned char *, char *);
+extern void load_enc(char *, char **);
+extern void writet1(void);
+extern void t1_free(void);
+extern boolean t1_subset(char *, char *, unsigned char *);
+extern boolean t1_subset_2(char *, unsigned char *, char *);
#endif
diff --git a/Build/source/texk/dvipsk/repack.c b/Build/source/texk/dvipsk/repack.c
index f3d518ef63c..528a24deda1 100644
--- a/Build/source/texk/dvipsk/repack.c
+++ b/Build/source/texk/dvipsk/repack.c
@@ -40,7 +40,8 @@ static unsigned char *specdata ;
static long tslen = 0 ;
static unsigned char *tempstore, *tsp, *tsend ;
-void putlong P2C(register char *, a, long, i)
+void
+putlong(register char *a, long i)
{
a[0] = i >> 24 ;
a[1] = i >> 16 ;
@@ -48,7 +49,8 @@ void putlong P2C(register char *, a, long, i)
a[3] = i ;
}
-long getlong P1C(register unsigned char *, a)
+long
+getlong(register unsigned char *a)
{
return ((((((a[0] << 8L) + a[1]) << 8L) + a[2]) << 8L) + a[3]) ;
}
@@ -57,7 +59,8 @@ long getlong P1C(register unsigned char *, a)
#define addtse(n) {lcm=tsp-tempstore;addts(n);} /* mark END option position */
-static void addts P1C(register unsigned char, what)
+static void
+addts(register unsigned char what)
{
register unsigned char *p, *q ;
@@ -99,7 +102,8 @@ static void addts P1C(register unsigned char, what)
* they're packed to bytes. Thus, we may have to skip a byte at
* the end of each row.
*/
-void dochar P3C(unsigned char *, from, short, width, short, height)
+void
+dochar(unsigned char *from, short width, short height)
{
register int i ;
register unsigned char *f, *t, *d ;
@@ -321,9 +325,9 @@ long mbytesleft ;
quarterword *mraster ;
char *
-makecopy P3C(register unsigned char *, what,
- register long, len,
- register unsigned char *, p)
+makecopy(register unsigned char *what,
+ register long len,
+ register unsigned char *p)
{
register unsigned char *q ;
@@ -350,7 +354,8 @@ makecopy P3C(register unsigned char *, what,
/* Now the main routine, which is called when a character is used
for the very first time. */
-void repack P1C(register chardesctype *, cp)
+void
+repack(register chardesctype *cp)
{
register long i, j ;
register unsigned char *p ;
diff --git a/Build/source/texk/dvipsk/resident.c b/Build/source/texk/dvipsk/resident.c
index 9b8be0f8927..f7c8aaca3c8 100644
--- a/Build/source/texk/dvipsk/resident.c
+++ b/Build/source/texk/dvipsk/resident.c
@@ -106,7 +106,7 @@ struct header_list *ps_fonts_used ;
* Our hash routine.
*/
int
-hash P1C(char *, s)
+hash(char *s)
{
int h = 12 ;
@@ -118,7 +118,7 @@ hash P1C(char *, s)
* Reverse the hash chains.
*/
void
-revpslists P1H(void) {
+revpslists(void) {
register int i ;
for (i=0; i<RESHASHPRIME; i++)
reshash[i] = (struct resfont *)revlist(reshash[i]) ;
@@ -129,7 +129,7 @@ revpslists P1H(void) {
* main prolog (not section prolog).
*/
void
-cleanres P1H(void) {
+cleanres(void) {
register int i ;
register struct resfont *p ;
for (i=0; i<RESHASHPRIME; i++)
@@ -141,7 +141,7 @@ cleanres P1H(void) {
* The routine that looks up a font name.
*/
struct resfont *
-lookup P1C(char *, name)
+lookup(char *name)
{
struct resfont *p ;
@@ -152,7 +152,7 @@ lookup P1C(char *, name)
}
struct resfont *
-findPSname P1C(char *, name)
+findPSname(char *name)
{
register int i ;
register struct resfont *p ;
@@ -168,8 +168,8 @@ findPSname P1C(char *, name)
* This routine adds an entry.
*/
void
-add_entry P6C(char *, TeXname, char *, PSname, char *, Fontfile,
- char *, Vectfile, char *, specinfo, char *, downloadinfo)
+add_entry(char *TeXname, char *PSname, char *Fontfile,
+ char *Vectfile, char *specinfo, char *downloadinfo)
{
struct resfont *p ;
int h ;
@@ -197,7 +197,7 @@ add_entry P6C(char *, TeXname, char *, PSname, char *, Fontfile,
*/
extern char *infont ;
int
-residentfont P1C(register fontdesctype *, curfnt)
+residentfont(register fontdesctype *curfnt)
{
int i ;
struct resfont *p ;
@@ -284,7 +284,7 @@ residentfont P1C(register fontdesctype *, curfnt)
static char was_inline[INLINE_SIZE] ;
static unsigned c_lineno;
void
-bad_config P1C(char *, err)
+bad_config(char *err)
{
fprintf (stderr, "%s:%d:", realnameoffile, c_lineno);
error (err);
@@ -297,7 +297,8 @@ bad_config P1C(char *, err)
* We substitute everything of the form ::, ^: or :$ with default,
* so a user can easily build on to the existing paths.
*/
-static char *getpath P2C(char *, who, char *, what)
+static char *
+getpath(char *who, char *what)
{
if (who) {
register char *pp, *qq ;
@@ -331,7 +332,8 @@ static char *getpath P2C(char *, who, char *, what)
* double quotes with spaces in them. We also accept strings
* with spaces in them, but kill off any spaces at the end.
*/
-char *configstring P2C(char *, s, int, nullok)
+char *
+configstring(char *s, int nullok)
{
char tstr[INLINE_SIZE] ;
char *p = tstr ;
@@ -364,7 +366,7 @@ char *configstring P2C(char *, s, int, nullok)
*/
char *psmapfile = PSMAPFILE ;
Boolean
-getdefaults P1C(char *, s)
+getdefaults(char *s)
{
FILE *deffile ;
char PSname[INLINE_SIZE] ;
@@ -853,7 +855,8 @@ default:
* If a character pointer is passed in, use that name; else, use the
* default (possibly set) name, psfonts.map.
*/
-void getpsinfo P1C(char *, name)
+void
+getpsinfo(char *name)
{
FILE *deffile ;
register char *p ;
@@ -989,7 +992,8 @@ void getpsinfo P1C(char *, name)
* We substitute everything of the form ::, ^: or :$ with default,
* so a user can easily build on to the existing paths.
*/
-static char *getenvup P2C(char *, who, char *, what)
+static char *
+getenvup(char *who, char *what)
{
return getpath(getenv(who), what) ;
}
@@ -997,7 +1001,8 @@ static char *getenvup P2C(char *, who, char *, what)
#if !defined(KPATHSEA) && defined(SEARCH_SUBDIRECTORIES)
static char *concat3();
#endif
-void checkenv P1C(int, which)
+void
+checkenv(int which)
{
#ifndef KPATHSEA
if (which) {
@@ -1074,7 +1079,7 @@ extern int chdir() ;
give up the ghost when they fail. */
char *
-xmalloc P1C(unsigned, size)
+xmalloc(unsigned size)
{
char *mem = malloc (size);
@@ -1089,7 +1094,7 @@ xmalloc P1C(unsigned, size)
char *
-xrealloc P2C(char *, ptr, unsigned, size)
+xrealloc(char *ptr, unsigned size)
{
char *mem = realloc (ptr, size);
@@ -1107,7 +1112,7 @@ xrealloc P2C(char *, ptr, unsigned, size)
to the next PATHSEP. */
static void
-next_component P2C(char *, name, char **, path)
+next_component(char *name, char **path)
{
unsigned count = 0;
@@ -1133,7 +1138,7 @@ next_component P2C(char *, name, char **, path)
false if not. */
int
-is_dir P1C(char *, fn)
+is_dir(char *fn)
{
struct stat stats;
@@ -1142,7 +1147,7 @@ is_dir P1C(char *, fn)
static char *
-concat3 P3C(char *, s1, char *, s2, char *, s3)
+concat3(char *s1, char *s2, char *s3)
{
char *r = xmalloc (strlen (s1) + strlen (s2) + strlen (s3) + 1);
strcpy (r, s1);
@@ -1159,7 +1164,7 @@ concat3 P3C(char *, s1, char *, s2, char *, s3)
We return the list of directories found. */
char *
-do_subdir_path P1C(char *, dir_list)
+do_subdir_path(char *dir_list)
{
char *cwd;
unsigned len;
diff --git a/Build/source/texk/dvipsk/scalewidth.c b/Build/source/texk/dvipsk/scalewidth.c
index 65c7720bbb4..ef02cf1f57d 100644
--- a/Build/source/texk/dvipsk/scalewidth.c
+++ b/Build/source/texk/dvipsk/scalewidth.c
@@ -14,9 +14,10 @@
* place in the program where such accuracy is required.
*/
#include "dvips.h" /* The copyright notice in that file is included too! */
+#include "protos.h"
integer
-scalewidth P2C(register integer, a, register integer, b)
+scalewidth(register integer a, register integer b)
{
register integer al, bl ;
diff --git a/Build/source/texk/dvipsk/scanpage.c b/Build/source/texk/dvipsk/scanpage.c
index 87f5ef49469..c32f16527eb 100644
--- a/Build/source/texk/dvipsk/scanpage.c
+++ b/Build/source/texk/dvipsk/scanpage.c
@@ -39,7 +39,7 @@ extern Boolean noomega ;
* use a single string instead of an array with integers in the PostScript.)
*/
Boolean
-prescanchar P1C(chardesctype *, cd)
+prescanchar(chardesctype *cd)
{
register quarterword *cras ;
register integer thischar ;
@@ -95,7 +95,7 @@ prescanchar P1C(chardesctype *, cd)
* in order to keep this font from overflowing VM.
*/
Boolean
-preselectfont P1C(fontdesctype *, f)
+preselectfont(fontdesctype *f)
{
curfnt = f ;
if (curfnt->loaded == 0 || curfnt->loaded == 3) {
@@ -104,7 +104,7 @@ preselectfont P1C(fontdesctype *, f)
loadfont(curfnt) ;
}
if (curfnt->psname == 0) {
- if (curfnt->loaded < 2) /* virtual font costs nothing (yet) */
+ if (curfnt->loaded < 2) { /* virtual font costs nothing (yet) */
if (curfnt->resfont)
fontmem -= PSFONTCOST ;
else {
@@ -112,6 +112,7 @@ preselectfont P1C(fontdesctype *, f)
if (curfnt->loadeddpi != curfnt->dpi)
fontmem -= 48 ; /* for the new font matrix */
}
+ }
curfnt->psname = 1 ;
if (fontmem <= pagecost) {
if (pagecount > 0)
@@ -124,7 +125,7 @@ preselectfont P1C(fontdesctype *, f)
* Now our scanpage routine.
*/
short
-scanpage P1H(void)
+scanpage(void)
{
register shalfword cmd ;
register chardesctype *cd ;
diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c
index 1f525db5c65..091f7de9c3f 100644
--- a/Build/source/texk/dvipsk/search.c
+++ b/Build/source/texk/dvipsk/search.c
@@ -5,6 +5,8 @@
* indicate substitution of the default path list at that point.
*/
#include "dvips.h" /* The copyright notice in that file is included too! */
+#include "protos.h"
+
#ifdef KPATHSEA
#include <kpathsea/c-ctype.h>
#include <kpathsea/tex-file.h>
@@ -24,8 +26,6 @@ extern char *getenv();
FILE *fat_fopen();
#endif
-extern char *newstring P1H(char *) ;
-
#if defined(SYSV) || defined(VMS) || defined(__THINK__) || defined(MSDOS) || defined(OS2) || defined(ATARIST) || defined(WIN32)
#define MAXPATHLEN (2000)
#else
@@ -79,7 +79,7 @@ int to_close ;
char *realnameoffile ;
FILE *
-search P3C(kpse_file_format_type, format, char *, file, char *, mode)
+search(kpse_file_format_type format, char *file, char *mode)
{
FILE *ret;
string found_name;
@@ -149,8 +149,7 @@ search P3C(kpse_file_format_type, format, char *, file, char *, mode)
} /* end search */
FILE *
-pksearch P6C(char *, path, char *, file, char *, mode,
- halfword, dpi, char **, name_ret, int *, dpi_ret)
+pksearch(char *file, char *mode, halfword dpi, char **name_ret, int *dpi_ret)
{
FILE *ret;
kpse_glyph_file_type font_file;
@@ -182,7 +181,7 @@ char realnameoffile[MAXPATHLEN] ;
extern char *figpath, *pictpath, *headerpath ;
FILE *
-search P3C(char *, path, char *, file, char *, mode)
+search(char *path, char *file, char *mode)
{
register char *nam ; /* index into fname */
register FILE *fd ; /* file desc of file */
@@ -378,8 +377,8 @@ if (strchr(nam,'=') != NULL) {
} /* end search */
FILE *
-pksearch P6C(char *, path, char *, file, char *, mode,
- char *, n, halfword, dpi, halfword, vdpi)
+pksearch(char *path, char *file, char *mode,
+ char *n, halfword dpi, halfword vdpi)
{
register char *nam ; /* index into fname */
register FILE *fd ; /* file desc of file */
@@ -538,7 +537,8 @@ pksearch P6C(char *, path, char *, file, char *, mode,
# ifdef VMCMS /* IBM: VM/CMS */
# define fopen cmsfopen
# endif /* IBM: VM/CMS */
-FILE *my_real_fopen P2C(register char *, n, register char *, t)
+FILE *
+my_real_fopen(register char *n, register char *t)
{
FILE *tf ;
if (dd(D_FILES)) {
@@ -561,7 +561,8 @@ FILE *my_real_fopen P2C(register char *, n, register char *, t)
#ifdef OS2
/* truncate filename at end of fname to FAT filesystem 8.3 limit */
/* if truncated, return fopen() with new name */
-FILE *fat_fopen P2C(char *, fname, char *, t)
+FILE *
+fat_fopen(char *fname, char *t)
{
char *np; /* pointer to name within path */
char nbuf[13], *ns, *nd;
@@ -630,7 +631,8 @@ FILE *fat_fopen P2C(char *, fname, char *, t)
}
#endif
-int close_file P1C(FILE *, f)
+int
+close_file(FILE *f)
{
switch(to_close) {
case USE_PCLOSE: return pclose(f) ;
diff --git a/Build/source/texk/dvipsk/skippage.c b/Build/source/texk/dvipsk/skippage.c
index 71a8670bc05..2d0f6a145bb 100644
--- a/Build/source/texk/dvipsk/skippage.c
+++ b/Build/source/texk/dvipsk/skippage.c
@@ -23,7 +23,7 @@ extern FILE *dvifile ;
* And now the big routine.
*/
void
-skippage P1H(void)
+skippage(void)
{
register shalfword cmd ;
register integer i ;
diff --git a/Build/source/texk/dvipsk/t1part.c b/Build/source/texk/dvipsk/t1part.c
index faffe540349..cf917488026 100644
--- a/Build/source/texk/dvipsk/t1part.c
+++ b/Build/source/texk/dvipsk/t1part.c
@@ -65,8 +65,8 @@ int CharCount;
int GridCount;
int ind_ref;
-int LoadVector P2H(int, CHAR *) ;
-int Afm P1H(void) ;
+int LoadVector(int, CHAR *) ;
+int Afm(void) ;
typedef struct
{
@@ -281,8 +281,8 @@ struct def_label label[NUM_LABEL];
-int DefTypeFont
-P1C(unsigned char *,name)
+int
+DefTypeFont(unsigned char *name)
{
int i;
@@ -294,8 +294,8 @@ P1C(unsigned char *,name)
return -1;
}
-int GetZeroLine
-P1C(unsigned char *, str)
+int
+GetZeroLine(unsigned char *str)
{
int token_type=0;
if(*str!='0')
@@ -316,8 +316,8 @@ P1C(unsigned char *, str)
/* We get token type and its content for ASCII code */
-int GetWord
-P1C(unsigned char *, mem)
+int
+GetWord(unsigned char *mem)
{
int token_type=0;
register unsigned char *tmp;
@@ -375,7 +375,8 @@ P1C(unsigned char *, mem)
/* We get token type and its content for BINARY code */
-int GetToken P1H(void)
+int
+GetToken(void)
{
register unsigned char *tmp;
int token_type=0;
@@ -412,7 +413,8 @@ int GetToken P1H(void)
return(token_type= -1);
}
-int GetNum P1H(void)
+int
+GetNum(void)
{
unsigned char *tmp;
tmp=token;
@@ -435,7 +437,8 @@ int GetNum P1H(void)
/* We pass token without definition its type, it's for speed */
-int PassToken P1H(void)
+int
+PassToken(void)
{
while(temp < end_of_scan)
{
@@ -454,8 +457,8 @@ int PassToken P1H(void)
/* Simple pass off without charstring decrypting */
/* */
-int PassString
-P1C(unsigned char, flg)
+int
+PassString(unsigned char flg)
{
int len_str;
@@ -482,8 +485,8 @@ P1C(unsigned char, flg)
return 1;
}
-void *getmem
-P1C(unsigned, size)
+void *
+getmem(unsigned size)
{
void *tmp;
if ((tmp = calloc(1, size)) == NULL)
@@ -494,7 +497,8 @@ P1C(unsigned, size)
return tmp;
}
-CHAR *AddChar P3C(CHAR *, TmpChar, unsigned char *, CharName, int, num)
+CHAR *
+AddChar(CHAR *TmpChar, unsigned char *CharName, int num)
{
int length;
@@ -510,7 +514,8 @@ CHAR *AddChar P3C(CHAR *, TmpChar, unsigned char *, CharName, int, num)
}
-void AddStr P2C(unsigned char *, name, int, num)
+void
+AddStr(unsigned char *name, int num)
{
int length;
@@ -527,7 +532,8 @@ void AddStr P2C(unsigned char *, name, int, num)
/* We prepare own encoding vector for output */
-void RevChar P1C(CHAR *, TmpChar)
+void
+RevChar(CHAR *TmpChar)
{
int i;
CHAR *ThisChar = TmpChar;
@@ -556,8 +562,8 @@ void RevChar P1C(CHAR *, TmpChar)
/* And here we produce own resulting encoding vector for partial font */
-void OutChar
-P2C(CHAR *, TmpChar, FILE *, fout)
+void
+OutChar(CHAR *TmpChar, FILE *fout)
{
CHAR *ThisChar = TmpChar;
@@ -583,7 +589,8 @@ P2C(CHAR *, TmpChar, FILE *, fout)
/* We prepare strings list for output */
-void Reeverse P1C(STRING *, TmpStr)
+static void
+Reeverse(STRING *TmpStr)
{
int tmp;
@@ -612,8 +619,8 @@ void Reeverse P1C(STRING *, TmpStr)
/* And here we post strings to out */
-void OutStr
-P2C(STRING *, TmpStr, FILE *, fout)
+void
+OutStr(STRING *TmpStr, FILE *fout)
{
STRING *ThisStr = TmpStr;
if(encode==AFM_ENC)
@@ -633,7 +640,8 @@ P2C(STRING *, TmpStr, FILE *, fout)
-void PrintChar P1C(CHAR *, TmpChar)
+void
+PrintChar(CHAR *TmpChar)
{
CHAR *ThisChar = TmpChar;
while (ThisChar != NULL)
@@ -649,7 +657,8 @@ void PrintChar P1C(CHAR *, TmpChar)
}
-int ClearB P1H(void)
+int
+ClearB(void)
{
CHAR *ThisChar = FirstCharB;
while (ThisChar != NULL)
@@ -663,8 +672,8 @@ int ClearB P1H(void)
/* We mark chars in encoding vector thanks same names from
reencoding vector */
-int ChooseChar
-P2C(unsigned char *, name, CHAR *, TmpChar)
+int
+ChooseChar(unsigned char *name, CHAR *TmpChar)
{
int length;
CHAR *ThisChar = TmpChar;
@@ -706,8 +715,8 @@ P2C(unsigned char *, name, CHAR *, TmpChar)
/* We find index in label array for char, wich is required
for compose char, if it uses SEAC command */
-int FindSeac
-P1C(int, num)
+int
+FindSeac(int num)
{
int i;
@@ -722,9 +731,10 @@ P1C(int, num)
}
-void ClearCW P1H(CHAR *);
+void ClearCW(CHAR *);
-int FindCharW P2C(unsigned char *, name, int, length)
+int
+FindCharW(unsigned char *name, int length)
{
CHAR *ThisChar = FirstCharW;
@@ -792,8 +802,8 @@ int FindCharW P2C(unsigned char *, name, int, length)
}
-void ClearCW
-P1C(CHAR *, ThisChar)
+void
+ClearCW(CHAR *ThisChar)
{
if (ThisChar == FirstCharW)
@@ -818,8 +828,8 @@ P1C(CHAR *, ThisChar)
/* We build temporary 'work' encoding vector only for searching
needed chars */
-int WorkVect
-P1C(CHAR *, TmpChar)
+int
+WorkVect(CHAR *TmpChar)
{
while (TmpChar != NULL) {
{
@@ -838,7 +848,8 @@ P1C(CHAR *, TmpChar)
}
-void UnDefineCharsW P1H(void)
+void
+UnDefineCharsW(void)
{
CHAR *ThisChar = FirstCharW;
while (ThisChar != NULL)
@@ -851,7 +862,8 @@ void UnDefineCharsW P1H(void)
CharCount = 0;
}
-CHAR * UnDefineChars P1C(CHAR *, TmpChar)
+CHAR *
+UnDefineChars(CHAR *TmpChar)
{
CHAR *ThisChar = TmpChar;
while (ThisChar != NULL)
@@ -868,7 +880,8 @@ CHAR * UnDefineChars P1C(CHAR *, TmpChar)
-void UnDefineStr P1H(void)
+void
+UnDefineStr(void)
{
STRING *ThisStr = FirstStr;
while (ThisStr != NULL)
@@ -887,7 +900,8 @@ void UnDefineStr P1H(void)
/* We mark subroutines without charstring decrypting */
/* */
-void ScanSubrs P1C(int, i)
+void
+ScanSubrs(int i)
{
int err_num;
int word_type = 0;
@@ -954,8 +968,9 @@ void ScanSubrs P1C(int, i)
}
}
-void ViewReturnCall P5C(int, num_err, int, top, int *,
- pstack, int, j, int, depth)
+void
+ViewReturnCall(int num_err, int top, int *pstack,
+ int j, int depth)
{
int k,m;
@@ -1018,8 +1033,8 @@ void ViewReturnCall P5C(int, num_err, int, top, int *,
/* We decrypt charstring with recursive descent */
/* */
-int DeCodeStr
-P2C(int, num, int, numseac)
+int
+DeCodeStr(int num, int numseac)
{
unsigned int loccr;
unsigned char byte;
@@ -1292,7 +1307,8 @@ P2C(int, num, int, numseac)
/* */
-void ScanChars P1C(int, i)
+void
+ScanChars(int i)
{
int word_type=0;
@@ -1461,14 +1477,16 @@ void ScanChars P1C(int, i)
}
}
-void LastLook P1H(void)
+void
+LastLook(void)
{
label[number].begin = temp;
label[number].select = FLG_BINARY;
number++;
}
-int FindKeyWord P2C(int, First_Key, int, lastkey)
+int
+FindKeyWord(int First_Key, int lastkey)
{
int word_type=0;
int i;
@@ -1514,7 +1532,8 @@ int FindKeyWord P2C(int, First_Key, int, lastkey)
/* To increase scan speed we use dynamic range of keywords */
-int ScanBinary P1H(void)
+int
+ScanBinary(void)
{
int i;
int firstnum, lastnum;
@@ -1572,8 +1591,8 @@ int ScanBinary P1H(void)
}
}
-unsigned char *itoasp
-P3C(int, n, unsigned char *, s, int, len)
+unsigned char *
+itoasp(int n, unsigned char *s, int len)
{
static int i, j;
@@ -1594,7 +1613,8 @@ P3C(int, n, unsigned char *, s, int, len)
return NULL;
}
-void SubstNum P1H(void)
+void
+SubstNum(void)
{
int i, j;
@@ -1610,7 +1630,8 @@ void SubstNum P1H(void)
}
}
-ub4 little4 P1C(ub1 *, buff)
+ub4
+little4(ub1 *buff)
{
return (ub4) buff[0] +
((ub4) buff[1] << 8) +
@@ -1622,7 +1643,8 @@ unsigned short int c1 = C1, c2 = C2;
unsigned short int edr;
-unsigned char CDeCrypt P2C(unsigned char, cipher, unsigned int *, lcdr)
+unsigned char
+CDeCrypt(unsigned char cipher, unsigned int *lcdr)
{
register unsigned char plain;
@@ -1639,8 +1661,8 @@ unsigned short int eer;
*/
-int EndOfEncoding
-P1C(int, err_num)
+int
+EndOfEncoding(int err_num)
{
int j;
@@ -1721,7 +1743,8 @@ P1C(int, err_num)
in non StandardEncoding */
-void CorrectGrid P1H(void)
+void
+CorrectGrid(void)
{
int i, j, k, imax;
@@ -1741,7 +1764,8 @@ void CorrectGrid P1H(void)
}
/* We build vector for non StandardEncoding */
-int CharEncoding P1H(void)
+int
+CharEncoding(void)
{
int err_token=0;
int num=0;
@@ -1792,7 +1816,8 @@ int CharEncoding P1H(void)
-void FindEncoding P1H(void)
+void
+FindEncoding(void)
{
int num_err=0;
int tmpnum;
@@ -1844,7 +1869,8 @@ void FindEncoding P1H(void)
reencode them if there is reencoding vector for this case and
build work vector */
-void CheckChoosing P1H(void)
+void
+CheckChoosing(void)
{
CHAR *TmpChar;
@@ -1930,7 +1956,8 @@ void CheckChoosing P1H(void)
* what we've done.
*/
-char *KillUnique P1C(char *, s)
+static char *
+KillUnique(char *s)
{
char *r = strstr(s, "/UniqueID") ;
if (r) {
@@ -1940,7 +1967,8 @@ char *KillUnique P1C(char *, s)
return s ;
}
-void OutASCII P3C(FILE *, fout, ub1 *, buff, ub4, len)
+void
+OutASCII(FILE *fout, ub1 *buff, ub4 len)
{
ub4 i;
@@ -1981,7 +2009,8 @@ void OutASCII P3C(FILE *, fout, ub1 *, buff, ub4, len)
/* It's eexec decription for PFB format */
-void BinEDeCrypt P2C(ub1 *, buff, ub4, len)
+void
+BinEDeCrypt(ub1 *buff, ub4 len)
{
ub4 i;
@@ -1995,7 +2024,8 @@ void BinEDeCrypt P2C(ub1 *, buff, ub4, len)
/* And it's eexec decription for PFA format */
-void HexEDeCrypt P1C(unsigned char *, mem)
+void
+HexEDeCrypt(unsigned char *mem)
{
int ch1, ch2, cipher;
@@ -2028,7 +2058,8 @@ void HexEDeCrypt P1C(unsigned char *, mem)
}
}
-int PartialPFA P2C(FILE *, fin, FILE *, fout)
+int
+PartialPFA(FILE *fin, FILE *fout)
{
ub1 type;
ub4 memory, addmemory, length, add_of_len;
@@ -2135,8 +2166,8 @@ int PartialPFA P2C(FILE *, fin, FILE *, fout)
#define NEXT_BINARY 3
#define NEXT_ASCII 4
-int PartialPFB
-P2C(FILE *, fin, FILE *, fout)
+int
+PartialPFB(FILE *fin, FILE *fout)
{
ub1 type;
ub4 t_length, length, nread;
@@ -2275,8 +2306,8 @@ P2C(FILE *, fin, FILE *, fout)
}
}
-void OutHEX
-P1C(FILE *, fout)
+void
+OutHEX(FILE *fout)
{
int i=0;
int num;
@@ -2326,7 +2357,8 @@ P1C(FILE *, fout)
/* We parse AFM file only if we've received errors after
parsing of own vector */
-int Afm P1H(void)
+int
+Afm(void)
{
unsigned char afmfile[100];
FILE *fafm;
@@ -2423,8 +2455,9 @@ int Afm P1H(void)
return -2;
}
-int FontPart P3C(FILE *, fout, unsigned char *, fontfile,
- unsigned char *, vectfile )
+int
+FontPart(FILE *fout, unsigned char *fontfile,
+ unsigned char *vectfile)
{
FILE *fin=0;
int num;
@@ -2537,7 +2570,8 @@ int FontPart P3C(FILE *, fout, unsigned char *, fontfile,
-int LoadVector P2C(int, num, CHAR *, TmpChar)
+int
+LoadVector(int num, CHAR *TmpChar)
{
FILE *fvect;
@@ -2643,8 +2677,8 @@ int LoadVector P2C(int, num, CHAR *, TmpChar)
}
}
-int ChooseVect
-P1C(CHAR *, tmpChar)
+int
+ChooseVect(CHAR *tmpChar)
{
CHAR *ThisChar = tmpChar;
@@ -2666,8 +2700,8 @@ P1C(CHAR *, tmpChar)
}
-void ErrorOfScan
-P1C(int, err)
+void
+ErrorOfScan(int err)
{
switch(err)
{
@@ -2703,7 +2737,8 @@ P1C(int, err)
}
}
-void NameOfProgram P1H(void)
+void
+NameOfProgram(void)
{
#ifdef DVIPS
fprintf(stderr,"This is DVIPS, t1part module \n");
diff --git a/Build/source/texk/dvipsk/tfmload.c b/Build/source/texk/dvipsk/tfmload.c
index abe3e0af83c..55f23e913dd 100644
--- a/Build/source/texk/dvipsk/tfmload.c
+++ b/Build/source/texk/dvipsk/tfmload.c
@@ -28,7 +28,7 @@ FILE *tfmfile ;
static char name[50] ;
void
-badtfm P1C(char *, s)
+badtfm(char *s)
{
(void)sprintf(errbuf,"! Bad TFM file %s: %s",name,s) ;
error(errbuf);
@@ -39,7 +39,7 @@ badtfm P1C(char *, s)
* and complains loudly about it.
*/
void
-tfmopen P1C(register fontdesctype *, fd)
+tfmopen(register fontdesctype *fd)
{
register char *n;
#ifdef KPATHSEA
@@ -92,13 +92,13 @@ tfmopen P1C(register fontdesctype *, fd)
}
shalfword
-tfmbyte P1H(void)
+tfmbyte(void)
{
return(getc(tfmfile)) ;
}
halfword
-tfm16 P1H(void)
+tfm16(void)
{
register halfword a ;
a = tfmbyte () ;
@@ -106,7 +106,7 @@ tfm16 P1H(void)
}
integer
-tfm32 P1H(void)
+tfm32(void)
{
register integer a ;
a = tfm16 () ;
@@ -115,7 +115,7 @@ tfm32 P1H(void)
}
int
-tfmload P1C(register fontdesctype *, curfnt)
+tfmload(register fontdesctype *curfnt)
{
register integer i, j ;
register integer li, cd=0 ;
diff --git a/Build/source/texk/dvipsk/unpack.c b/Build/source/texk/dvipsk/unpack.c
index de5e41a67df..9d28f0d1f8a 100644
--- a/Build/source/texk/dvipsk/unpack.c
+++ b/Build/source/texk/dvipsk/unpack.c
@@ -27,7 +27,7 @@ static quarterword *p ;
*/
shalfword
-getnyb P1H(void)
+getnyb(void)
{
if ( bitweight == 0 )
{ bitweight = 16 ;
@@ -39,7 +39,7 @@ getnyb P1H(void)
}
Boolean
-getbit P1H(void)
+getbit(void)
{
bitweight >>= 1 ;
if ( bitweight == 0 )
@@ -49,7 +49,8 @@ getbit P1H(void)
return(*p & bitweight) ;
}
-long pkpackednum P1H(void) {
+long
+pkpackednum(void) {
register halfword i;
register long j ;
i = getnyb () ;
@@ -74,7 +75,8 @@ long pkpackednum P1H(void) {
}
}
-void flip P2C(register char *, s, register long, howmany)
+void
+flip(register char *s, register long howmany)
{
register char t ;
@@ -91,8 +93,8 @@ void flip P2C(register char *, s, register long, howmany)
*/
static halfword bftest = 1 ;
long
-unpack P5C(quarterword *, pack, halfword *, raster,
- halfword, cwidth, halfword, cheight, halfword, cmd)
+unpack(quarterword *pack, halfword *raster,
+ halfword cwidth, halfword cheight, halfword cmd)
{
register integer i, j ;
shalfword wordwidth ;
diff --git a/Build/source/texk/dvipsk/virtualfont.c b/Build/source/texk/dvipsk/virtualfont.c
index db0aa32affb..f0af248961a 100644
--- a/Build/source/texk/dvipsk/virtualfont.c
+++ b/Build/source/texk/dvipsk/virtualfont.c
@@ -38,14 +38,14 @@ extern Boolean noomega ;
static FILE *vffile ;
static char name[50] ;
void
-badvf P1C(char *, s)
+badvf(char *s)
{
(void)sprintf(errbuf,"! Bad VF file %s: %s",name,s) ;
error(errbuf);
}
shalfword
-vfbyte P1H(void)
+vfbyte(void)
{
register shalfword i ;
@@ -55,7 +55,7 @@ vfbyte P1H(void)
}
integer
-vfquad P1H(void)
+vfquad(void)
{
register integer i ;
@@ -69,7 +69,7 @@ vfquad P1H(void)
}
integer
-vftrio P1H(void)
+vftrio(void)
{
register integer i ;
@@ -80,7 +80,7 @@ vftrio P1H(void)
}
int
-vfopen P1C(register fontdesctype *, fd)
+vfopen(register fontdesctype *fd)
{
register char *n ;
#ifndef KPATHSEA
@@ -118,7 +118,7 @@ vfopen P1C(register fontdesctype *, fd)
* The following routine is like fontdef, but for local fontdefs in VF files.
*/
fontmaptype *
-vfontdef P2C(integer, s, int, siz)
+vfontdef(integer s, int siz)
{
register integer i, j, fn ;
register fontdesctype *fp ;
@@ -162,7 +162,7 @@ vfontdef P2C(integer, s, int, siz)
* Now our virtualfont routine.
*/
Boolean
-virtualfont P1C(register fontdesctype *, curfnt)
+virtualfont(register fontdesctype *curfnt)
{
register integer i ;
register shalfword cmd ;
diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c
index 7f276b88d6f..d28f2a3936f 100644
--- a/Build/source/texk/dvipsk/writet1.c
+++ b/Build/source/texk/dvipsk/writet1.c
@@ -47,6 +47,7 @@ extern char *fb_array;
#else /* writet1 used with dvips */
#include "dvips.h"
+#include "protos.h"
#include "ptexmac.h"
#undef fm_extend
#define fm_extend(f) 0
@@ -109,8 +110,7 @@ static char notdef[] = ".notdef";
static size_t last_ptr_index;
#endif /* pdfTeX */
-#include <kpathsea/c-vararg.h>
-#include <kpathsea/c-proto.h>
+#include <stdarg.h>
#define t1_getchar() getc(t1_file)
#define t1_ungetchar(c) ungetc(c, t1_file)
@@ -303,7 +303,7 @@ static void pdftex_warn(char *fmt,...)
#define HEXLINE_WIDTH 64
-static void end_hexline()
+static void end_hexline(void)
{
if (hexline_length == HEXLINE_WIDTH) {
fputs("\n", bitfile);
@@ -1071,7 +1071,8 @@ static boolean t1_open_fontfile(char *open_name_prefix)
if (subr >= subr_size || subr < 0) \
pdftex_fail("Subrs array: entry index out of range (%i)", subr);
-static const char **check_cs_token_pair()
+static const char **
+check_cs_token_pair(void)
{
const char **p = (const char**) cs_token_pairs_list;
for (; p[0] != NULL; ++p)
@@ -1224,7 +1225,7 @@ static void cs_warn(const char *cs_name, int subr, const char *fmt,...)
static void append_cs_return(cs_entry *ptr)
{
unsigned short cr;
- int i, k;
+ int i;
byte *p, *q, *data, *new_data;
assert(ptr != NULL && ptr->valid && ptr->used);
@@ -1577,9 +1578,9 @@ static void t1_flush_cs(boolean is_subr)
t1_putline();
/* create return_cs to replace unsused subr's */
+ cs_len = 0;
if (is_subr) {
cr = 4330;
- cs_len = 0;
/* at this point we have t1_lenIV >= 0;
* a negative value would be caught in t1_scan_param() */
return_cs = xtalloc(t1_lenIV + 1, byte);
@@ -1769,7 +1770,7 @@ void writet1(void)
t1_close_font_file(">");
}
-void t1_free()
+void t1_free(void)
{
xfree(t1_line_array);
xfree(t1_buf_array);