summaryrefslogtreecommitdiff
path: root/Build/source/texk/ps2pkm
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-22 14:33:57 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-22 14:33:57 +0000
commit8107063a61c46a037fc3b41315586714d8f168e4 (patch)
tree70260c87fd31b61d868d61e2c01b0679978dfbf6 /Build/source/texk/ps2pkm
parent3e2785aecd503a2883b01f915f12a9204ed421b7 (diff)
replace PVAR[1-3][CH], P[1-9][CH] and AA macros
by ANSI C function declarations and prototypes git-svn-id: svn://tug.org/texlive/trunk@13885 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pkm')
-rw-r--r--Build/source/texk/ps2pkm/ChangeLog6
-rw-r--r--Build/source/texk/ps2pkm/objects.c43
-rw-r--r--Build/source/texk/ps2pkm/objects.h6
-rw-r--r--Build/source/texk/ps2pkm/paths.c8
-rw-r--r--Build/source/texk/ps2pkm/type1.c106
5 files changed, 57 insertions, 112 deletions
diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog
index da2bb89b371..c3d70f608aa 100644
--- a/Build/source/texk/ps2pkm/ChangeLog
+++ b/Build/source/texk/ps2pkm/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * objects.c, objects.h: use ANSI C variadic function syntax.
+ * paths.c: use ANSI C prototypes instead of P[1-9]H.
+ * type1.c: use ANSI C prototypes instead of P[1-9]H or AA.
+
2009-06-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* regions.c, regions.h, t1imager.h:
diff --git a/Build/source/texk/ps2pkm/objects.c b/Build/source/texk/ps2pkm/objects.c
index 029fd946117..14abbbbf3f2 100644
--- a/Build/source/texk/ps2pkm/objects.c
+++ b/Build/source/texk/ps2pkm/objects.c
@@ -895,12 +895,14 @@ if it is already known that the object is temporary, it is faster to
just kill it rather than consume it, for example, KillSpace().
*/
-#ifdef KPATHSEA
-void Consume PVAR1C(int, n, ap)
+void
+Consume(int n, ...)
{
struct xobject *arg;
int i;
+ va_list ap;
+ va_start (ap, n);
for(i = 0; i < n; i++) {
arg = va_arg(ap, struct xobject *);
if (arg != NULL && !ISPERMANENT(arg->flag))
@@ -908,43 +910,8 @@ void Consume PVAR1C(int, n, ap)
}
va_end(ap);
return;
-}}
-#else
-void Consume(n, obj1, obj2, obj3) /* non-ANSI avoids overly strict type checking */
- int n;
- struct xobject *obj1,*obj2,*obj3;
-{
- switch(n) {
-
- case 0:
- return;
-
- case 1:
- if (obj1 != NULL && !ISPERMANENT(obj1->flag))
- Destroy(obj1);
- return;
-
- case 2:
- if (obj1 != NULL && !ISPERMANENT(obj1->flag))
- Destroy(obj1);
- if (obj2 != NULL && !ISPERMANENT(obj2->flag))
- Destroy(obj2);
- return;
-
- case 3:
- if (obj1 != NULL && !ISPERMANENT(obj1->flag))
- Destroy(obj1);
- if (obj2 != NULL && !ISPERMANENT(obj2->flag))
- Destroy(obj2);
- if (obj3 != NULL && !ISPERMANENT(obj3->flag))
- Destroy(obj3);
- return;
-
- default:
- t1_abort("Consume: too many objects");
- }
}
-#endif /* WIN32 */
+
/*
:h3.TypeErr() - Handles "Invalid Object Type" Errors
*/
diff --git a/Build/source/texk/ps2pkm/objects.h b/Build/source/texk/ps2pkm/objects.h
index 3a6020d0362..2b67f513832 100644
--- a/Build/source/texk/ps2pkm/objects.h
+++ b/Build/source/texk/ps2pkm/objects.h
@@ -76,11 +76,7 @@ void t1_Free(); /* free memory */
struct xobject *t1_Unique(); /* make a unique temporary copy of an object */
struct xobject *t1_ArgErr(); /* handle argument errors */
struct xobject *t1_TypeErr(); /* handle 'bad type' argument errors */
-#ifdef KPATHSEA
-void t1_Consume PVAR1H(int); /* consume a variable number of arguments */
-#else
-void t1_Consume(); /* consume a variable number of arguments */
-#endif
+void t1_Consume(int, ...); /* consume a variable number of arguments */
struct xobject *t1_Copy(); /* make a new copy, not reference bump PNM */
/*END SHARED*/
diff --git a/Build/source/texk/ps2pkm/paths.c b/Build/source/texk/ps2pkm/paths.c
index f6c39a3257c..d152de58e64 100644
--- a/Build/source/texk/ps2pkm/paths.c
+++ b/Build/source/texk/ps2pkm/paths.c
@@ -52,12 +52,8 @@ The included files are:
#include "strokes.h" /* understands how to coerce stroke paths */
#include "trig.h"
-#ifdef KPATHSEA
-static int UnClose P1H(struct segment *);
-extern void DumpText P1H(struct segment *);
-#else
-static Unclose();
-#endif
+static int UnClose(struct segment *);
+extern void DumpText(struct segment *);
/*
:h3.Routines Available to the TYPE1IMAGER User
diff --git a/Build/source/texk/ps2pkm/type1.c b/Build/source/texk/ps2pkm/type1.c
index 027bf1f6ce4..409ff2dcb54 100644
--- a/Build/source/texk/ps2pkm/type1.c
+++ b/Build/source/texk/ps2pkm/type1.c
@@ -165,69 +165,49 @@ static int *ModeP;
/* Unfortunately, there is such a function in the Win32 API */
#define Escape Type1Escape
#endif
-#ifdef KPATHSEA
-static void ComputeAlignmentZones P1H(void);
-static void InitStems P1H(void);
-static void FinitStems P1H(void);
-static void ComputeStem P1H(int stemno);
-static struct segment *Applyhint P3H(struct segment *p,int stemnumber,int half);
-static struct segment *Applyrevhint P3H(struct segment *p,int stemnumber,int half);
-static struct segment *FindStems P4H(DOUBLE x,DOUBLE y,DOUBLE dx,DOUBLE dy);
-static void ClearStack P1H(void);
-static void Push P1H(DOUBLE Num);
-static void ClearCallStack P1H(void);
-static void PushCall P3H(psobj *CurrStrP,int CurrIndex,unsigned short CurrKey);
-static void PopCall P3H(psobj **CurrStrPP ,int *CurrIndexP,unsigned short *CurrKeyP);
-static void ClearPSFakeStack P1H(void);
-static void PSFakePush P1H(DOUBLE Num);
-static DOUBLE PSFakePop P1H(void);
-static struct segment *CenterStem P2H(DOUBLE edge1,DOUBLE edge2);
-static unsigned char Decrypt P1H(unsigned char cipher);
-static int DoRead P1H(int *CodeP);
-static void StartDecrypt P1H(void);
-static void Decode P1H(int Code);
-static void DoCommand P1H(int Code);
-static void Escape P1H(int Code);
-static void HStem P2H(DOUBLE y,DOUBLE dy);
-static void VStem P2H(DOUBLE x,DOUBLE dx);
-static void RLineTo P2H(DOUBLE dx,DOUBLE dy);
-static void RRCurveTo P6H(DOUBLE dx1,DOUBLE dy1,DOUBLE dx2,DOUBLE dy2,DOUBLE dx3,DOUBLE dy3);
-static void DoClosePath P1H(void);
-static void CallSubr P1H(int subrno);
-static void Return P1H(void);
-static void EndChar P1H(void);
-static void RMoveTo P2H(DOUBLE dx,DOUBLE dy);
-static void DotSection P1H(void);
-static void Seac P5H(DOUBLE asb,DOUBLE adx,DOUBLE ady,unsigned char bchar,unsigned char achar);
-static void Sbw P4H(DOUBLE sbx,DOUBLE sby,DOUBLE wx,DOUBLE wy);
-static DOUBLE Div P2H(DOUBLE num1,DOUBLE num2);
-static void FlxProc AA((DOUBLE c1x2,DOUBLE c1y2,DOUBLE c3x0,DOUBLE c3y0,DOUBLE c3x1,DOUBLE c3y1,DOUBLE c3x2,DOUBLE c3y2,DOUBLE c4x0,DOUBLE c4y0,DOUBLE c4x1,DOUBLE c4y1,DOUBLE c4x2,DOUBLE c4y2,DOUBLE epY,DOUBLE epX,int idmin));
-static void FlxProc1 P1H(void);
-static void FlxProc2 P1H(void);
-static void HintReplace P1H(void);
-static void CallOtherSubr P1H(int othersubrno);
-static void SetCurrentPoint P2H(DOUBLE x,DOUBLE y);
-extern struct xobject *Type1Char AA((char *env,struct XYspace *S,psobj *charstrP,psobj *subrsP,psobj *osubrsP,struct blues_struct *bluesP,int *modeP));
-#else
-static DOUBLE Div();
-static DOUBLE PSFakePop();
-static DoCommand();
-static Escape();
-static HStem();
-static VStem();
-static RLineTo();
-static RRCurveTo();
-static DoClosePath();
-static CallSubr();
-static Return();
-static EndChar();
-static RMoveTo();
-static DotSection();
-static Seac();
-static Sbw();
-static CallOtherSubr();
-static SetCurrentPoint();
-#endif
+static void ComputeAlignmentZones(void);
+static void InitStems(void);
+static void FinitStems(void);
+static void ComputeStem(int stemno);
+static struct segment *Applyhint(struct segment *p,int stemnumber,int half);
+static struct segment *Applyrevhint(struct segment *p,int stemnumber,int half);
+static struct segment *FindStems(DOUBLE x,DOUBLE y,DOUBLE dx,DOUBLE dy);
+static void ClearStack(void);
+static void Push(DOUBLE Num);
+static void ClearCallStack(void);
+static void PushCall(psobj *CurrStrP,int CurrIndex,unsigned short CurrKey);
+static void PopCall(psobj **CurrStrPP ,int *CurrIndexP,unsigned short *CurrKeyP);
+static void ClearPSFakeStack(void);
+static void PSFakePush(DOUBLE Num);
+static DOUBLE PSFakePop(void);
+static struct segment *CenterStem(DOUBLE edge1,DOUBLE edge2);
+static unsigned char Decrypt(unsigned char cipher);
+static int DoRead(int *CodeP);
+static void StartDecrypt(void);
+static void Decode(int Code);
+static void DoCommand(int Code);
+static void Escape(int Code);
+static void HStem(DOUBLE y,DOUBLE dy);
+static void VStem(DOUBLE x,DOUBLE dx);
+static void RLineTo(DOUBLE dx,DOUBLE dy);
+static void RRCurveTo(DOUBLE dx1,DOUBLE dy1,DOUBLE dx2,DOUBLE dy2,DOUBLE dx3,DOUBLE dy3);
+static void DoClosePath(void);
+static void CallSubr(int subrno);
+static void Return(void);
+static void EndChar(void);
+static void RMoveTo(DOUBLE dx,DOUBLE dy);
+static void DotSection(void);
+static void Seac(DOUBLE asb,DOUBLE adx,DOUBLE ady,unsigned char bchar,unsigned char achar);
+static void Sbw(DOUBLE sbx,DOUBLE sby,DOUBLE wx,DOUBLE wy);
+static DOUBLE Div(DOUBLE num1,DOUBLE num2);
+static void FlxProc(DOUBLE c1x2,DOUBLE c1y2,DOUBLE c3x0,DOUBLE c3y0,DOUBLE c3x1,DOUBLE c3y1,DOUBLE c3x2,DOUBLE c3y2,DOUBLE c4x0,DOUBLE c4y0,DOUBLE c4x1,DOUBLE c4y1,DOUBLE c4x2,DOUBLE c4y2,DOUBLE epY,DOUBLE epX,int idmin);
+static void FlxProc1(void);
+static void FlxProc2(void);
+static void HintReplace(void);
+static void CallOtherSubr(int othersubrno);
+static void SetCurrentPoint(DOUBLE x,DOUBLE y);
+extern struct xobject *Type1Char(char *env,struct XYspace *S,psobj *charstrP,psobj *subrsP,psobj *osubrsP,struct blues_struct *bluesP,int *modeP);
+
/*****************************************/
/* statics for Flex procedures (FlxProc) */
/*****************************************/