Back to index

tetex-bin  3.0
commands.h
Go to the documentation of this file.
00001 /* commands.h */
00002 
00003 /************************************************************************
00004 
00005   Part of the dvipng distribution
00006 
00007   This program is free software; you can redistribute it and/or modify
00008   it under the terms of the GNU General Public License as published by
00009   the Free Software Foundation; either version 2 of the License, or
00010   (at your option) any later version.
00011 
00012   This program is distributed in the hope that it will be useful, but
00013   WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with this program; if not, write to the Free Software
00019   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00020   02111-1307, USA.
00021 
00022   Copyright (C) 2002-2005 Jan-Åke Larsson
00023 
00024 ************************************************************************/
00025 
00026 /* DVI COMMANDS */
00027 #define  DVIFORMAT     2
00028 
00029 #define  SETC_000         0     /* typeset character 0 and move right */
00030 #define  SETC_127       127     /* typeset character 127 and move right */
00031 #define  SET1           128     /* typeset a character and move right */
00032 #define  SET2           129     /* ??? */
00033 #define  SET3           130     /* ??? */
00034 #define  SET4           131     /* ??? */
00035 #define  SET_RULE       132     /* typeset a rule and move right */
00036 #define  PUT1           133     /* typeset a character */
00037 #define  PUT2           134     /* ??? */
00038 #define  PUT3           135     /* ??? */
00039 #define  PUT4           136     /* ??? */
00040 #define  PUT_RULE       137     /* typeset a rule */
00041 #define  NOP            138     /* no operation */
00042 #define  BOP            139     /* beginning of page */
00043 #define  EOP            140     /* ending of page */
00044 #define  PUSH           141     /* save the current positions */
00045 #define  POP            142     /* restore previous positions */
00046 #define  RIGHT1         143     /* move right */
00047 #define  RIGHT2         144     /* ??? */
00048 #define  RIGHT3         145     /* ??? */
00049 #define  RIGHT4         146     /* ??? */
00050 #define  W0             147     /* move right by |w| */
00051 #define  W1             148     /* move right and set |w| */
00052 #define  W2             149     /* ??? */
00053 #define  W3             150     /* ??? */
00054 #define  W4             151     /* ??? */
00055 #define  X0             152     /* move right by |x| */
00056 #define  X1             153     /* move right and set |x| */
00057 #define  X2             154     /* ??? */
00058 #define  X3             155     /* ??? */
00059 #define  X4             156     /* ??? */
00060 #define  DOWN1          157     /* move down */
00061 #define  DOWN2          158     /* ??? */
00062 #define  DOWN3          159     /* ??? */
00063 #define  DOWN4          160     /* ??? */
00064 #define  Y0             161     /* move down by |y| */
00065 #define  Y1             162     /* move down and set |y| */
00066 #define  Y2             163     /* ??? */
00067 #define  Y3             164     /* ??? */
00068 #define  Y4             165     /* ??? */
00069 #define  Z0             166     /* move down by |z| */
00070 #define  Z1             167     /* move down and set |z| */
00071 #define  Z2             168     /* ??? */
00072 #define  Z3             169     /* ??? */
00073 #define  Z4             170     /* ??? */
00074 #define  FONT_00        171     /* set current font to 0 */
00075 #define  FONT_63        234     /* set current font to 63 */
00076 #define  FNT1           235     /* set current font */
00077 #define  FNT2           236     /* Same as FNT1, except that arg is 2 bytes */
00078 #define  FNT3           237     /* Same as FNT1, except that arg is 3 bytes */
00079 #define  FNT4           238     /* Same as FNT1, except that arg is 4 bytes */
00080 #define  XXX1           239     /* extension to \.DVI primitives */
00081 #define  XXX2           240     /* Like XXX1, but 0<=k<65536 */
00082 #define  XXX3           241     /* Like XXX1, but 0<=k<@t$2^{24}$@> */
00083 #define  XXX4           242     /* potentially long extension to \.DVI
00084                                    primitives */
00085 #define  FNT_DEF1       243     /* define the meaning of a font number */
00086 #define  FNT_DEF2       244     /* ??? */
00087 #define  FNT_DEF3       245     /* ??? */
00088 #define  FNT_DEF4       246     /* ??? */
00089 #define  PRE            247     /* preamble */
00090 #define  POST           248     /* postamble beginning */
00091 #define  POST_POST      249     /* postamble ending */
00092 
00093 /*  undefined_commands           250,251,252,253,254,255 */
00094 
00095 EXTERN const int8_t dvi_commandlength[256] 
00096 #ifdef MAIN
00097 ={
00098   1,1,1,1,1,1,1,1,1,1,
00099   1,1,1,1,1,1,1,1,1,1,
00100   1,1,1,1,1,1,1,1,1,1,
00101   1,1,1,1,1,1,1,1,1,1,
00102   1,1,1,1,1,1,1,1,1,1,
00103   1,1,1,1,1,1,1,1,1,1,
00104   1,1,1,1,1,1,1,1,1,1,
00105   1,1,1,1,1,1,1,1,1,1,
00106   1,1,1,1,1,1,1,1,1,1,
00107   1,1,1,1,1,1,1,1,1,1,
00108   1,1,1,1,1,1,1,1,1,1,
00109   1,1,1,1,1,1,1,1,1,1,
00110   1,1,1,1,1,1,1,1,            /* SETC_000 --- SETC_127    */
00111   2,3,4,5,9,                  /* SET1 --- SET4, SET_RULE  */ 
00112   2,3,4,5,9,                  /* PUT1 --- PUT4, PUT_RULE  */ 
00113   1,45,1,1,1,                 /* NOP, BOP, EOP, PUSH, POP */
00114   2,3,4,5,                    /* RIGHT1 --- RIGHT4        */
00115   1,2,3,4,5,                  /* W0 --- W4                */
00116   1,2,3,4,5,                  /* X0 --- X4                */
00117   2,3,4,5,                    /* DOWN1 --- DOWN4          */
00118   1,2,3,4,5,                  /* Y0 --- Y4                */
00119   1,2,3,4,5,                  /* Z0 --- Z4                */
00120   1,1,1,1,1,1,1,1,1,1,
00121   1,1,1,1,1,1,1,1,1,1,
00122   1,1,1,1,1,1,1,1,1,1,
00123   1,1,1,1,1,1,1,1,1,1,
00124   1,1,1,1,1,1,1,1,1,1,
00125   1,1,1,1,1,1,1,1,1,1,
00126   1,1,1,1,                    /* FONT_00 --- FONT_63      */
00127   2,3,4,5,                    /* FNT1 --- FNT4            */
00128   2,3,4,5,                    /* XXX1 --- XXX4 + special string    */
00129   16,17,18,19,                /* FNT_DEF1 --- FNT_DEF4 + font name */
00130   15,                         /* PRE + TeX comment        */
00131   29,                         /* POST                     */
00132   10,                         /* POST_POST minimum        */
00133   -1,-1,-1,-1,-1,-1           /* undefined                */
00134 }
00135 #endif
00136 ;
00137 
00138 EXTERN const char* dvi_commands[256] 
00139 #ifdef MAIN
00140 ={
00141 "SETC_000","SETC_001","SETC_002","SETC_003","SETC_004",
00142 "SETC_005","SETC_006","SETC_007","SETC_008","SETC_009",
00143 "SETC_010","SETC_011","SETC_012","SETC_013","SETC_014",
00144 "SETC_015","SETC_016","SETC_017","SETC_018","SETC_019",
00145 "SETC_020","SETC_021","SETC_022","SETC_023","SETC_024",
00146 "SETC_025","SETC_026","SETC_027","SETC_028","SETC_029",
00147 "SETC_030","SETC_031","SETC_032","SETC_033","SETC_034",
00148 "SETC_035","SETC_036","SETC_037","SETC_038","SETC_039",
00149 "SETC_040","SETC_041","SETC_042","SETC_043","SETC_044",
00150 "SETC_045","SETC_046","SETC_047","SETC_048","SETC_049",
00151 "SETC_050","SETC_051","SETC_052","SETC_053","SETC_054",
00152 "SETC_055","SETC_056","SETC_057","SETC_058","SETC_059",
00153 "SETC_060","SETC_061","SETC_062","SETC_063","SETC_064",
00154 "SETC_065","SETC_066","SETC_067","SETC_068","SETC_069",
00155 "SETC_070","SETC_071","SETC_072","SETC_073","SETC_074",
00156 "SETC_075","SETC_076","SETC_077","SETC_078","SETC_079",
00157 "SETC_080","SETC_081","SETC_082","SETC_083","SETC_084",
00158 "SETC_085","SETC_086","SETC_087","SETC_088","SETC_089",
00159 "SETC_090","SETC_091","SETC_092","SETC_093","SETC_094",
00160 "SETC_095","SETC_096","SETC_097","SETC_098","SETC_099",
00161 "SETC_100","SETC_101","SETC_102","SETC_103","SETC_104",
00162 "SETC_105","SETC_106","SETC_107","SETC_108","SETC_109",
00163 "SETC_110","SETC_111","SETC_112","SETC_113","SETC_114",
00164 "SETC_115","SETC_116","SETC_117","SETC_118","SETC_119",
00165 "SETC_120","SETC_121","SETC_122","SETC_123","SETC_124",
00166 "SETC_125","SETC_126","SETC_127",
00167 "SET1","SET2","SET3","SET4","SET_RULE",
00168 "PUT1","PUT2","PUT3","PUT4","PUT_RULE",
00169 "NOP","BOP","EOP","PUSH","POP",
00170 "RIGHT1","RIGHT2","RIGHT3","RIGHT4",
00171 "W0","W1","W2","W3","W4",
00172 "X0","X1","X2","X3","X4",
00173 "DOWN1","DOWN2","DOWN3","DOWN4",
00174 "Y0","Y1","Y2","Y3","Y4",
00175 "Z0","Z1","Z2","Z3","Z4",
00176 "FONT_00","FONT_01","FONT_02","FONT_03","FONT_04",
00177 "FONT_05","FONT_06","FONT_07","FONT_08","FONT_09",
00178 "FONT_10","FONT_11","FONT_12","FONT_13","FONT_14",
00179 "FONT_15","FONT_16","FONT_17","FONT_18","FONT_19",
00180 "FONT_20","FONT_21","FONT_22","FONT_23","FONT_24",
00181 "FONT_25","FONT_26","FONT_27","FONT_28","FONT_29",
00182 "FONT_30","FONT_31","FONT_32","FONT_33","FONT_34",
00183 "FONT_35","FONT_36","FONT_37","FONT_38","FONT_39",
00184 "FONT_40","FONT_41","FONT_42","FONT_43","FONT_44",
00185 "FONT_45","FONT_46","FONT_47","FONT_48","FONT_49",
00186 "FONT_50","FONT_51","FONT_52","FONT_53","FONT_54",
00187 "FONT_55","FONT_56","FONT_57","FONT_58","FONT_59",
00188 "FONT_60","FONT_61","FONT_62","FONT_63",
00189 "FNT1","FNT2","FNT3","FNT4",
00190 "XXX1","XXX2","XXX3","XXX4",
00191 "FNT_DEF1","FNT_DEF2","FNT_DEF3","FNT_DEF4",
00192 "PRE","POST","POST_POST",
00193 "UNDEF_250","UNDEF_251","UNDEF_252","UNDEF_253","UNDEF_254","UNDEF_255"
00194 }
00195 #endif
00196 ;
00197