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 / gfclass.h < prev    next >
C/C++ Source or Header  |  1990-07-10  |  2KB  |  59 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.  * GF classification codes
  10.  */
  11.  
  12. /*
  13.  * Predicate for simple paint commands.  This is presumably the most
  14.  * common GF operation; it may be profitable to check for this before
  15.  * switching out on the command type.
  16.  */
  17. #define    GF_IsPaint(c)    ((c) < 64)
  18.  
  19. /*
  20.  * Symbolic names for command `types', as returned by the macro
  21.  * GT_TYPE(int c).
  22.  */
  23. #define GT_PAINT0    0    /* paint without parameter */
  24. #define    GT_PAINT    1    /* paint with parameter */
  25. #define GT_BOC        2    /* long BOC */
  26. #define    GT_BOC1        3    /* short BOC */
  27. #define GT_EOC        4    /* EOC */
  28. #define GT_SKIP0    5    /* parameterless SKIP */
  29. #define    GT_SKIP        6    /* parmeterised SKIP */
  30. #define GT_NEW_ROW    7    /* NEW_ROW_n */
  31. #define GT_XXX        8    /* XXXn */
  32. #define GT_YYY        9    /* YYY */
  33. #define    GT_NOP        10    /* no op */
  34. #define GT_CHAR_LOC    11    /* CHAR_LOC */
  35. #define    GT_CHAR_LOC0    12    /* abbreviated CHAR_LOC */
  36. #define    GT_PRE        13
  37. #define    GT_POST        14
  38. #define    GT_POSTPOST    15
  39. #define    GT_UNDEF    16
  40.  
  41. /*
  42.  * Symbolic names for parameter lengths, obtained via the macro
  43.  * GT_OpLen(int c).
  44.  */
  45. #define    GPL_NONE    0    /* no parameter, or too complex */
  46. #define    GPL_UNS1    1    /* one one-byte parameter in 0..255 */
  47. #define    GPL_UNS2    2    /* one two-byte parameter in 0..65535 */
  48. #define    GPL_UNS3    3    /* one three-byte parameter in 0..16777215 */
  49. #define    GPL_SGN4    4    /* one four-byte signed parameter */
  50. /*
  51.  * there are no unsigned four byte parameters, and no shorter signed
  52.  * parameters
  53.  */
  54.  
  55. #define GF_OpLen(code)    (gf_oplen[code])
  56. #define GF_TYPE(code)    (gf_gt[code])
  57. extern char gf_oplen[];
  58. extern char gf_gt[];
  59.