home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / print / pf_deskj.lzh / PF / Source / pf2.h < prev    next >
C/C++ Source or Header  |  1991-09-27  |  4KB  |  114 lines

  1. /*---------------------------------------------------------*
  2.  | Author:  Maurizio Loreti, aka MLO or I3NOO.             |
  3.  | Address: University of Padova - Department of Physics   |
  4.  |          Via F. Marzolo, 8 - 35131 PADOVA - Italy       |
  5.  | Phone:   (39)(49) 844-313         FAX: (39)(49) 844-245 |
  6.  | E-Mail:  LORETI at IPDINFN (BITNET); or VAXFPD::LORETI  |
  7.  |         (DECnet) - VAXFPD is node 38.257 i.e. 39169; or |
  8.  |          LORETI@PADOVA.INFN.IT (INTERNET).              |
  9.  | Home: Via G. Donizetti 6 - 35010 CADONEGHE (PD) - Italy |
  10.  *---------------------------------------------------------*/
  11.  
  12. /**
  13.  | Printer port constants
  14. **/
  15.  
  16. #define PORT_NAME       "pf.port"
  17.  
  18. /**
  19.  | Constants to be used in printer initialisation
  20. **/
  21.  
  22. #define PORTRAIT        0               /* Orientation */
  23. #define LANDSCAPE       1
  24. #define ROMAN           0               /* Style */
  25. #define ITALIC          1
  26. #define P10CPI          0               /* Pitch & Spacing */
  27. #define P12CPI          1
  28. #define P16_67CPI       2
  29. #define P20CPI          3
  30. #define P24CPI          4
  31. #define PROPORTIONAL    -1
  32. #define COURIER         3               /* Font */
  33. #define GOTHIC          6
  34. #define TIMES           4101
  35. #define DRAFT_Q         1               /* Quality */
  36. #define LETTER_Q        2
  37.  
  38. /**
  39.  | Other #define's
  40. **/
  41.  
  42. #define VERSION         2.12            /* Guess what is this ... */
  43. #define LAST_CHANGE     910927
  44. #define VERSION_TAG     "\0$VER: PF2 v2.12 - MLO 910927"
  45.  
  46. #define REVISION        33              /* Library revision (Kickstart 1.2) */
  47.  
  48. #define BLUE_PEN        0               /* Workbench 1.3 defaults */
  49. #define WHITE_PEN       1
  50. #define BLACK_PEN       2
  51. #define RED_PEN         3
  52.  
  53. #define MAX_FILES       50              /* Maximum number of selected files */
  54. #define DIR_MAX         (DSIZE+1)       /* Directory names size */
  55. #define FIL_MAX         (FCHARS+1)      /* File names size */
  56. #define TOT_MAX         (DSIZE+FCHARS+2)
  57.  
  58. #define LINE_LENGTH     256             /* Input line buffer length */
  59.  
  60. #define OUTPUT_LENGTH   80              /* Various parameters for the 2-page */
  61. #define SIDE_LENGTH     3               /*   mode: output text length, width */
  62. #define SEP_LENGTH      5               /*     of the  blank borders,  space */
  63. #define PAGE_LENGTH     55              /*       between pages on sheet, ... */
  64.  
  65. #define TOTAL_LENGTH    (OUTPUT_LENGTH + 2 * SIDE_LENGTH)
  66. #define BUFFER_SIZE     (OUTPUT_LENGTH * PAGE_LENGTH)
  67.  
  68. #define ESC             '\x1B'          /* Special characters */
  69. #define FORM_FEED       '\x0C'
  70. #define H_LINE          '\xC4'          /* Semigraphic characters (PC-8) */
  71. #define V_LINE          '\xB3'
  72. #define NE              '\xBF'
  73. #define SE              '\xD9'
  74. #define SW              '\xC0'
  75. #define NW              '\xDA'
  76.  
  77. #define UP              1               /* Internal flags */
  78. #define DOWN            2
  79.  
  80. #define SINGLE_PAGE     1
  81. #define LEFT_PAGE       2
  82. #define RIGHT_PAGE      3
  83.  
  84. /**
  85.  | Structures
  86. **/
  87.  
  88. typedef struct sPageBuffer {            /* Page buffer pointers (2-p mode) */
  89.   char *line[PAGE_LENGTH];
  90. } PageBuffer;
  91.  
  92. typedef union uPrinterIO {              /* Exec I/O structure (printer) */
  93.   struct IOStdReq ios;
  94.   struct IODRPReq iod;
  95.   struct IOPrtCmdReq iop;
  96. } PrintIO;
  97.  
  98. /**
  99.  | ANSI prototypes (for functions called in more than one file)
  100. **/
  101.  
  102. void    main(int argc, char **argv);
  103.  
  104. void    Cleanup(int code);
  105. void    DoOutput(char *FileName);
  106. void    ExitProgram(void);
  107. void    FlushBuffers(void);
  108. void    InitPrinter(void);
  109. void   *LibOpen(char *Name, long Rev);
  110. void    SetSpecialMode(void);
  111. char  **Setup(int *pArgc, char **argv);
  112. void    SetupWB(void);
  113. void    windowOff(void);
  114.