Back to index

tetex-bin  3.0
dvicodes.h
Go to the documentation of this file.
00001 /*  $Header$
00002 
00003     This is dvipdfm, a DVI to PDF translator.
00004     Copyright (C) 1998, 1999 by Mark A. Wicks
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019     
00020     The author may be contacted via the e-mail address
00021 
00022        mwicks@kettering.edu
00023 */
00024 
00025 /* DVI op codes */
00026 #define SET_CHAR_0 0
00027 #define SET_CHAR_1 1
00028 /* etc. */
00029 #define SET_CHAR_127 127
00030 #define SET1   128 /* Typesets its single operand between 128 and 255 */
00031 #define SET2   129 /* Typesets its single two byte unsigned operand */
00032 #define SET3   130 /* Typesets its single three byte unsigned operand */
00033 #define SET4   131 /* Typesets its single four byte unsigned operand */
00034 #define SET_RULE 132 /* Sets a rule of height param1(four bytes) and width param2(four bytes) */
00035                      /* These are *signed*.  Nothing typeset for nonpositive values */
00036                      /* However, negative value *do* change current point */
00037 #define PUT1   133 /* Like SET1, but point doesn't change */
00038 #define PUT2   134 /* Like SET2 */
00039 #define PUT3   135 /* Like SET3 */
00040 #define PUT4   136 /* Like SET4 */
00041 #define PUT_RULE 137 /* Like SET_RULE */
00042 #define NOP    138 
00043 #define BOP    139 /* Followed by 10 four byte count registers (signed?).  Last parameter points to */
00044                    /* previous BOP (backward linked, first BOP has -1).  BOP clears stack and resets current point. */
00045 #define EOP    140
00046 #define PUSH   141 /* Pushes h,v,w,x,y,z */
00047 #define POP    142 /* Opposite of push*/
00048 #define RIGHT1 143 /* Move right by one byte signed operand */
00049 #define RIGHT2 144 /* Move right by two byte signed operand */
00050 #define RIGHT3 145 /* Move right by three byte signed operand */
00051 #define RIGHT4 146 /* Move right by four byte signed operand */
00052 #define W0     147 /* Move right w */
00053 #define W1     148 /* w <- single byte signed operand.  Move right by same amount */
00054 #define W2     149 /* Same as W1 with two byte signed operand */
00055 #define W3     150 /* Three byte signed operand */
00056 #define W4     151 /* Four byte signed operand */
00057 #define X0     152 /* Move right x */
00058 #define X1     153 /* Like W1 */
00059 #define X2     154 /* Like W2 */
00060 #define X3     155 /* Like W3 */
00061 #define X4     156 /* Like W4 */
00062 #define DOWN1  157 /* Move down by one byte signed operand */
00063 #define DOWN2  158 /* Two byte signed operand */
00064 #define DOWN3  159 /* Three byte signed operand */
00065 #define DOWN4  160 /* Four byte signed operand */
00066 #define Y0     161 /* Move down by y */
00067 #define Y1     162 /* Move down by one byte signed operand, which replaces Y */
00068 #define Y2     163 /* Two byte signed operand */
00069 #define Y3     164 /* Three byte signed operand */
00070 #define Y4     165 /* Four byte signed operand */
00071 #define Z0     166 /* Like Y0, but use z */
00072 #define Z1     167 /* Like Y1 */
00073 #define Z2     168 /* Like Y2 */
00074 #define Z3     169 /* Like Y3 */
00075 #define Z4     170 /* Like Y4 */
00076 #define FNT_NUM_0 171 /* Switch to font 0 */
00077 #define FNT_NUM_1 172 /* Switch to font 1 */
00078 /* etc. */
00079 #define FNT_NUM_63 234 /* Switch to font 63 */
00080 #define FNT1       235 /* Switch to font described by single byte unsigned operand */
00081 #define FNT2       236 /* Switch to font described by two byte unsigned operand */
00082 #define FNT3       237 /* Three byte font descriptor */
00083 #define FNT4       238 /* Four byte operator (Knuth says signed, but what would be the point? */
00084 #define XXX1       239 /* Special.  Operand is one byte length.  Special follows immediately */
00085 #define XXX2       240 /* Two byte operand */
00086 #define XXX3       241 /* Three byte operand */ 
00087 #define XXX4       242 /* Four byte operand (Knuth says TeX uses only XXX1 and XXX4 */
00088 #define FNT_DEF1  243 /* One byte font number, four byte checksum, four byte magnified size (DVI units),
00089                           four byte designed size, single byte directory length, single byte name length,
00090                           followed by complete name (area+name) */
00091 #define FNT_DEF2  244 /* Same for two byte font number */
00092 #define FNT_DEF3  245 /* Same for three byte font number */
00093 #define FNT_DEF4  246 /* Four byte font number (Knuth says signed) */
00094 #define PRE        247 /* Preamble:
00095                               one byte DVI version (should be 2)
00096                               four byte unsigned numerator
00097                               four byte unsigned denominator -- one DVI unit = den/num*10^(-7) m
00098                               four byte magnification (multiplied by 1000)
00099                               one byte unsigned comment length followed by comment. */
00100 #define DVI_ID             2    /* ID Byte for current DVI file */
00101 #define POST       248  /* Postamble- -- similar to preamble
00102                               four byte pointer to final bop
00103                               four byte numerator
00104                               four byte denominator
00105                               four byte mag
00106                               four byte maximum height (signed?)
00107                               four byte maximum width 
00108                               two byte max stack depth required to process file
00109                               two byte number of pages */
00110 #define POST_POST  249  /* End of postamble
00111                               four byte pointer to POST command
00112                               Version byte (same as preamble)
00113                               Padded by four or more 223's to the end of the file. */
00114 #define PADDING    223
00115