home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / source / driver / print / prhelp.h < prev    next >
C/C++ Source or Header  |  1994-04-18  |  4KB  |  162 lines

  1. #ifndef DISPLAY
  2.  
  3. #ifdef ATARI
  4. #define PRINTER_CONFIG    "DVIprint.prt"
  5. #else
  6. #define PRINTER_CONFIG    "DVIprint.printers"
  7. #endif
  8.  
  9. #define FS            ((char)28)
  10. #define ESC            ((char)27)
  11. #define LF            ((char)10)
  12. #define CR            ((char)13)
  13. #define FF            ((char)12)
  14.  
  15. /* Spaces replace a blank graphic when there are more than : */
  16. #define SPACES_GUT        6
  17.  
  18. /* ESC $ is only used when there are more points free than : */
  19. #define POINT_GUT        10
  20.  
  21.  
  22.  
  23.  
  24.  
  25. /****** P R I N T E R -- T Y P E S ** pp_printer ************************/
  26.  
  27. #define SLM_804            0    /* Atari Laser Printer SLM 804    */
  28. #define GENERIC_PRINTER        0    /* AMIGA printer.device driver  */
  29. #define DESKJET            1    /* HP-DeskJet            */
  30. #define CHEAPDJ            2    /* HP-DeskJet saves ink        */
  31. #define LASERJET        3    /* HP-LaserJet            */
  32. #define LASERJET4        4    /* HP-LaserJet -- 4 (600dpi)    */
  33. #define CANON            5    /* Canon Laserwriter        */
  34. #define STANDARD_PRINTER    6    /* Hardcopy_standard() printer    */
  35.  
  36. #ifdef AMIGA
  37. # define DEFAULT_PRINTER    GENERIC_PRINTER
  38. #else
  39. # define DEFAULT_PRINTER    SLM804
  40. #endif
  41.  
  42.  
  43.  
  44.  
  45. /****** P R I N T E R -- R E S O L U T I O N ** pp_draft ****************/
  46.  
  47. #define HIGH_Q            0
  48. #define DRAFT_Q            1
  49. #define NO_MATTER_DRAFT        2
  50.  
  51. #define DEFAULT_QUALITY        HIGH_Q
  52.  
  53.  
  54.  
  55.  
  56.  
  57. /****** P R I N T E R -- D I R E C T I O N ** pp_unidir *************************/
  58.  
  59. #define UNIDIR            0            /* default        */
  60. #define BIDIR            1            /* bidirectional    */
  61.  
  62. #define DEFAULT_DIRECTION    UNIDIR
  63.  
  64.  
  65.  
  66.  
  67.  
  68. /****** O P T I M I Z A T I O N    ** pp_secure ***************/
  69.  
  70. #define NO_MATTER_OPT        0
  71. #define SECURE            1
  72. #define OPTIMIZE        2
  73.  
  74.  
  75.  
  76.  
  77. /****** S P E C I A L ** pp_special ***************/
  78.  
  79. #define SPECIAL_NO_REDIR    (1<<1)    /* no output redirection    */
  80.                     /* allowed (prefs).        */
  81. #define SPECIAL_PREFS        (1<<2)    /* generic printer treatment    */
  82. #define SPECIAL_STD        (1<<3)    /* Standard Hardcopy printer    */
  83.  
  84.  
  85.  
  86. /****** M E T H O D ** pp_method ***************/
  87.  
  88. #define METHOD_MOVE_POINT    1    /* moves to n/60 inch        */
  89. #define METHOD_GFX_ONLY        2    /* whole line as graphics    */
  90. #define METHOD_USE_SPACES    3    /* use spaces in big blanks    */
  91.  
  92.  
  93.  
  94. /******    P R I N T E R -- P A R A M E T E R S ********************/
  95.  
  96. /* If you want to use the standard Hardcopy driver, you must set pp_grouping != 0 */
  97.  
  98. struct printer_para {
  99.  char    *pp_name;
  100.  char    *pp_ID_string;        /* describes this printer    */
  101.  short   pp_method;        /* blanking method        */
  102.  short   pp_printer;        /* printer            */
  103.  short     pp_draft;        /* draft ?            */
  104.  short   pp_secure;        /* optimize or not        */
  105.  short   pp_unidir;        /* unidirectional ?         */
  106.  short   pp_special;        /* special (??)            */
  107.  short     pp_passes_height;    /* Total of skips: Bitmap must be multiple of height */
  108.  short     pp_xdpi;        /* X resolution            */
  109.  short     pp_ydpi;        /* Y resolution            */
  110.  short     pp_init_len;        /* string length        */
  111.  short     pp_exit_len;        /* string length        */
  112.  short     pp_grouping;        /* 1 or 3, for 8 or 24 pins    */
  113.  short     pp_passes;        /* [1..]            */
  114.  short     pp_skip_cmd_len;    /* length of command        */
  115.  short     pp_gfx_cmd_len;    /* length of command        */
  116.  short     pp_pica_width;        /* Printer width in pica chars    */
  117.  char    *pp_skip;        /* Array of skips for each pass    */
  118.  char    *pp_init_string;    /* Initialize printer on startup */
  119.  char    *pp_exit_string;    /* Initialize printer on exit    */
  120.  char    *pp_skip_cmd;        /* ESC J or ESC 3        */
  121.  char    *pp_gfx_cmd;        /* Esc * ...            */
  122.  long     pp_buffer_size;    /* -e command buffer size    */
  123. };
  124.  
  125.  
  126. /******    B I T M A P -- C O N F I G U R A T I O N ****************/
  127.  
  128. /* The bitmap is read by accesses of type : */
  129. typedef unsigned short  WP_TYP;            /* Die Bitmap wird Wortweise gelesen */
  130. #define WP_GROESSE    (sizeof(WP_TYP)*8)    /* Bits in einem Wort */
  131.  
  132. #define MAX_GROUPING    12            /* Bytes pro Zeile */
  133.  
  134.  
  135. /* default size of the graphics line buffer */
  136. #ifdef AMIGA
  137. # define BUFFLEN     10240L
  138. #endif
  139.  
  140.  
  141.  
  142. #define PP_INS_DEC        ((char)0x82)
  143. #define PP_INS_LOW        ((char)0x80)
  144. #define PP_INS_HIGH        ((char)0x81)
  145. #define PP_INS_NR100        ((char)0x83)
  146. #define PP_INS_NR10        ((char)0x84)
  147. #define PP_INS_NR1        ((char)0x85)
  148. #define PP_NORMAL_STRING    (PP_INS_HIGH<<8 | PP_INS_LOW)
  149.  
  150. /*
  151. **    The command strings above accept two special characters:
  152. **
  153. **        0xff        low order byte of numeric argument
  154. **
  155. **        0xfe        high order byte
  156. **
  157. **    Examples:    {ESC,'*','\0',0xff,0xfe}
  158. **            {0x0d,ESC,'J',0xff,0x0a}
  159. */
  160.  
  161. #endif    /* !DISPLAY*/
  162.