ref: f342f5a5600a41bcf634e59af2a8f951cb24afb6
parent: 724f34cd1635f96b5ae4a2d98addfd5b96c6b085
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Apr 19 16:13:02 EDT 2021
nop static funcs for ops
--- a/mkfile
+++ b/mkfile
@@ -23,6 +23,7 @@
misc.$O\
name.$O\
object.$O\
+ op.$O\
pdf.$O\
pdffs.$O\
predict.$O\
--- a/op.c
+++ b/op.c
@@ -7,8 +7,7 @@
Nonstroking = 1<<1,
Leading = 1<<2,
Nextline = 1<<3,
-
- N = -1,
+ TwTc = 1<<4,
};
typedef struct Op Op;
@@ -21,15 +20,663 @@
};
static int
+cobegin(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+coend(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
gspush(Op *op, Object *argv)
{
+ USED(op, argv);
+ return 0;
}
static int
gspop(Op *op, Object *argv)
{
+ USED(op, argv);
+ return 0;
}
+static int
+gsctm(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gswidth(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gscap(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsjoin(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsmiterlim(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsdash(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsintent(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsflatness(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+gsstate(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+pcmove(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+pcline(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+pccurve(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+pcsubpath(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+pcrect(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppstroke(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppstrokec(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppfill(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppfills(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppfillcfs(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ppc(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+cpclip(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+cspace(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ccolour(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ccolour2(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+cgray(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+crgb(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+ccmyk(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+sshade(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+eoobject(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+iibegin(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+iidata(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+iiend(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tsspace(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tswspace(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tshscale(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tslead(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tsfontsz(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tsrendmode(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tsrise(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tobegin(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+toend(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tpmove(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tpmatrix(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+tpmove0(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+thshow(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+thshowarr(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t3width(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t3widthbb(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4add(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4sub(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4mul(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4div(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4idiv(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4mod(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4neg(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4abs(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4ceiling(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4floor(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4round(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4truncate(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4sqrt(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4sin(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4cos(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4atan(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4exp(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4ln(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4log(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4cvi(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4cvr(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4eq(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4ne(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4gt(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4ge(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4lt(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4le(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4and(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4or(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4xor(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4not(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4bitshift(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4true(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4false(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4if(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4ifelse(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4pop(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4exch(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4dup(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4copy(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4index(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
+static int
+t4roll(Op *op, Object *argv)
+{
+ USED(op, argv);
+ return 0;
+}
+
static Op ops[] = {
/* 7.8.2 Compatibility operators */
{"BX", cobegin, 0,}, /* begin a compatilibity section */
@@ -76,10 +723,10 @@
/* 8.6.8 Colour operators */
{"CS", cspace, 1,}, /* colour space */
{"cs", cspace, 1, Nonstroking,}, /* colour space, nonstroking */
- {"SC", ccolour, N,}, /* colour */
- {"sc", ccolour, N, Nonstroking,}, /* colour, nonstroking */
- {"SCN", ccolour2, N,}, /* color (more spaces) */
- {"scn", ccolour2, N,}, /* color (more spaces), nonstroking */
+ {"SC", ccolour, -1,}, /* colour */
+ {"sc", ccolour, -1, Nonstroking,}, /* colour, nonstroking */
+ {"SCN", ccolour2, -1,}, /* color (more spaces) */
+ {"scn", ccolour2, -1,}, /* color (more spaces), nonstroking */
{"G", cgray, 1,}, /* gray */
{"g", cgray, 1, Nonstroking,}, /* gray, nonstroking */
{"RG", crgb, 3,}, /* RGB */
@@ -138,7 +785,7 @@
{"neg", t4neg, 1,},
{"abs", t4abs, 1,},
{"ceiling", t4ceiling, 1,},
- {"floor, t4floor, 1,},
+ {"floor", t4floor, 1,},
{"round", t4round, 1,},
{"truncate", t4truncate, 1,},
{"sqrt", t4sqrt, 1,},