home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / psroff / part01 / ps.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-17  |  1.4 KB  |  50 lines

  1. /*    Copyright 1985, 1986, 1987, 1988 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:        ps.h
  10.     Author:     Chris Lewis
  11.     Specs:        PostScript Driver definitions
  12.  */
  13.  
  14. #ifndef    SVR3
  15. #ifndef    lint
  16. static char psID[] = "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis";
  17. #endif
  18. #else
  19. #ident  "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis"
  20. #endif
  21.  
  22. /*    Points per inch (default PostScript resolution) */
  23. #define    PSRESOLUTION    72
  24. /*    Length scaling factor */
  25. #define    PSSCALEFACTOR    ((double) PSRESOLUTION / TROFFRESOLUTION)
  26. /*    Troff assumes 7.5" paper width, most macro packages print in
  27.     6.5" area within that.  Sooo, we'll center the paperwidth on the 
  28.     physical page - implying .5" inch physical margins.*/
  29. #define    TROFF2PSX(x) ((x) * PSSCALEFACTOR + PSRESOLUTION / 2)
  30. /*    11" paper length (note the reversed sign!) */
  31. #define    TROFF2PSY(y) ((pagelength - (y)) * PSSCALEFACTOR)
  32.  
  33. extern double pagelength;
  34.  
  35. #define    LASTPSFONT    ('O')
  36.  
  37. #define    FONTMACRO
  38.  
  39. #define    PSLIB    "lib.ps"
  40. #define    PSFONTS    "fonts.ps"
  41. #define    EMITPS    printf
  42.  
  43. /*    Entry points: */
  44. extern int psProlog(), psEpilog(), psChar(), psPage(), psFontSel(),
  45.     psOverlay(), psXlate(), psBin();
  46.  
  47. #define    PSNAME    "ps"
  48.  
  49. struct troff2befont psSymFont[], psStdFont[];
  50.