home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume15 / tpscript / part01 / opscript / pscript.h < prev   
Encoding:
C/C++ Source or Header  |  1988-05-25  |  1.6 KB  |  91 lines

  1. /*
  2.  *    pscript.h
  3.  *    Some common definitions for programs that produce postscript
  4.  */
  5.  
  6. #ifndef    PSCRIPT_DEFINED
  7. #define    PSCRIPT_DEFINED    1
  8.  
  9. #ifndef    VERBOSE
  10. #if    lint
  11. #define    VERBOSE    1    /* if linting, check all the code */
  12. #else    lint
  13. #define    VERBOSE    0
  14. #endif    lint
  15. #endif    VERBOSE
  16.  
  17. #if    UNSW
  18. #undef    AUSAM
  19. #define    AUSAM    1
  20. #endif    UNSW
  21.  
  22. #ifdef    AUSAM
  23. #undef    AUSAM
  24. #define    AUSAM    1
  25. #else
  26. #define    AUSAM    0
  27. #endif    AUSAM
  28.  
  29. #ifdef    BSD
  30. #undef    BSD
  31. #define    BSD    1
  32. #define    index    strchr
  33. #define    rindex    strrchr
  34. #include    <strings.h>    /* declarations for string functions */
  35. #else
  36. #define    BSD    0
  37. #include    <string.h>    /* declarations for string functions */
  38. #endif    BSD
  39.  
  40. #ifdef    SYSV
  41. #undef    SYSV
  42. #define    SYSV    1
  43. #else
  44. #define    SYSV    0
  45. #endif    SYSV
  46.  
  47. #ifdef    V7
  48. #undef    V7
  49. #define    V7    1
  50. #else
  51. #define    V7    0
  52. #endif    V7
  53.  
  54. #if    AUSAM + BSD + SYSV + V7 != 1
  55. #include    "Must define 1 only of AUSAM, BSD, SYSV, V7"
  56. #endif
  57.  
  58. #include    <stdio.h>
  59.  
  60. /* LaserWriter page types */
  61. #define    PT_DEFAULT    0
  62. #define    PT_LETTER    1
  63. #define    PT_LEGAL    2
  64. #define    PT_NOTE        3
  65. #ifdef    ALW
  66. #define    PT_A4        4    /* currently only on Apple LaserWriter */
  67. #endif    ALW
  68.  
  69. /* Postscript defaults */
  70. #define    PD_PAGETYPE    PT_LETTER    /* page size is "letter" */
  71. #define    PD_ROTATION    0        /* page is portrait mode */
  72. #define    PD_PFREQUENCY    60        /* pixel frequency (pixels/inch) */
  73. #define    PD_PROTATION    45        /* pixel grid rotation (degrees) */
  74.  
  75. #define    ALW_RES        300    /* LaserWriter resolution is 300 dots/inch */
  76.  
  77. #define    PU_INCH        72    /* postscript units / inch */
  78. #define    PU_CM        28.3465    /* postscript units / cm */
  79.  
  80. #define    TRUE        (bool)1
  81. #define    FALSE        (bool)0
  82.  
  83. typedef int    bool;
  84.  
  85. extern FILE *    postr;        /* output stream */
  86.  
  87. void    perror(),
  88.     exit();
  89.  
  90. #endif    PSCRIPT_DEFINED
  91.