home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / stex2-18.zip / SeeTeX / libtex / dviclass.h < prev    next >
C/C++ Source or Header  |  1990-07-10  |  2KB  |  72 lines

  1. /*
  2.  * Copyright (c) 1987, 1989 University of Maryland
  3.  * Department of Computer Science.  All rights reserved.
  4.  * Permission to copy for any purpose is hereby granted
  5.  * so long as this copyright notice remains intact.
  6.  */
  7.  
  8. /*
  9.  * Macros to convert DVI opcodes to (hopefully) simpler values.
  10.  */
  11.  
  12. /*
  13.  * Large range types---code may be any value (including EOF).
  14.  */
  15. #define DVI_IsChar(code) ((ui32)(code) < 128)
  16. #define DVI_IsFont(code) ((code) >= 171 && (code) < 235)
  17.  
  18. /*
  19.  * Symbolic names for generic types (for things with parameters).
  20.  * These are obtained via the macro DVI_DT(int c), where 0 <= c <= 255.
  21.  */
  22. #define    DT_CHAR         0
  23. #define DT_SET         1
  24. #define    DT_SETRULE     2
  25. #define DT_PUT         3
  26. #define    DT_PUTRULE     4
  27. #define    DT_NOP         5
  28. #define    DT_BOP         6
  29. #define    DT_EOP         7
  30. #define    DT_PUSH         8
  31. #define    DT_POP         9
  32. #define DT_RIGHT    10
  33. #define DT_W0        11
  34. #define    DT_W        12
  35. #define    DT_X0        13
  36. #define DT_X        14
  37. #define DT_DOWN        15
  38. #define    DT_Y0        16
  39. #define DT_Y        17
  40. #define    DT_Z0        18
  41. #define DT_Z        19
  42. #define    DT_FNTNUM    20
  43. #define DT_FNT        21
  44. #define DT_XXX        22
  45. #define DT_FNTDEF    23
  46. #define    DT_PRE        24
  47. #define    DT_POST        25
  48. #define    DT_POSTPOST    26
  49. #define    DT_UNDEF    27
  50.  
  51. /*
  52.  * Symbolic names for parameter lengths, obtained via the macro
  53.  * DVL_OpLen(int c).
  54.  *
  55.  * N.B.: older drivers may assume that 0 => none, 1-4 => 1-4 bytes
  56.  * and 5-7 => unsigned version of 1-4---so DO NOT change these values!
  57.  */
  58. #define    DPL_NONE    0
  59. #define    DPL_SGN1    1
  60. #define    DPL_SGN2    2
  61. #define    DPL_SGN3    3
  62. #define    DPL_SGN4    4
  63. #define    DPL_UNS1    5
  64. #define    DPL_UNS2    6
  65. #define    DPL_UNS3    7
  66. /* there are no unsigned four byte parameters */
  67.  
  68. #define DVI_OpLen(code)  (dvi_oplen[code])
  69. #define DVI_DT(code)     (dvi_dt[code])
  70. extern char dvi_oplen[];
  71. extern char dvi_dt[];
  72.