home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / source / TeX / tex / memory.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-05  |  2.1 KB  |  112 lines

  1. /* memory.h: types that are too hard to translate automatically from
  2.    Pascal.  This file is included from the change file in the change for
  3.    section 8.113.  */
  4.  
  5. /* (br) added:
  6.  *
  7.  * Ein paar neue Typen fuer BIG-TeX, die nicht (SMALL) oder nur etwas
  8.  * groesser (MED) werden, wenn halfword doppelt so gross wird.
  9.  */
  10.  
  11. typedef unsigned short SMALLhalfword;        /* fuer fontparams */
  12.  
  13.  
  14. typedef union
  15. {
  16.   struct
  17.   {
  18.     halfword RH, LH;
  19.   } v;
  20.  
  21.   struct
  22.   {
  23.     halfword junk_space;    /* Make B0,B1 overlap LH.  */
  24.     quarterword B0, B1;
  25.   } u;
  26.  
  27.   struct
  28.   {
  29.     halfword junk_space;    /* Make B0,B1 overlap this LH also.  */
  30.     SMALLhalfword LH;        /* needed for "set_type_subtype" macro (br) */
  31.   } w;
  32.  
  33. } twohalves;
  34.  
  35.  
  36. /* TeX want to call the following fields `b0', etc.  */
  37. #define    b0    u.B0
  38. #define    b1    u.B1
  39. #define    b2    u.B2
  40. #define    b3    u.B3
  41.  
  42. typedef union /* struct */
  43. {
  44.   struct
  45.   {
  46.     quarterword B0, B1, B2, B3;
  47.   } u;
  48.   integer cint;
  49.   
  50. } fourquarters;
  51.  
  52.  
  53. typedef union
  54. {
  55.   integer cint;
  56.   glueratio gr;
  57.   twohalves hh;
  58.   fourquarters qqqq;
  59. } memoryword;
  60.  
  61.  
  62. /* new strutures/unions: */
  63.  
  64. typedef union
  65. {
  66.   integer cint;
  67. /*  glueratio gr; */    /* wegen typedef double glueratio */
  68. /*  twohalves hh; */    /* beim BIG-TeX sind das 2*4=8 Bytes */
  69.   fourquarters qqqq;
  70. } SMALLmemoryword;                /* fuer fontinfo */
  71.  
  72.  
  73. /* Der folgende struct ist 6 Bytes gross.  GNU C berechnet aus dem
  74.  * Index d0 mit  "movel d0,d1; asll #1,d1; addl d0,d1; asll #1,d1"
  75.  * den Offset d1.   Dies benoetigt 8#mem und 32 Zyklen.
  76.  * Manche Compiler erzeugen daraus jedoch "movel d0,d1; mulu #6,d1"
  77.  * Dies benoetigt 6#mem und <78 Zyklen !!!!!
  78.  * Waere der struct 8 Byte gross: "movel d0,d1; asll #3,d1"
  79.  * Dies benoetigt 4#mem und 18 Zyklen.
  80.  */
  81.  
  82. #ifndef BIG_EQTB
  83.  
  84. typedef union
  85. {
  86.   struct
  87.   {
  88.     halfword RH;
  89.     quarterword B0, B1;
  90.   } v;
  91.   struct
  92.   {
  93.     halfword RH;
  94.     quarterword B0, B1;
  95.   } u;
  96. } onehalf_halves;
  97.  
  98. typedef union
  99. {
  100.   integer cint;
  101.   onehalf_halves hh;
  102.   fourquarters qqqq;    /* for ML-TeX: rh overlaps b0, b1 !! */
  103. } MEDmemoryword;            /* fuer savestack, eqtb */
  104.  
  105. #else
  106.  
  107. typedef memoryword MEDmemoryword;
  108.  
  109. #endif
  110.  
  111. /* end of memory.h */
  112.