home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 377b.lha / devices / printer / epsonx / data.c next >
Encoding:
Text File  |  1980-02-03  |  8.1 KB  |  242 lines

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