home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / dev / rkrm.lha / RKRM / Printer / epsonx / data.c next >
Encoding:
Text File  |  1992-09-03  |  13.0 KB  |  252 lines

  1. /*
  2.  * Copyright (c) 1992 Commodore-Amiga, Inc.
  3.  * 
  4.  * This example is provided in electronic form by Commodore-Amiga, Inc. for 
  5.  * use with the "Amiga ROM Kernel Reference Manual: Devices", 3rd Edition, 
  6.  * published by Addison-Wesley (ISBN 0-201-56775-X).
  7.  * 
  8.  * The "Amiga ROM Kernel Reference Manual: Devices" contains additional 
  9.  * information on the correct usage of the techniques and operating system 
  10.  * functions presented in these examples.  The source and executable code 
  11.  * of these examples may only be distributed in free electronic form, via 
  12.  * bulletin board or as part of a fully non-commercial and freely 
  13.  * redistributable diskette.  Both the source and executable code (including 
  14.  * comments) must be included, without modification, in any copy.  This 
  15.  * example may not be published in printed form or distributed with any
  16.  * commercial product.  However, the programming techniques and support
  17.  * routines set forth in these examples may be used in the development
  18.  * of original executable software products for Commodore Amiga computers.
  19.  * 
  20.  * All other rights reserved.
  21.  * 
  22.  * This example is provided "as-is" and is subject to change; no
  23.  * warranties are made.  All use is at your own risk. No liability or
  24.  * responsibility is assumed.
  25.  *
  26.  *****************************************************************************
  27.  *
  28.  *
  29.  *       Data.c table for EpsonX driver.
  30.  */
  31.  
  32. char *CommandTable[] ={
  33.         "\375\033@\375",/* 00 aRIS reset                        */
  34.         "\377",         /* 01 aRIN initialize                   */
  35.         "\012",         /* 02 aIND linefeed                     */
  36.         "\015\012",     /* 03 aNEL CRLF                         */
  37.         "\377",         /* 04 aRI reverse LF                    */
  38.  
  39.                         /* 05 aSGR0 normal char set             */
  40.         "\0335\033-\376\033F",
  41.         "\0334",        /* 06 aSGR3 italics on                  */
  42.         "\0335",        /* 07 aSGR23 italics off                */
  43.         "\033-\001",    /* 08 aSGR4 underline on                */
  44.         "\033-\376",    /* 09 aSGR24 underline off              */
  45.         "\033E",        /* 10 aSGR1 boldface on                 */
  46.         "\033F",        /* 11 aSGR22 boldface off               */
  47.         "\377",         /* 12 aSFC set foreground color         */
  48.         "\377",         /* 13 aSBC set background color         */
  49.  
  50.                         /* 14 aSHORP0 normal pitch              */
  51.         "\033P\022\033W\376",
  52.                         /* 15 aSHORP2 elite on                  */
  53.         "\033M\022\033W\376",
  54.         "\033P",        /* 16 aSHORP1 elite off                 */
  55.                         /* 17 aSHORP4 condensed fine on         */
  56.         "\017\033P\033W\376",
  57.         "\022",         /* 18 aSHORP3 condensed fine off        */
  58.         "\033W\001",    /* 19 aSHORP6 enlarge on                */
  59.         "\033W\376",    /* 20 aSHORP5 enlarge off               */
  60.  
  61.         "\377",         /* 21 aDEN6 shadow print on             */
  62.         "\377",         /* 22 aDEN5 shadow print off            */
  63.         "\033G",        /* 23 aDEN4 double strike on            */
  64.         "\033H",        /* 24 aDEN3 double strike off           */
  65.         "\033x\001",    /* 25 aDEN2 NLQ on                      */
  66.         "\033x\376",    /* 26 aDEN1 NLQ off                     */
  67.  
  68.         "\033S\376",    /* 27 aSUS2 superscript on              */
  69.         "\033T",        /* 28 aSUS1 superscript off             */
  70.         "\033S\001",    /* 29 aSUS4 subscript on                */
  71.         "\033T",        /* 30 aSUS3 subscript off               */
  72.         "\033T",        /* 31 aSUS0 normalize the line          */
  73.         "\377",         /* 32 aPLU partial line up              */
  74.         "\377",         /* 33 aPLD partial line down            */
  75.  
  76.         "\033R\376",    /* 34 aFNT0 Typeface 0                  */
  77.         "\033R\001",    /* 35 aFNT1 Typeface 1                  */
  78.         "\033R\002",    /* 36 aFNT2 Typeface 2                  */
  79.         "\033R\003",    /* 37 aFNT3 Typeface 3                  */
  80.         "\033R\004",    /* 38 aFNT4 Typeface 4                  */
  81.         "\033R\005",    /* 39 aFNT5 Typeface 5                  */
  82.         "\033R\006",    /* 40 aFNT6 Typeface 6                  */
  83.         "\033R\007",    /* 41 aFNT7 Typeface 7                  */
  84.         "\033R\010",    /* 42 aFNT8 Typeface 8                  */
  85.         "\033R\011",    /* 43 aFNT9 Typeface 9                  */
  86.         "\033R\012",    /* 44 aFNT10 Typeface 10                */
  87.  
  88.         "\033p1",       /* 45 aPROP2 proportional on            */
  89.         "\033p0",       /* 46 aPROP1 proportional off           */
  90.         "\377",         /* 47 aPROP0 proportional clear         */
  91.         "\377",         /* 48 aTSS set proportional offset      */
  92.         "\377",         /* 49 aJFY5 auto left justify           */
  93.         "\377",         /* 50 aJFY7 auto right justify          */
  94.         "\377",         /* 51 aJFY6 auto full jusitfy           */
  95.         "\377",         /* 52 aJFY0 auto jusity off             */
  96.         "\377",         /* 53 aJFY3 letter space                */
  97.         "\377",         /* 54 aJFY1 word fill                   */
  98.  
  99.         "\0330",        /* 55 aVERP0 1/8" line spacing          */
  100.         "\0332",        /* 56 aVERP1 1/6" line spacing          */
  101.         "\033C",        /* 57 aSLPP set form length             */
  102.         "\033N",        /* 58 aPERF perf skip n (n > 0)         */
  103.         "\033O",        /* 59 aPERF0 perf skip off              */
  104.  
  105.         "\377",         /* 60 aLMS set left margin              */
  106.         "\377",         /* 61 aRMS set right margin             */
  107.         "\377",         /* 62 aTMS set top margin               */
  108.         "\377",         /* 63 aBMS set bottom margin            */
  109.         "\377",         /* 64 aSTBM set T&B margins             */
  110.         "\377",         /* 65 aSLRM set L&R margins             */
  111.         "\377",         /* 66 aCAM clear margins                */
  112.  
  113.         "\377",         /* 67 aHTS set horiz tab                */
  114.         "\377",         /* 68 aVTS set vert tab                 */
  115.         "\377",         /* 69 aTBC0 clear horiz tab             */
  116.         "\033D\376",    /* 70 aTBC3 clear all horiz tabs        */
  117.         "\377",         /* 71 aTBC1 clear vert tab              */
  118.         "\033B\376",    /* 72 aTBC4 clear all vert tabs         */
  119.                         /* 73 aTBCALL clear all h & v tabs      */
  120.         "\033D\376\033B\376",
  121.                         /* 74 aTBSALL set default tabs          */
  122.         "\033D\010\020\030\040\050\060\070\100\110\120\130\376",
  123.  
  124.         "\377",         /* 75 aEXTEND extended commands         */
  125.         "\377"          /* 76 aRAW next 'n' chars are raw       */
  126. };
  127.  
  128. /*
  129.    For each character from character 160 to character 255, there is
  130.    an entry in this table, which is used to print (or simulate printing of)
  131.    the full Amiga character set. (see AmigaDos Developer's Manual, pp A-3)
  132.    This table is used only if there is a valid pointer to this table
  133.    in the PEDData table in the printertag.asm file, and the VERSION is
  134.    33 or greater.  Otherwise, a default table is used instead.
  135.    To place non-printable characters in this table, you can either enter
  136.    them as in C strings (ie \011, where 011 is an octal number, or as
  137.    \\000 where 000 is any decimal number, from 1 to 3 digits.  This is
  138.    usually used  to enter a NUL into the array (C has problems with it
  139.    otherwise.), or if you forgot your octal calculator.  On retrospect,
  140.    was a poor choice for this function, as you must say \\\\ to enter a
  141.    backslash as a backslash.  Live and learn...
  142. */
  143. char *ExtendedCharTable[] = {
  144.         " ",                                    /* NBSP*/
  145.         "\033R\007[\033R\\0",                   /* i */
  146.         "c\010|",                               /* c| */
  147.         "\033R\003#\033R\\0",                   /* L- */
  148.         "\033R\005$\033R\\0",                   /* o */
  149.         "\033R\010\\\\\033R\\0",                /* Y- */
  150.         "|",                                    /* | */
  151.         "\033R\002@\033R\\0",                   /* SS */
  152.  
  153.         "\033R\001~\033R\\0",                   /* " */
  154.         "c",                                    /* copyright */
  155.         "\033S\\0a\010_\033T",                  /* a_ */
  156.         "<",                                    /* << */
  157.         "~",                                    /* - */
  158.         "-",                                    /* SHY */
  159.         "r",                                    /* registered trademark */
  160.         "-",                                    /* - */
  161.  
  162.         "\033R\001[\033R\\0",                   /* degrees */
  163.         "+\010_",                               /* +_ */
  164.         "\033S\\0002\033T",                     /* 2 */
  165.         "\033S\\0003\033T",                     /* 3 */
  166.         "'",                                    /* ' */
  167.         "u",                                    /* u */
  168.         "P",                                    /* reverse P */
  169.         "\033S\\000.\033T",                     /* . */
  170.  
  171.         ",",                                    /* , */
  172.         "\033S\\0001\033T",                     /* 1 */
  173.         "\033R\001[\033R\\0\010-",              /* o_ */
  174.         ">",                                    /* >> */
  175.         "\033S\\0001\033T\010-\010\033S\0014\033T",     /* 1/4 */
  176.         "\033S\\0001\033T\010-\010\033S\0012\033T",     /* 1/2 */
  177.         "\033S\\0003\033T\010-\010\033S\0014\033T",     /* 3/4 */
  178.         "\033R\007]\033R\\0",                   /* upside down ? */
  179.  
  180.         "A\010`",                               /* `A */
  181.         "A\010'",                               /* 'A */
  182.         "A\010^",                               /* ^A */
  183.         "A\010~",                               /* ~A */
  184.         "\033R\002[\033R\\0",                   /* "A */
  185.         "\033R\004]\033R\\0",                   /* oA */
  186.         "\033R\004[\033R\\0",                   /* AE */
  187.         "C\010,",                               /* C, */
  188.  
  189.         "E\010`",                               /* `E */
  190.         "\033R\011@\033R\\0",                   /* 'E */
  191.         "E\010^",                               /* ^E */
  192.         "E\010\033R\001~\033R\\0",              /* "E */
  193.         "I\010`",                               /* `I */
  194.         "I\010`",                               /* 'I */
  195.         "I\010^",                               /* ^I */
  196.         "I\010\033R\001~\033R\\0",              /* "I */
  197.  
  198.         "D\010-",                               /* -D */
  199.         "\033R\007\\\\\033R\\0",                /* ~N */
  200.         "O\010`",                               /* `O */
  201.         "O\010'",                               /* 'O */
  202.         "O\010^",                               /* ^O */
  203.         "O\010~",                               /* ~O */
  204.         "\033R\002\\\\\033R\\0",                /* "O */
  205.         "x",                                    /* x */
  206.  
  207.         "\033R\004\\\\\033R\\0",                /* 0 */
  208.         "U\010`",                               /* `U */
  209.         "U\010'",                               /* 'U */
  210.         "U\010^",                               /* ^U */
  211.         "\033R\002]\033R\\0",                   /* "U */
  212.         "Y\010'",                               /* 'Y */
  213.         "T",                                    /* Thorn */
  214.         "\033R\002~\033R\\0",                   /* B */
  215.  
  216.         "\033R\001@\033R\\0",                   /* `a */
  217.         "a\010'",                               /* 'a */
  218.         "a\010^",                               /* ^a */
  219.         "a\010~",                               /* ~a */
  220.         "\033R\002{\033R\\0",                   /* "a */
  221.         "\033R\004}\033R\\0",                   /* oa */
  222.         "\033R\004{\033R\\0",                   /* ae */
  223.         "\033R\001\\\\\033R\\0",                /* c, */
  224.  
  225.         "\033R\001}\033R\\0",                   /* `e */
  226.         "\033R\001{\033R\\0",                   /* 'e */
  227.         "e\010^",                               /* ^e */
  228.         "e\010\033R\001~\033R\\0",              /* "e */
  229.         "\033R\006~\033R\\0",                   /* `i */
  230.         "i\010'",                               /* 'i */
  231.         "i\010^",                               /* ^i */
  232.         "i\010\033R\001~\033R\\0",              /* "i */
  233.  
  234.         "d",                                    /* d */
  235.         "\033R\007|\033R\\0",                   /* ~n */
  236.         "\033R\006|\033R\\0",                   /* `o */
  237.         "o\010'",                               /* 'o */
  238.         "o\010^",                               /* ^o */
  239.         "o\010~",                               /* ~o */
  240.         "\033R\002|\033R\\0",                   /* "o */
  241.         ":\010-"                                /* :- */
  242.  
  243.         "\033R\004|\033R\\0",                   /* o/ */
  244.         "\033R\001|\033R\\0",                   /* `u */
  245.         "u\010'",                               /* 'u */
  246.         "u\010^",                               /* ^u */
  247.         "\033R\002}\033R\\0",                   /* "u */
  248.         "y\010'",                               /* 'y */
  249.         "t",                                    /* thorn */
  250.         "y\010\033R\001~\033R\\0"               /* "y */
  251. };
  252.