summaryrefslogtreecommitdiff
path: root/Build/source/texk/ps2pkm/pkin.h
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/ps2pkm/pkin.h
parenta3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (diff)
texk 1
git-svn-id: svn://tug.org/texlive/trunk@1485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pkm/pkin.h')
-rw-r--r--Build/source/texk/ps2pkm/pkin.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/Build/source/texk/ps2pkm/pkin.h b/Build/source/texk/ps2pkm/pkin.h
new file mode 100644
index 00000000000..3bc9279a7cb
--- /dev/null
+++ b/Build/source/texk/ps2pkm/pkin.h
@@ -0,0 +1,61 @@
+/*
+ * NAME
+ * pkin.h - header file for readchar()
+ * SYNOPSIS
+ * #include "pkfile.h"
+ *
+ * int readchar(name, c, cd)
+ * char name[]; shalfword c; chardesc *cd;
+ * DESCRIPTION
+ * Readchar() opens the pkfile `name', checks if it's a legal pkfile,
+ * and reads the character description of `c' into `cd'. Readchar()
+ * returns TRUE (1) upon success, FALSE (0) if the character `c' is
+ * not found in the pkfile.
+ *
+ * Parameter `cd' is a pointer to a the following structure:
+ * typedef struct {
+ * integer charcode,
+ * cwidth, cheight,
+ * xoff, yoff;
+ * halfword *raster ;
+ * } chardesc ;
+ *
+ * Charcode is the code of the character returned, cwidth and cheight
+ * respectively the width and height of the character in pixels,
+ * xoff and yoff are the offsets of first pixel to the reference point
+ * of the character box.
+ * Raster is a pointer to the bitmap describing the character. This
+ * raster consists of cheight rows of (cwidth + 15) /16 words of
+ * 16 bits each. Each row contains from left to right all cwidth
+ * pixels of that row.
+ * WARNING
+ * If the machine has a default integer size of 16 bits, and 32-bit
+ * integers must be manipulated with %ld, be carefull!
+ * AUTHORS
+ * Piet Tutelaers
+ * rcpt@urc.tue.nl
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+/*
+ * Type declarations. integer must be a 32-bit signed; shalfword must
+ * be a sixteen-bit signed; halfword must be a sixteen-bit unsigned;
+ * quarterword must be an eight-bit unsigned.
+ */
+typedef long integer;
+typedef short shalfword ;
+typedef unsigned short halfword ;
+typedef unsigned char quarterword ;
+typedef short Boolean ;
+/*
+ * A chardesc describes an individual character.
+ */
+typedef struct {
+ integer charcode,
+ cwidth, cheight,
+ xoff, yoff;
+ halfword *raster ;
+} chardesc ;
+
+int readchar();