home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / NextLibrary / TeX / tex / src / texview / structures.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-27  |  3.1 KB  |  109 lines

  1. /*
  2.  *   This software is Copyright 1988 by Radical Eye Software.
  3.  *   All Rights Reserved.
  4.  */
  5. #import <stdio.h>
  6. /*
  7.  *   Constants, used to expand or decrease the capacity of this program.
  8.  *   Since all memory is dynamically allocated and the constants in the
  9.  *   program are due to limitations of TeX or the printer itself, there
  10.  *   are really few changes that can be made here.
  11.  */
  12. #define RASTERCHUNK (4000)  /* size of chunk of raster */
  13. #define MINCHUNK (1000)     /* anything this big gets its own chunk */
  14. #define MAXDRIFT (1)        /* maximum drift in pixels */
  15. #define MAXFRAME (10)        /* maximum depth of virtual font recursion */
  16. #define STACKSIZE (100)     /* maximum stack size for dvi files */
  17. /*
  18.  *   Our memory type declarations.
  19.  */
  20. #define MEMF_CLEAR (1)
  21. /*
  22.  *   No file.
  23.  */
  24. #define NOFILETITLE ""
  25. /*
  26.  *   Type declarations.  integer must be a 32-bit signed; shalfword must
  27.  *   be a sixteen-bit signed; halfword must be a sixteen-bit unsigned;
  28.  *   quarterword must be an eight-bit unsigned.
  29.  */
  30. typedef long integer ;
  31. typedef short shalfword ;
  32. typedef unsigned short halfword ;
  33. typedef unsigned char quarterword ;
  34. typedef float real ;
  35. typedef int Boolean ;
  36. /*
  37.  *   A chardesc describes an individual character.
  38.  */
  39. typedef struct {
  40.    integer TFMwidth ;
  41.    quarterword *packptr ; /* only used for virtual fonts */
  42.    halfword pixelwidth ;
  43.    halfword dummy ;
  44. } chardesctype ;
  45. /*
  46.  *   A fontdesc describes a font.  The name of the font immediately follows
  47.  *   this structure.  Set up for 128 or 256 character fonts.
  48.  */
  49. typedef struct t2 {
  50.    chardesctype *chardesc ;
  51.    struct t2 *next ;
  52.    halfword dpi, loadeddpi ;
  53.    halfword alreadyscaled, virtual ;
  54.    int maxchars, id ;
  55.    struct resfont *resfont ;
  56.    struct fontmap *localfonts ;
  57.    char name[4] ;
  58. } fontdesctype ;
  59. /*
  60.  *   A TeXfontdesctype describes a TeX font, which contains a pointer
  61.  *   to a fontdesc.  The name is again located in the string pool.
  62.  *   These are allocated as they are needed; they are 1048 bytes long.
  63.  *   The name immediately follows this structure.
  64.  */
  65. typedef struct tfdt {
  66.    fontdesctype *loaded ;
  67.    struct tfdt *next ;
  68.    integer checksum, designsize, scaledsize, thinspace, origssize ;
  69.    integer scaledwidth[256] ;
  70.    integer wanteddpi ;
  71.    char name[4] ;
  72. } TeXfontdesctype ;
  73.  
  74. /*  A fontmap associates a fontdesc with a font number.
  75.  */
  76. typedef struct fontmap {
  77.    integer fontnum ;
  78.    TeXfontdesctype *tdesc ;
  79.    struct fontmap *next ;
  80. } fontmaptype ;
  81. /*   Virtual fonts require a `macro' capability that is implemented by
  82.  *   using a stack of `frames'. 
  83.  */
  84. typedef struct {
  85.    quarterword *curp, *curl ;
  86.    TeXfontdesctype *tfnt ;
  87.    fontdesctype *curf ;
  88.    fontmaptype *ff ;
  89. } frametype ;
  90. /*
  91.  *   Crude, crude hack; why is this necessary?
  92.  */
  93. extern int _filbuf() ;
  94. /*
  95.  *   This is the structure definition for resident fonts.  We use
  96.  *   a small and simple hash table to handle these.  We don't need
  97.  *   a big hash table.
  98.  */
  99. #define RESHASHPRIME (23)
  100. struct resfont {
  101.    char *Keyname, *PSname, *TeXname ;
  102.    char *specialinstructions ;
  103.    char *downloadheader ;
  104.    struct resfont *next ;
  105.    quarterword sent ;
  106. } ;
  107. #define DEBUG
  108. #define getenv mgetenv
  109.