home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / commands / pf.lzh / PF / Source / pf2.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-31  |  4.2 KB  |  131 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. #define INIT_DELAY      300
  18.  
  19. /**
  20.  | Constants to be used in printer initialisation
  21. **/
  22.  
  23. #define PORTRAIT        0               /* Orientation */
  24. #define LANDSCAPE       1
  25. #define ROMAN           0               /* Style */
  26. #define ITALIC          1
  27. #define P10CPI          0               /* Pitch & Spacing */
  28. #define P12CPI          1
  29. #define P16_67CPI       2
  30. #define P20CPI          3
  31. #define P24CPI          4
  32. #define PROPORTIONAL    -1
  33. #define COURIER         3               /* Font */
  34. #define GOTHIC          6
  35. #define TIMES           4101
  36. #define DRAFT_Q         1               /* Quality */
  37. #define LETTER_Q        2
  38.  
  39. /**
  40.  | Other #define's
  41. **/
  42.  
  43. #define VERSION         2.10            /* Guess what is this ... */
  44. #define LAST_CHANGE     910625
  45. #define REVISION        33              /* Library revision (Kickstart 1.2) */
  46.  
  47. #define MAX_FILES       50              /* Maximum number of selected files */
  48. #define DIR_MAX         (DSIZE+1)       /* Directory names size */
  49. #define FIL_MAX         (FCHARS+1)      /* File names size */
  50. #define TOT_MAX         (DSIZE+FCHARS+2)
  51.  
  52. #define GAD_X           50              /* Left edge (all gadgets) */
  53. #define GAD_Y0          30              /* Top edge (upper gadget) */
  54. #define GAD_DY          20              /* Delta Y between gadgets */
  55.  
  56. #define LINE_LENGTH     256             /* Input line buffer length */
  57.  
  58. #define OUTPUT_LENGTH   80              /* Various parameters for the 2-page */
  59. #define SIDE_LENGTH     3               /*   mode: output text length, width */
  60. #define SEP_LENGTH      5               /*     of the  blank borders,  space */
  61. #define PAGE_LENGTH     55              /*       between pages on sheet, ... */
  62.  
  63. #define TOTAL_LENGTH    (OUTPUT_LENGTH + 2 * SIDE_LENGTH)
  64. #define BUFFER_SIZE     (OUTPUT_LENGTH * PAGE_LENGTH)
  65.  
  66. #define ESC             '\x1B'          /* Special characters */
  67. #define FORM_FEED       '\x0C'
  68. #define H_LINE          '\xC4'          /* Semigraphic characters (PC-8) */
  69. #define V_LINE          '\xB3'
  70. #define NE              '\xBF'
  71. #define SE              '\xD9'
  72. #define SW              '\xC0'
  73. #define NW              '\xDA'
  74.  
  75. #define UP              1               /* Internal flags */
  76. #define DOWN            2
  77.  
  78. #define SINGLE_PAGE     1
  79. #define LEFT_PAGE       2
  80. #define RIGHT_PAGE      3
  81.  
  82. #define BLUE_PEN        0               /* Workbench defaults */
  83. #define WHITE_PEN       1
  84. #define BLACK_PEN       2
  85. #define RED_PEN         3
  86.  
  87. /**
  88.  | Structures
  89. **/
  90.  
  91. typedef struct sPageBuffer {            /* Page buffer pointers (2-p mode) */
  92.   char *line[PAGE_LENGTH];
  93. } PageBuffer;
  94.  
  95. typedef union uPrinterIO {              /* Exec I/O structure (printer) */
  96.   struct IOStdReq ios;
  97.   struct IODRPReq iod;
  98.   struct IOPrtCmdReq iop;
  99. } PrintIO;
  100.  
  101. /**
  102.  | ANSI prototypes
  103. **/
  104.  
  105. int     Ask(char *pTitle, int nText, char *Text[]);
  106. Boolean CheckBreak(void);
  107. void    CheckDefaults(void);
  108. void    Cleanup(int code);
  109. void    ClearPageBuffer(void);
  110. void    ClearThisPage(void);
  111. void    Detab(char *buffer, int length);
  112. void    DoOutput(char *FileName);
  113. void    DoubleLine(char *left, char *right);
  114. void    EjectPage(void);
  115. void    ErrMes(char *mForm, ...);
  116. void    ExitProgram(void);
  117. void    FlushBuffers(void);
  118. void    Header(int type);
  119. void    InitPrinter(void);
  120. void    InterLine(void);
  121. void   *LibOpen(char *Name, long Rev);
  122. void    OutLine(void);
  123. void    ResetPrinter(void);
  124. void    SendBuffer(char *buffer);
  125. void    SendToPrinter(char *fmt, ...);
  126. void    SetSpecialMode(void);
  127. char  **Setup(int *pArgc, char **argv);
  128. void    SetupWB(void);
  129. void    Syntax(void);
  130. void    windowOff(void);
  131.