summaryrefslogtreecommitdiff
path: root/Build/source/texk/seetexk/dviclass.c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-17 21:41:51 +0000
committerKarl Berry <karl@freefriends.org>2006-01-17 21:41:51 +0000
commit487ca4806cc046076293cf6cc5fbba0db282bac7 (patch)
tree847b412ab5158dd7bdd7ed7e5a4cc3fbca94be32 /Build/source/texk/seetexk/dviclass.c
parenta3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (diff)
texk 1
git-svn-id: svn://tug.org/texlive/trunk@1485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/seetexk/dviclass.c')
-rw-r--r--Build/source/texk/seetexk/dviclass.c97
1 files changed, 97 insertions, 0 deletions
diff --git a/Build/source/texk/seetexk/dviclass.c b/Build/source/texk/seetexk/dviclass.c
new file mode 100644
index 00000000000..2897a00b7cf
--- /dev/null
+++ b/Build/source/texk/seetexk/dviclass.c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 1987, 1989 University of Maryland
+ * Department of Computer Science. All rights reserved.
+ * Permission to copy for any purpose is hereby granted
+ * so long as this copyright notice remains intact.
+ */
+
+#ifndef lint
+static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/dviclass.c,v 3.1 89/08/22 21:48:35 chris Exp $";
+#endif
+
+/*
+ * dviclass - DVI code classification tables.
+ */
+
+#include "dviclass.h"
+
+/* shorthand---in lowercase for contrast (read on!) */
+#define four(x) x, x, x, x
+#define six(x) four(x), x, x
+#define sixteen(x) four(x), four(x), four(x), four(x)
+#define sixty_four(x) sixteen(x), sixteen(x), sixteen(x), sixteen(x)
+#define one_twenty_eight(x) sixty_four(x), sixty_four(x)
+
+/*
+ * This table contains the byte length of the single operand, or DPL_NONE
+ * if no operand, or if it cannot be decoded this way.
+ *
+ * The sequences UNS1, UNS2, UNS3, SGN4 (`SEQ_U') and SGN1, SGN2, SGN3,
+ * SGN4 (`SEQ_S') are rather common, and so we define macros for these.
+ */
+#define SEQ_U DPL_UNS1, DPL_UNS2, DPL_UNS3, DPL_SGN4
+#define SEQ_S DPL_SGN1, DPL_SGN2, DPL_SGN3, DPL_SGN4
+
+char dvi_oplen[256] = {
+ one_twenty_eight(DPL_NONE),
+ /* characters 0 through 127 */
+ SEQ_U, /* DVI_SET1 through DVI_SET4 */
+ DPL_NONE, /* DVI_SETRULE */
+ SEQ_U, /* DVI_PUT1 through DVI_PUT4 */
+ DPL_NONE, /* DVI_PUTRULE */
+ DPL_NONE, /* DVI_NOP */
+ DPL_NONE, /* DVI_BOP */
+ DPL_NONE, /* DVI_EOP */
+ DPL_NONE, /* DVI_PUSH */
+ DPL_NONE, /* DVI_POP */
+ SEQ_S, /* DVI_RIGHT1 through DVI_RIGHT4 */
+ DPL_NONE, /* DVI_W0 */
+ SEQ_S, /* DVI_W1 through DVI_W4 */
+ DPL_NONE, /* DVI_X0 */
+ SEQ_S, /* DVI_X1 through DVI_X4 */
+ SEQ_S, /* DVI_DOWN1 through DVI_DOWN4 */
+ DPL_NONE, /* DVI_Y0 */
+ SEQ_S, /* DVI_Y1 through DVI_Y4 */
+ DPL_NONE, /* DVI_Z0 */
+ SEQ_S, /* DVI_Z1 through DVI_Z4 */
+ sixty_four(DPL_NONE), /* DVI_FNTNUM0 through DVI_FNTNUM63 */
+ SEQ_U, /* DVI_FNT1 through DVI_FNT4 */
+ SEQ_U, /* DVI_XXX1 through DVI_XXX4 */
+ SEQ_U, /* DVI_FNTDEF1 through DVI_FNTDEF4 */
+ DPL_NONE, /* DVI_PRE */
+ DPL_NONE, /* DVI_POST */
+ DPL_NONE, /* DVI_POSTPOST */
+ six(DPL_NONE) /* 250 through 255 */
+};
+
+char dvi_dt[256] = {
+ one_twenty_eight(DT_CHAR),
+ /* characters 0 through 127 */
+ four(DT_SET), /* DVI_SET1 through DVI_SET4 */
+ DT_SETRULE, /* DVI_SETRULE */
+ four(DT_PUT), /* DVI_PUT1 through DVI_PUT4 */
+ DT_PUTRULE, /* DVI_PUTRULE */
+ DT_NOP, /* DVI_NOP */
+ DT_BOP, /* DVI_BOP */
+ DT_EOP, /* DVI_EOP */
+ DT_PUSH, /* DVI_PUSH */
+ DT_POP, /* DVI_POP */
+ four(DT_RIGHT), /* DVI_RIGHT1 through DVI_RIGHT4 */
+ DT_W0, /* DVI_W0 */
+ four(DT_W), /* DVI_W1 through DVI_W4 */
+ DT_X0, /* DVI_X0 */
+ four(DT_X), /* DVI_X1 through DVI_X4 */
+ four(DT_DOWN), /* DVI_DOWN1 through DVI_DOWN4 */
+ DT_Y0, /* DVI_Y0 */
+ four(DT_Y), /* DVI_Y1 through DVI_Y4 */
+ DT_Z0, /* DVI_Z0 */
+ four(DT_Z), /* DVI_Z1 through DVI_Z4 */
+ sixty_four(DT_FNTNUM), /* DVI_FNTNUM0 through DVI_FNTNUM63 */
+ four(DT_FNT), /* DVI_FNT1 through DVI_FNT4 */
+ four(DT_XXX), /* DVI_XXX1 through DVI_XXX4 */
+ four(DT_FNTDEF), /* DVI_FNTDEF1 through DVI_FNTDEF4 */
+ DT_PRE, /* DVI_PRE */
+ DT_POST, /* DVI_POST */
+ DT_POSTPOST, /* DVI_POSTPOST */
+ six(DT_UNDEF) /* 250 through 255 */
+};