home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2100 / pkc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  1.5 KB  |  61 lines

  1. /*    Copyright 1988, 1989 16:47:06 Chris Lewis
  2.         All Rights Reserved
  3.  
  4.     Permission to copy and further distribute is freely given provided
  5.     this copyright notice remains intact and that this software is not
  6.     sold for profit.
  7.  
  8.     Project:    Generic Troff drivers
  9.     Module:        pkc.c 2.1 90/07/18 16:47:06
  10.     Author:     Chris Lewis
  11.     Specs:        PK Cache handlers
  12.  
  13. */
  14.  
  15. #if    defined(PARTIAL) || defined(INCR)
  16. /*
  17.  
  18.     if defined(PARTIAL):
  19.  
  20.         This defines a table of bit maps for the "normal" (N),
  21.         "symbol" (S) and overide (digit fonts > 3) indicating which
  22.         characters in the font are "useful".  This is built during
  23.         Prolog (which is after the ljStdFont/ljSymFont arrays are modified
  24.         by any overrides in the *.fonts file), by examining the
  25.         lj*Font arrays and seeing which characters are actually used.
  26.         This is "partial" downloading, *not* incremental.
  27.  
  28.     if defined(INCR):
  29.  
  30.         This defines a table of bit maps for *each* mentioned font at
  31.         *each* pointsize, where the bit being on indicates whether the
  32.         character has been downloaded *yet*.
  33.  */
  34.  
  35. #define    ETYP    long
  36. #define    ELEN    (sizeof(ETYP) * 8)    /* length in bits of an ETYP */
  37. #define    MASKLEN    ((256 - (' ' * 2) + (ELEN - 1)) / ELEN)
  38.  
  39. #define    NPTSIZE    15
  40.  
  41. struct needmaps {
  42.     int fontnum;
  43.     ETYP nm[MASKLEN];
  44.     struct needmaps *next;
  45. };
  46.  
  47. #define    NMAP(x)    nm[x]
  48.  
  49. extern struct needmaps *needmaps;
  50.  
  51. #ifdef    INCR
  52. struct downmaps {
  53.     ETYP *nm[NPTSIZE];
  54.     int lastpage[NPTSIZE];
  55.     struct pkp *pkfont[NPTSIZE];
  56. };
  57. #endif
  58.  
  59. #define    DMAP(x,p) nm[p][x]
  60. #endif
  61.