home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 344_01 / pcon.h < prev    next >
Text File  |  1989-06-08  |  4KB  |  103 lines

  1. /* HEADER:       (cat #);
  2.    TITLE:        Header file for PCON.C;
  3.    DATE:         06/08/1989;
  4.    SYSTEM:       MS-DOS;
  5.    FILENAME:     PCON.H;
  6.    SEE-ALSO:     pcon.c;
  7.    AUTHOR:       Eric Horner;
  8.    COMPILERS:    Turbo C 2.0;
  9. */
  10.  
  11.     /***** Function prototypes/definitions *****/
  12.  
  13. void print_instructions(void);    /* prints operating information        */
  14. void strtoupper(char *strptr);  /* converts a string to all upper case  */
  15.  
  16. #define MAXCODES 26        /* change if code[] table changes!    */
  17. #define TEXTLEN  20        /* change if explain table changes!    */
  18. #define MAXPARMS 10            /* change as needed (arbitrary)        */
  19.  
  20. /***** Command line strings and printer control strings *****/
  21.  
  22. /* The first column (such as "LM20") is the string which appears on the
  23.    command line. The second column (such as "\x1b\x6c\x14") is the string
  24.    of hex characters to be sent to the printer. Change either or both
  25.    columns to suit your own printer!
  26. */
  27.  
  28. char *codes[] =
  29. {
  30.     "LM20",    "\x1b\x6c\x14",        /* left margin 20    */
  31.     "LM5",    "\x1b\x6c\x05",        /* left margin 5    */
  32.     "LM10",    "\x1b\x6c\x0a",        /* left margin 10    */
  33.     "LM15",    "\x1b\x6c\x0f",        /* left margin 15    */
  34.     "SK",    "\x1b\x4e\x06",        /* skip 6 lines        */
  35.     "NSK",    "\x1b\x4f",        /* no skip zone        */
  36.     "DW",    "\x1b\x0e",        /* double width chars   */
  37.     "NDW",    "\x14",            /* double width off    */
  38.     "EXP",    "\x1b\x0e",        /* double width chars   */
  39.     "NEXP",    "\x14",            /* double width off    */
  40.     "COM",    "\x1b\x0f",        /* compressed mode    */
  41.     "NCOM",    "\x12",            /* no compressed mode    */
  42.     "PICA",    "\x1b\x50",        /* pica size chars    */
  43.     "PICEM",    "\x1b\x50\x1b\x45",    /* emphasized pica    */
  44.     "NEM",    "\x1b\x46",        /* emphasized off    */
  45.     "EL",    "\x1b\x4d",        /* elite size chars    */
  46.     "DS",    "\x1b\x47",        /* double strike mode    */
  47.     "NDS",    "\x1b\x48",        /* double strike off    */
  48.     "UND",    "\x1b\x2d\x01",        /* underline mode    */
  49.     "NUND",    "\x1b\x2d\0",        /* underline off    */
  50.     "RES",    "\x1b\x40",        /* printer reset    */
  51.     "ITAL",    "\x1b\x34",        /* italic mode on    */
  52.     "NITAL",    "\x1b\x35",        /* italic mode off    */
  53.     "NLQ",    "\x1b\x78\x01",        /* near letter quality  */
  54.     "DOT",    "\x1b\x78\0",        /* dot mode (NLQ off)    */
  55.     "TEST",    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\n"
  56. };
  57. /*    ^            ^                    */
  58. /* Command        Sent to printer                */
  59.  
  60.  
  61. /***** error messages *****/
  62.  
  63. char *ers[] =
  64. {
  65.     "\7 invalid command line parameter(s) - enter PCON alone for info.\n",
  66.     "\7\nToo many parameters (10 max)\n",
  67.     "\7\nUnable to open file:"
  68. };
  69.  
  70.  
  71. /***** operator instruction *****/
  72.  
  73. /* This provides on-screen help when no command line parameters are present.
  74.    Change the command line strings and descriptions here to agree with any
  75.    changes which you make to the *codes[] strings above. */
  76.  
  77. char *explain[] =
  78. {
  79.     "PRINTER CONTROL UTILITY  V1.0 (EPSON FX80)    ERIC HORNER, 2/11/89\n",
  80.     "All small, unmarked bills to 5559 Lambeth Lane, Rockford, Il 61107\n\n",
  81.  
  82.     "PCON.COM     - VALID COMMANDS:\n\n",
  83.  
  84.     "LM5, LM10    - set left margin to 5 or 10.\n",
  85.     "LM15, LM20   - set left margin to 15 or 20.\n",
  86.     "SK, NSK      - skip or no skip.\n",
  87.     "DW, NDW      - double width or no double width.\n",
  88.     "EXP, NEXP    - expanded or not expanded.\n",
  89.     "COM, NCOM    - compressed or no compressed.\n",
  90.     "PICA,        - pica character size.\n",
  91.     "PICEM        - pica size, emphasized.\n",
  92.     "NEM          - emphasis off.\n",
  93.     "EL           - elite size characters.\n",
  94.     "DS, NDS      - double strike or no double strike.\n",
  95.     "UND, NUND    - underline or no underline.\n",
  96.     "RES          - reset printer.\n",
  97.     "ITAL, NITAL  - italics or no italics.\n",
  98.     "NLQ, DOT     - near letter or normal quality.\n",
  99.     "TEST         - prints out the alphabet, to test settings.\n\n",
  100.  
  101.     "SYNTAX       - pcon <option1> <option2>......<option10>\n"
  102. };
  103.