summaryrefslogtreecommitdiff
path: root/dviware/dvi2pcl/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvi2pcl/macros.h')
-rw-r--r--dviware/dvi2pcl/macros.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/dviware/dvi2pcl/macros.h b/dviware/dvi2pcl/macros.h
new file mode 100644
index 0000000000..2dc47421e9
--- /dev/null
+++ b/dviware/dvi2pcl/macros.h
@@ -0,0 +1,64 @@
+/* $Log: macros.h,v $
+ * Revision 0.8 92/11/23 19:47:03 19:47:03 bt (Bo Thide')
+ * Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
+ *
+ * Revision 0.7 92/11/13 02:41:18 02:41:18 bt (Bo Thide')
+ * More bug fixes and improvements. Support for PaintJet XL
+ *
+ * Revision 0.6 92/11/10 21:48:44 21:48:44 bt (Bo Thide')
+ * Bug fixes. Added -R option. Better font handling.
+ *
+ * Revision 0.5 92/11/09 16:25:50 16:25:50 bt (Bo Thide')
+ * Rewrite of dospecial.c. Extended \special support
+ *
+ * Revision 0.4 92/11/08 02:46:07 02:46:07 bt (Bo Thide')
+ * Changed to portable bit manipulations. Replaced strrstr for non-POSIX compliant C. Fixed numerous bugs. Added support for more \special's.
+ *
+ * Revision 0.3 92/08/24 12:45:29 12:45:29 bt (Bo Thide')
+ * Fixed 8 bit (dc font) support.
+ *
+ * Revision 0.2 92/08/23 17:28:53 17:28:53 bt (Bo Thide')
+ * Source cleaned up. Changed certain function calls. Removed globals.
+ *
+ * Revision 0.1 92/08/22 23:58:47 23:58:47 bt (Bo Thide')
+ * First Release.
+ * */
+
+/* Use the "," operator to ensure proper evaluation order */
+/* Help to fix bugs from Joel M. Hoffman <joel@wam.umd.edu> */
+
+#ifndef _DVI2PCL_MACROS_INCLUDED
+#define _DVI2PCL_MACROS_INCLUDED
+
+long _i;
+/* Get unsigned one-, two-, three-, or four-byte values from a file "f" */
+#define getubyte(f) (unsigned char)getc(f)
+#define getupair(f) (_i=getubyte(f),_i<<=8,_i|=getubyte(f))
+#define getutrio(f) (getupair(f),_i<<=8,_i|=getubyte(f))
+
+/* Get signed one-, two-, three-, or four-byte values from a file "f" */
+#define getsbyte(f) (char)getc(f)
+#define getspair(f) (_i=getsbyte(f),_i<<=8,_i|=getubyte(f))
+#define getstrio(f) (getspair(f),_i<<=8,_i|=getubyte(f))
+#define getsquad(f) (getstrio(f),_i<<=8,_i|=getubyte(f))
+
+/* Get unsigned one-, two-, three-, or four-byte values from a pointer "p" */
+#define getpubyte(p) ((unsigned char)*p++)
+#define getpupair(p) (_i=getpubyte(p),_i<<=8,_i|=getpubyte(p))
+#define getputrio(p) (getpupair(p),_i<<=8,_i|=getpubyte(p))
+#define getpuquad(p) (getputrio(p),_i<<=8,_i|=getpubyte(p))
+
+/* Get signed one-, two-, three-, or four-byte values from a pointer "p" */
+#define getpsbyte(p) ((char)*p++)
+#define getpspair(p) (_i=getpsbyte(p),_i<<=8,_i|getpubyte(p))
+#define getpstrio(p) (getpupair(p),_i<<=8,_i|getpubyte(p))
+#define getpsquad(p) (getputrio(p),_i<<=8,_i|getpubyte(p))
+
+double _f;
+#define round(f) (long)((_f = (f)) < 0.0 ? _f - 0.5 : _f + 0.5)
+
+/*
+#define rulepixels(x) (!(_a = round(convdot * x)) ? 1 : _a)
+*/
+
+#endif /* _DVI2PCL_MACROS_INCLUDED */