home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 377b.lha / devices / printer / xerox / data.c next >
Encoding:
Text File  |  1980-02-03  |  7.1 KB  |  240 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.             /* 00 aRIS reset            */
  24.     "\375\033\015P\375",
  25.     "\377",        /* 01 aRIN initialize            */
  26.     "\012",        /* 02 aIND linefeed            */
  27.     "\015\012",    /* 03 aNEL CRLF                */
  28.     "\377",        /* 04 aRI reverse LF            */
  29.     
  30.     "\033R",    /* 05 aSGR0 normal char set        */
  31.     "\377",        /* 06 aSGR3 italics on            */
  32.     "\377",        /* 07 aSGR23 italics off        */
  33.     "\033E",    /* 08 aSGR4 underline on        */
  34.     "\033R",    /* 09 aSGR24 underline off        */
  35.     "\377",        /* 10 aSGR1 boldface on            */
  36.     "\377",        /* 11 aSGR22 boldface off        */
  37.     "\377",        /* 12 aSFC set foreground color        */
  38.     "\377",        /* 13 aSBC set background color        */
  39.     
  40.     "\033F0\033&",    /* 14 aSHORP0 normal pitch        */
  41.     "\033F2",    /* 15 aSHORP2 elite on            */
  42.     "\033F0",    /* 16 aSHORP1 elite off            */
  43.     "\033F4",    /* 17 aSHORP4 condensed fine on        */
  44.     "\033F0",    /* 18 aSHORP3 condensed fine off    */
  45.     "\033W20",    /* 19 aSHORP6 enlarge on        */
  46.     "\033&",    /* 20 aSHORP5 enlarge off        */
  47.     
  48.     "\377",        /* 21 aDEN6 shadow print on        */
  49.     "\377",        /* 22 aDEN5 shadow print off        */
  50.     "\377",        /* 23 aDEN4 double strike on        */
  51.     "\377",        /* 24 aDEN3 double strike off        */
  52.     "\033wa",    /* 25 aDEN2 NLQ on            */
  53.     "\033wb",    /* 26 aDEN1 NLQ off            */
  54.     
  55.     "\033t",    /* 27 aSUS2 superscript on        */
  56.     "\033s",    /* 28 aSUS1 superscript off        */
  57.     "\033u",    /* 29 aSUS4 subscript on        */
  58.     "\033s",    /* 30 aSUS3 subscript off        */
  59.     "\033s",    /* 31 aSUS0 normalize the line        */
  60.     "\377",        /* 32 aPLU partial line up        */
  61.     "\377",        /* 33 aPLD partial line down        */
  62.     
  63.     "\377",        /* 34 aFNT0 Typeface 0            */
  64.     "\377",        /* 35 aFNT1 Typeface 1            */
  65.     "\377",        /* 36 aFNT2 Typeface 2            */
  66.     "\377",        /* 37 aFNT3 Typeface 3            */
  67.     "\377",        /* 38 aFNT4 Typeface 4            */
  68.     "\377",        /* 39 aFNT5 Typeface 5            */
  69.     "\377",        /* 40 aFNT6 Typeface 6            */
  70.     "\377",        /* 41 aFNT7 Typeface 7            */
  71.     "\377",        /* 42 aFNT8 Typeface 8            */
  72.     "\377",        /* 43 aFNT9 Typeface 9            */
  73.     "\377",        /* 44 aFNT10 Typeface 10        */
  74.     
  75.     "\377",        /* 45 aPROP2 proportional on        */
  76.     "\377",        /* 46 aPROP1 proportional off        */
  77.     "\377",        /* 47 aPROP0 proportional clear        */
  78.     "\377",        /* 48 aTSS set proportional offset    */
  79.     "\377",        /* 49 aJFY5 auto left justify        */
  80.     "\377",        /* 50 aJFY7 auto right justify        */
  81.     "\377",        /* 51 aJFY6 auto full jusitfy        */
  82.     "\377",        /* 52 aJFY0 auto jusity off        */
  83.     "\377",        /* 53 aJFY3 letter space        */
  84.     "\377",        /* 54 aJFY1 word fill            */
  85.     
  86.     "\377",        /* 55 aVERP0 1/8" line spacing        */
  87.     "\377",        /* 56 aVERP1 1/6" line spacing        */
  88.     "\033\014",    /* 57 aSLPP set form length        */
  89.     "\377",        /* 58 aPERF perf skip n (n > 0)        */
  90.     "\377",        /* 59 aPERF0 perf skip off        */
  91.     
  92.     "\0339",    /* 60 aLMS set left margin        */
  93.     "\0330",    /* 61 aRMS set right margin        */
  94.     "\377",        /* 62 aTMS set top margin        */
  95.     "\377",        /* 63 aBMS set bottom margin        */
  96.     "\377",        /* 64 aSTBM set T&B margins        */
  97.     "\377",        /* 65 aSLRM set L&R margins        */
  98.     "\377",        /* 66 aCAM clear margins        */
  99.     
  100.     "\0331",    /* 67 aHTS set horiz tab        */
  101.     "\377",        /* 68 aVTS set vert tab            */
  102.     "\0338",    /* 69 aTBC0 clear horiz tab        */
  103.     "\0332",    /* 70 aTBC3 clear all horiz tabs    */
  104.     "\377",        /* 71 aTBC1 clear vert tab        */
  105.     "\377",        /* 72 aTBC4 clear all vert tabs        */
  106.     "\0332",    /* 73 aTBCALL clear all h & v tabs    */
  107.             /* 74 aTBSALL set default tabs        */
  108.     "\033i9,17,25,33,41,49,57,65,73,81,89,97,105,113,121,129",
  109.  
  110.     "\377",        /* 75 aEXTEND extended commands        */
  111.     "\377"        /* 76 aRAW next 'n' chars are raw    */
  112. };
  113.  
  114.  
  115. char *ExtendedCharTable[] = {
  116. /*
  117.     " ", "!", "c", "L", "o", "Y", "|", "S",
  118.     "\"", "c", "a", "`", "~", "-", "r", "-",
  119.     "*", "+", "2", "3", "'", "u", "P", ".",
  120.     ",", "1", "o", "'", "/", "/", "/", "?",
  121.     "A", "A", "A", "A", "A", "A", "A", "C",
  122.     "E", "E", "E", "E", "I", "I", "I", "I",
  123.     "D", "N", "O", "O", "O", "O", "O", "x",
  124.     "O", "U", "U", "U", "U", "Y", "T", "3",
  125.     "a", "a", "a", "a", "a", "a", "a", "c",
  126.     "e", "e", "e", "e", "i", "i", "i", "i",
  127.     "d", "n", "o", "o", "o", "o", "o", "/",
  128.     "o", "u", "u", "u", "u", "y", "t", "y"
  129. };
  130.  
  131. */
  132.     " ",            /*    ok */
  133.     "!",            /* !  ok */
  134.     "\174\010c",        /* "  ok */
  135.     "\323",            /* #  ok */
  136.     "\324",            /* $  ok */
  137.     "-\010Y",        /* %  ok */
  138.     "|",            /* &  ok */
  139.     "\335\010S",        /* '  ok */
  140.  
  141.     "\310 ",        /* (  ok */
  142.     "c",            /* )  ok */
  143.     "\314a",        /* *  ok */
  144.     "`",            /* +  ok */
  145.     "\305 ",        /* ,  ok */
  146.     "-",            /* -  ok */
  147.     "r",            /* .  ok */
  148.     "\305 ",        /* /  ok */
  149.  
  150.     "\312 ",        /* 0  ok */
  151.     "\314+",        /* 1  ok */
  152.     "2",             /* 2  ok */
  153.     "3",             /* 3  ok */
  154.     "\302 ",        /* 4  ok */
  155.     "\330",            /* 5  ok */
  156.     "P",            /* 6  ok */
  157.     "\335",            /* 7  ok */
  158.  
  159.     ",",            /* 8  ok */
  160.     "1",             /* 9  ok */
  161.     "\314o",        /* :  ok */
  162.     "'",            /* ;  ok */
  163.     "/",            /* <  ok */
  164.     "/",            /* =  ok */
  165.     "/",            /* >  ok */
  166.     "\334",            /* ?  ok */
  167.  
  168.     "\301A",        /* @  ok */
  169.     "\302A",        /* A  ok */
  170.     "\303A",        /* B  ok */
  171.     "\304A",        /* C  ok */
  172.     "\310A",        /* D  ok */
  173.     "\312A",        /* E  ok */
  174.     "\322",            /* F  ok */
  175.     "\313C",        /* G  ok */
  176.  
  177.     "\301E",        /* H  ok */
  178.     "\302E",        /* I  ok */
  179.     "\303E",        /* J  ok */
  180.     "\310E",        /* K  ok */
  181.     "\301I",        /* L  ok */
  182.     "\302I",        /* M  ok */
  183.     "\303I",        /* N  ok */
  184.     "\310I",        /* O  ok */
  185.  
  186.     "-\010D",        /* P  ok */
  187.     "\304N",        /* Q  ok */
  188.     "\301O",        /* R  ok */
  189.     "\302O",        /* S  ok */
  190.     "\303O",        /* T  ok */
  191.     "\304O",        /* U  ok */
  192.     "\310O",        /* V  ok */
  193.     "x",            /* W  ok */
  194.  
  195.     "0",            /* X  ok */
  196.     "\301U",        /* Y  ok */
  197.     "\302U",        /* Z  ok */
  198.     "\303U",        /* [  ok */
  199.     "\310U",        /* \  ok */
  200.     "\302Y",        /* ]  ok */
  201.     "T",            /* ^  ok */
  202.     "\333",            /* _  ok */
  203.  
  204.     "\301a",        /* `  ok */
  205.     "\302a",        /* a  ok */
  206.     "\303a",        /* b  ok */
  207.     "\304a",        /* c  ok */
  208.     "\310a",        /* d  ok */
  209.     "\312a",        /* e  ok */
  210.     "\321",            /* f  ok */
  211.     "\313c",        /* g  ok */
  212.  
  213.     "\301e",        /* h  ok */
  214.     "\302e",        /* i  ok */
  215.     "\303e",        /* j  ok */
  216.     "\310e",        /* k  ok */
  217.     "\301i",        /* l  ok */
  218.     "\302i",        /* m  ok */
  219.     "\303i",        /* n  ok */
  220.     "\310i",        /* o  ok */
  221.  
  222.     "d",            /* p  ok */
  223.     "\304n",        /* q  ok */
  224.     "\301o",        /* r  ok */
  225.     "\302o",        /* s  ok */
  226.     "\303o",        /* t  ok */
  227.     "\304o",        /* u  ok */
  228.     "\310o",        /* v  ok */
  229.     "/",            /* w  ok */
  230.  
  231.     "\311o",        /* x  ok */
  232.     "\301u",        /* y  ok */
  233.     "\302u",        /* z  ok */
  234.     "\303u",        /* {  ok */
  235.     "\310u",        /* |  ok */
  236.     "\302y",        /* }  ok */
  237.     "t",            /* ~  ok */
  238.     "\310y"            /*    ok */
  239. };
  240.