home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 269_01 / manual1.doc < prev    next >
Encoding:
Text File  |  1987-05-17  |  31.9 KB  |  1,458 lines

  1.  
  2.  
  3.  
  4.  
  5.             ╔════════════════════════════════════════════════╗
  6.             ║                                                ║
  7.             ║               Unicorn  Library                 ║
  8.             ║                of C functions                  ║
  9.             ║                                                ║
  10.             ║                  Version 4.0                   ║
  11.             ║                                                ║
  12.             ║               Reference Manual                 ║
  13.             ║                                                ║
  14.             ║                                                ║
  15.             ║       For MicroSoft C & the Tandy 1000         ║
  16.             ║                 or IBM-PC                      ║
  17.             ║                                                ║
  18.             ║                                                ║
  19.             ║           Copyright (c) 1986, 1987             ║
  20.             ║                     by                         ║
  21.             ║               David A. Miller                  ║
  22.             ║                     for                        ║
  23.             ║              Unicorn  Software                 ║
  24.             ║                                                ║
  25.             ╚════════════════════════════════════════════════╝
  26.  
  27.  
  28.  
  29.        This library may be used for non-commercial purposes by individual
  30.      users without payment or royalties of any kind.  Registration with
  31.      the author provides the user with a license to use the library in
  32.      commercial programs without royalty payments, along with complete
  33.      Ecommented source codeF for the library.  The registration fee
  34.      is $25.00 for this version and will include notification of all
  35.      updates.  Updates will be $10.00 without a disk or $8.00 with a
  36.      disk.
  37.  
  38.      Please note that multiple versions of the library exist.  The
  39.      machine this version is to be used on is listed above.  The Tandy
  40.      1000 version provides full access to the full 16 color medium
  41.      resolution mode while the IBM version uses the 4 color medium
  42.      resolution mode.
  43.  
  44.      Some of the functions are listed for one machine only.  Using them
  45.      on the wrong machine will possibly cause a crash.
  46.  
  47.      When Linking the Libraries Eit is imperative that the appropriate
  48.      front end library be linked firstF.  If you are using an IBM-PC or
  49.      wish to use 4 color graphics on a Tandy-1000 you must link the
  50.      library UCGRIBM.LIB first and the the UNICORN Library second.  If
  51.      you wish to use 16 color graphics on a Tandy-1000 be sure to link
  52.      UCGRTDY and the UNICORN.
  53.  
  54.      Commands are listed on the following pages in alphabetical order
  55.      along with function specifications and sample calls.  Note that
  56. è     the graphics mode generally used in the examples is mode 4, but
  57.      the Tandy 1000 should use mode 9 for the 16 color graphics.
  58.  
  59.  
  60.  
  61.  
  62.      Registration may be accomplished by filling out this page and sending
  63.      it to the author with a $20.00 donation to cover costs.  Help support
  64.      the idea of freeware.  It is a method whereby software authors may
  65.      make available to the general user various types of software at a
  66.      minimum cost.  It benefits the entire computer community so do your
  67.      part.
  68.  
  69.      Name: ________________________________________
  70.  
  71.      Address: _____________________________________
  72.  
  73.      City: _____________________
  74.  
  75.      State: ________
  76.  
  77.      Zip: _________
  78.  
  79.      Library Version:   Version 4.0 P    For Microsoft C  small model
  80.  
  81.      Version Desired (circle 1):
  82.  
  83.           Microsoft C 4.0       Lattice C 3.0           Turbo C
  84.       
  85.           I wish a Tandy 1000 version also: yes / no
  86.  
  87.      Computer Type and model: _________________________
  88.  
  89.      Received this copy of the library from: ______________________
  90.      This will enable us to check distribution and provide updates.
  91.  
  92.      Comments concerning the library and additional functions desired may
  93.      be listed on the back of the page.
  94.  
  95.      I understand that by submitting this form with the proper donation I
  96.      will receive a disk with ALL source code for the latest version.  I also
  97.      undetstand that this allows me to use the library in any commercial or
  98.      non-commercial application I desire without payment of additional fees
  99.      of any type.
  100.  
  101.      I understand that the source code is proprietary and agree not to give
  102.      it to third parties although I understand I may give the actual libraries
  103.      to third parties as long as I include all documentation and copyright
  104.      notices with or without registering my library and no fee other than
  105.      a handling fee of no more than $10.00 is charged by a user group or
  106.      club.
  107.  
  108.  
  109.  
  110.      Unicorn Library Documentation  3.1                         page 1
  111. è
  112.      __________________________________________________________________
  113. F
  114.  
  115.      Some of the functions contained in this library require the Lattice
  116.      floating point functions.  Be sure to link it into your program.
  117.  
  118.      At the present time only the Large model is supported.  This was
  119.      done since graphics programs tend to become rather large.
  120.  
  121.      All parameters are integers unless otherwise noted in this document.
  122.  
  123.      EFor the Tandy version all parameters concerning color may be any of
  124.      the 16 colors.F  For the IBM the color set consists of colors 1, 2,
  125.      and 3 and a background color.
  126.  
  127.  
  128.  
  129.      The Author may be contacted at the below address for registration
  130.      of your copy of the library.  This library may be freely copied and
  131.      distributed as long as a reasonable fee of no more than $10.00 is
  132.      charged for the service.  Registration with the author will provide
  133.      you with a license to use the library in programs for sale or
  134.      distribution without royalty payments along with the library
  135.      commented source code.  The Esource code may NOT be distributed
  136.      without express written permission of the authorF.
  137.  
  138.      Future versions will add both graphics and non-graphics functions.
  139.      Contemplated at present are animation commands, further string and
  140.      data handling including screen generation and tree functions along
  141.      with others.  The author may be contacted directly concerning the
  142.      updates.
  143.  
  144.      Support this and all freeware programs.  It is a way for authors
  145.      to make programming available to users at a reasonable cost and
  146.      thus helps both the user and the end user.
  147. E
  148.  
  149.                              David A. Miller
  150.                              18559 8th Ave. NE
  151.                              Seattle, WA  98155
  152.                              (206) 361-0553
  153.                              please no
  154.                              collect calls
  155.  
  156.      This library is a product of Unicorn Software.
  157. F
  158.  
  159.  
  160.  
  161. E
  162.      Unicorn Library Documentation  3.1                         page 2
  163.  
  164.      __________________________________________________________________
  165.  
  166. è                               atsay
  167. F
  168.     This function is similar to the dBASE function of the same name.  It
  169.     allows the user to print a string in color at a specified location
  170.     on the screen.
  171.  
  172.  
  173.  
  174.     Call:      atsay(row, column, color, string);
  175.  
  176.                row     =  row in which to begin string
  177.                column  =  column in which to begin string
  178.                color   =  color in which to print string
  179.                string  =  string to be printed
  180.  
  181.  
  182.  
  183.  
  184.     Example:   main()
  185.                {
  186.                   atsay(5, 10, 3, "Testing!");
  187.                }
  188.  
  189.                This will print the string "Testing!" beginning at row 5
  190.                column 10 in color number 3.
  191.  
  192.  
  193.  
  194.  
  195. E
  196.      Unicorn Library Documentation  3.1                         page 3
  197.  
  198.      __________________________________________________________________
  199.  
  200.                                backclr
  201. F
  202.      Sets the background color of the graphics screen.
  203.  
  204.  
  205.  
  206.      Call:   backclr(color);
  207.  
  208.              color  =  desired background color
  209.  
  210.  
  211.  
  212.      Example:    main()
  213.                  {
  214.                     sm(4);        /*  set the graphics mode */
  215.                     backclr(14);  /*  sets background color to yellow */
  216.                  }
  217.  
  218.  
  219.  
  220.  
  221. èE
  222.      Unicorn Library Documentation  3.1                         page 4
  223.  
  224.      __________________________________________________________________
  225.  
  226.                               box
  227. F
  228.      Plots a rectangular uotline on the graphics screen.  The upper left
  229.      corner and the lower right corner coordinates are used to define
  230.      the box.
  231.  
  232.  
  233.  
  234.  
  235.      Call:      box(ulc, ulr, lrc, lrr, color);
  236.  
  237.                 ulc    =  upper left corner column
  238.                 ulr    =  upper left corner row
  239.                 lrc    =  lower right corner column
  240.                 lrr    =  lower right corner row
  241.                 color  =  color to draw box
  242.  
  243.  
  244.      Example:    main()
  245.                  {
  246.                      sm(4);     /*  Set graphics mode */
  247.  
  248.                      /* draw a box from 10, 20 to 100, 140 in color 3 */
  249.  
  250.                      box(10, 20, 100, 140, 3);
  251.                  }
  252.  
  253.  
  254. E
  255.      Unicorn Library Documentation  3.1                         page 5
  256.  
  257.      __________________________________________________________________
  258.  
  259.                              box1
  260. F
  261.      Paints a one pixel wide border around a filled box.  The fill and
  262.      border colors may be separately specified.
  263.  
  264.  
  265.  
  266.      Call:   box1(ulc, ulr, lrc, lrr, colorb, colorf);
  267.  
  268.              ulc     = upper left corner column
  269.              ulr     = upper left corner row
  270.              lrc     = lower right corner column
  271.              lrr     = lower right corner row
  272.              colorb  = border color
  273.              colorf  = fill color
  274.  
  275.  
  276. è
  277.      Example:   main()
  278.                 {
  279.                    sm(4);       /* set a graphics mode */
  280.  
  281.                    /*  make a box from 10, 20 to 100,140 with a border
  282.                        in color 3 and filled with color 2             */
  283.  
  284.                    box110,20,100,140,3,2);
  285.  
  286.  
  287.  
  288. E
  289.      Unicorn Library Documentation  3.1                         page 6
  290.  
  291.      __________________________________________________________________
  292.  
  293.                              box2
  294. F
  295.      Paints a two pixel wide border around a filled box.  The fill and
  296.      border colors may be separately specified.
  297.  
  298.  
  299.  
  300.  
  301.  
  302.      Call:   box2(ulc, ulr, lrc, lrr, colorb, colorf);
  303.  
  304.              ulc     = upper left corner column
  305.              ulr     = upper left corner row
  306.              lrc     = lower right corner column
  307.              lrr     = lower right corner row
  308.              colorb  = border color
  309.              colorf  = fill color
  310.  
  311.  
  312.  
  313.  
  314.      Example:   main()
  315.                 {
  316.                    sm(4);       /* set a graphics mode */
  317.  
  318.                    /*  make a box from 10, 20 to 100,140 with a border
  319.                        in color 3 and filled with color 2             */
  320.  
  321.                    box2(10,20,100,140,3,2);
  322.  
  323.  
  324.  
  325. E
  326.      Unicorn Library Documentation  3.1                         page 7
  327.  
  328.      __________________________________________________________________
  329.  
  330.                              boxfill
  331. èF
  332.      A function to plot a solid filled rectangle on the graphics screen.
  333.      It draws using the upper left corner and lower right corner
  334.      coordinates.
  335.  
  336.  
  337.      Call:   boxfill(ulc, ulr, lrc, lrr, color);
  338.  
  339.              ulc    =  upper left corner column
  340.              ulr    =  upper left corner row
  341.              lrc    =  lower right corner column
  342.              lrr    =  lower right corner row
  343.              color  =  color to paint rectangle
  344.  
  345.  
  346.  
  347.      Example:   main()
  348.                 {
  349.                    sm(4);    /*  set a graphics mode  */
  350.  
  351.                    /*  paint a box from 10, 20 to 100, 140 in color 3 */
  352.  
  353.                    boxfill(10,20,100,140,3);
  354.                 }
  355.  
  356.  
  357.  
  358.  
  359. E
  360.      Unicorn Library Documentation  3.1                         page 8
  361.  
  362.      __________________________________________________________________
  363.  
  364.                               circarea
  365. F
  366.      Returns the area of a circle from a passed radius.  Both the radius
  367.      and the return are doubles.
  368.  
  369.  
  370.  
  371.  
  372.  
  373.      Call:   circarea(radius);
  374.  
  375.              radius  =  radius of circle (double);
  376.  
  377.  
  378.  
  379.  
  380.      Example:     main()
  381.                   {
  382.                      double a, circarea();
  383.                      a = circarea(67.45);
  384.                   }
  385.  
  386. è
  387.  
  388.  
  389. E
  390.      Unicorn Library Documentation  3.1                         page 9
  391.  
  392.      __________________________________________________________________
  393.  
  394.                                circle
  395. F
  396.      Plots a circle on the graphics screen.
  397.  
  398.  
  399.  
  400.      Call:   circle(xc, yc, radius, aspectn, aspectd, color);
  401.  
  402.              xc       =  column coordinate of the center
  403.              yc       =  row coordinate of the center
  404.              aspectn  =  numerator of the aspect ratio
  405.              aspectd  =  denominator of the aspect ratio
  406.              color    =  color of the circle
  407.  
  408.  
  409.  
  410.      Example:  main()
  411.                {
  412.                   sm(4);   /* set a grphics mode */
  413.  
  414.                   /* draw a circle of radius 20 centered at 50, 60 in
  415.                   color 2                                             */
  416.  
  417.                   circle(50, 60, 20, 1, 1, 2);
  418.  
  419.  
  420.  
  421.  
  422.  
  423. E
  424.      Unicorn Library Documentation  3.1                         page 10
  425.  
  426.      __________________________________________________________________
  427.  
  428.                               circum
  429. F
  430.      Returns the circumference of a circle as a double from a given
  431.      radius which is also a double.
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.      Call:   circum(radius);
  439.  
  440.              radius  =  radius of circle (double)
  441. è
  442.  
  443.  
  444.      Example:     main()
  445.                   {
  446.                      double circum(), a;
  447.                      a = circum(4.56);
  448.                   }
  449.  
  450.  
  451.  
  452. Unicorn 1 Documentation  3.1                                      page 11
  453.  
  454. __________________________________________________________________________
  455.  
  456.  
  457.                                 cls
  458.  
  459.  
  460. This function clears the screen by reading the current video mode then
  461. reseting that mode.
  462.  
  463.  
  464.  
  465.  
  466.  
  467. Call:         cls();
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. Example:      main()
  475.               {
  476.                   cls();  /* read the mode, reset it, which clears screen */
  477.               }
  478.  
  479.  
  480. E
  481.      Unicorn Library Documentation  3.1                         page 12
  482.  
  483.      __________________________________________________________________
  484.  
  485.                               countch
  486.  
  487. F     Returns the number of times a character appears in a given string.
  488.  
  489.  
  490.  
  491.  
  492.  
  493.      Call:   countch(str, ch);
  494.  
  495.              str  =  string to search
  496. è             ch   =  character to search for
  497.  
  498.  
  499.  
  500.  
  501.      Example:    main()
  502.                  {
  503.                     /* find the number of i's in the string "This is a
  504.                        test".  should return 2 */
  505.                     countch("This is a test", 'i');
  506.                   }
  507.  
  508.  
  509. Unicorn 1 Documentation  3.1                                      page 13
  510.  
  511. __________________________________________________________________________
  512.  
  513.  
  514.                                ctone
  515.  
  516.  
  517. This function sounds a tone using the IBM mode of sound.  Compatible with
  518. IBM-PC and close compatibles.
  519.  
  520.  
  521.  
  522.  
  523. Call:         ctone(freq, duration);
  524.  
  525.               freq      =  the frequency in HZ for the tone
  526.               duration  =  the duration of the tone in milliseconds
  527.  
  528.  
  529.  
  530.  
  531.  
  532. Example:      main()
  533.               {
  534.                  ctone(1000, 500);  /* sound a 500 msec tone of 1000 HZ */
  535.               }
  536.  
  537.  
  538.  
  539. E
  540.      Unicorn Library Documentation  3.1                         page 14
  541.  
  542.      __________________________________________________________________
  543.  
  544.                               cubert
  545. F     Returns cube roots of numbers accurate to 10 decimal places.  Both
  546.      the number and the return are floats.
  547.  
  548.  
  549.  
  550.  
  551. è
  552.  
  553.      Call:    cubert(number);
  554.  
  555.               number  =  floating point number to find the cube root of.
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.      Example:     main()
  563.                   {
  564.                      cubert(5.76);
  565.                   }
  566.  
  567.  
  568.  
  569.  
  570. E
  571.      Unicorn Library Documentation  3.1                         page 15
  572.  
  573.      __________________________________________________________________
  574.  
  575.                               dectooct
  576. F
  577.      Converts a decimal number to an octal representation of the same
  578.      number.  It is NOT a true octal value only a representation.
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.      Call:   dectooct(decimal);
  586.  
  587.              decimal  =  decimal number;
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.      Example:    main()
  595.                  {
  596.                     int a;
  597.                     a = dectooct(56);
  598.                  }
  599.  
  600.  
  601.  
  602. E
  603.      Unicorn Library Documentation  3.1                         page 16
  604.  
  605.      __________________________________________________________________
  606. è
  607.                               deg2rad
  608. F
  609.      Converts angles in degrees to the equivalent radian value.  Both the
  610.      angle and the return are doubles.
  611.  
  612.  
  613.  
  614.  
  615.  
  616.      Call:   deg2rad(angle);
  617.  
  618.              angle  =  angle in degrees
  619.  
  620.  
  621.  
  622.  
  623.  
  624.      Example:     main()
  625.                   {
  626.                      double deg2rad(), a;
  627.                      a = deg2rad(56.78);
  628.                   }
  629.  
  630.  
  631.  
  632. E
  633.      Unicorn Library Documentation  3.1                         page 17
  634.  
  635.      __________________________________________________________________
  636.  
  637.                                delay
  638. F
  639.      Delays in multiples of 1 millisecond.
  640.  
  641.  
  642.  
  643.  
  644.      Call:  delay(count);
  645.  
  646.             count  =  the number of milliseconds to delay
  647.  
  648.  
  649.  
  650.  
  651.      Example:   main()
  652.                 {
  653.                    delay(1000); /* pause for 1 second */
  654.                 }
  655.  
  656.  
  657. E
  658.      Unicorn Library Documentation  3.1                         page 18
  659.  
  660.      __________________________________________________________________
  661. è
  662.                                drawfig
  663. F
  664.      Draws an outline figure on the graphics screen form a passed array
  665.      of column and row coordinates.
  666.  
  667.  
  668.  
  669.      Call:   drawfig(np, xa, ya, color);
  670.  
  671.              np     =  the number of points in the passed arrays
  672.              xa     =  array of column coordinates
  673.              ya     =  array of row coordinates
  674.              color  =  color of the outline figure
  675.  
  676.  
  677.      Example:   main()
  678.                 {
  679.                    sm(4);  /* set a graphics mode */
  680.                    int xa[4] = {10, 40, 50, 60};
  681.                    int ya[4] = {50, 20, 70, 90};
  682.                    int np;
  683.                    drawfig(4, xa, ya, 3);
  684.                 }
  685.  
  686.  
  687. Unicorn 1 Documentation  3.1                                      page 19
  688.  
  689. __________________________________________________________________________
  690.  
  691.  
  692.                                dx120bs
  693.  
  694.  
  695. This function backspaces the daisy wheel printer 1/120 th of an inch.
  696.  
  697.  
  698.  
  699.  
  700. Call:         dx120bs();
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707. Example:      main()
  708.               {
  709.                  dx120bs();  /* backspace the printer 1/120 the inch */
  710.               }
  711.  
  712.  
  713.  
  714. Unicorn 1 Documentation  3.1                                      page 20
  715.  
  716. è__________________________________________________________________________
  717.  
  718.  
  719.                                dxback
  720.  
  721.  
  722. Select backwards prining.  Does not affect cr, tabs or paper movement
  723. commands.
  724.  
  725.  
  726.  
  727.  
  728.  
  729. Call:         dxback();
  730.  
  731.  
  732.  
  733.  
  734. Example:      main()
  735.               {
  736.                  dxback(); /* select backwards printing */
  737.               }
  738.  
  739.  
  740.  
  741. Unicorn 1 Documentation  3.1                                      page 21
  742.  
  743. __________________________________________________________________________
  744.  
  745.  
  746.                                dxbi
  747.  
  748.  
  749. This function sets the bidirectional print mode for the daisy wheel
  750. printer.
  751.  
  752.  
  753.  
  754.  
  755. Call:         dxbi();
  756.  
  757.  
  758.  
  759.  
  760.  
  761. Example:      main()
  762.               {
  763.                  dxbi();  /* set bi-directional mode */
  764.               }
  765.  
  766.  
  767.  
  768. Unicorn 1 Documentation  3.1                                      page 22
  769.  
  770. __________________________________________________________________________
  771. è
  772.  
  773.                                dxboldst
  774.  
  775.  
  776. This sets the daisy wheel printer to begin bold printing.
  777.  
  778.  
  779.  
  780. Call:         dxboldst();
  781.  
  782.  
  783.  
  784.  
  785. Example:      main()
  786.               {
  787.                  dxboldst();  /* start bold printing */
  788.               }
  789.  
  790.  
  791.  
  792. Unicorn 1 Documentation  3.1                                      page 23
  793.  
  794. __________________________________________________________________________
  795.  
  796.  
  797.                                dxbs
  798.  
  799.  
  800. This function backspaces the daisy wheel printer 1 full character width.
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807. Call:         dxbs();
  808.  
  809.  
  810.  
  811.  
  812. Example:      main()
  813.               {
  814.                  dxbs(); /* back space the daisy wheel 1 character width */
  815.               }
  816.  
  817.  
  818.  
  819. Unicorn 1 Documentation  3.1                                      page 24
  820.  
  821. __________________________________________________________________________
  822.  
  823.  
  824.                                dxbsend
  825.  
  826. èThis ends bold and shadow modes of printing on the daisy wheel printer.
  827.  
  828.  
  829.  
  830.  
  831. Call:         dxbsend();
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838. Example:      main()
  839.               {
  840.                  dxbsend(); /* end any bold or shadow printing */
  841.               }
  842.  
  843.  
  844. Unicorn 1 Documentation  3.1                                      page 25
  845.  
  846. __________________________________________________________________________
  847.  
  848.  
  849.                                dxchwide
  850.  
  851.  
  852. Set the character width in 1/120 ths inch.  Also know as the HMI (horizontal
  853. motion index).
  854.  
  855.  
  856.  
  857.  
  858. Call:         dxchwide(n);
  859.  
  860.               n = the number of 120ths of an inch
  861.  
  862.  
  863.  
  864.  
  865. Example:      main()
  866.               {
  867.                  dxchwide(10); /* set to 10/120 inch or 12 pitch */
  868.               }
  869.  
  870.  
  871.   Unicorn 1 Documentation  3.1                                      page 26
  872.  
  873. __________________________________________________________________________
  874.  
  875.  
  876.                                dxclr1tb
  877.  
  878.  
  879. This clears a single tab setting on the daisy wheel printer at the current
  880. column.
  881. è
  882.  
  883.  
  884.  
  885.  
  886. Call:         dxclr1tb();
  887.  
  888.  
  889.  
  890.  
  891.  
  892. Example:      main()
  893.               {
  894.                  dxclr1tb(); /* clears a tab at current column */
  895.               }
  896.  
  897.  
  898.  
  899. Unicorn 1 Documentation  3.1                                      page 27
  900.  
  901. __________________________________________________________________________
  902.  
  903.  
  904.                                dxclrtab
  905.  
  906.  
  907. Clears all horizontal tabs that were set by the dxsetht command.
  908.  
  909.  
  910.  
  911.  
  912.  
  913. Call:         dxclrtab();
  914.  
  915.  
  916.  
  917.  
  918.  
  919. Example:      main()
  920.               {
  921.                  dxclrtab(); /* clear ALL horizontal tabs */
  922.               }
  923.  
  924.  
  925.  
  926. Unicorn 1 Documentation  3.1                                      page 28
  927.  
  928. __________________________________________________________________________
  929.  
  930.  
  931.                                dxcr
  932.  
  933.  
  934. Sends a carriage return to the printer.  May or may not start a new line
  935. depending on switch settings.
  936. è
  937.  
  938.  
  939.  
  940. Call:         dxcr();
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947. Example:      main()
  948.               {
  949.                  dxcr();  /* send a carriage return */
  950.               }
  951.  
  952.  
  953.  
  954. Unicorn 1 Documentation  3.1                                      page 29
  955.  
  956. __________________________________________________________________________
  957.  
  958.  
  959.                                dxdefwid
  960.  
  961.  
  962. Select the default character width or HMI.
  963.  
  964.  
  965.  
  966.  
  967.  
  968. Call:         dxdefwid();
  969.  
  970.  
  971.  
  972.  
  973.  
  974. Example:      main()
  975.               {
  976.                  dxdefwid(); /* select the default width according to
  977.                                 switch settings.                      */
  978.               }
  979.  
  980.  
  981. Unicorn 1 Documentation  3.1                                      page 30
  982.  
  983. __________________________________________________________________________
  984.  
  985.  
  986.                                dxeject
  987.  
  988.  
  989.  
  990. Eject a single sheet of paper without loading a new sheet when using the
  991. èsingle sheet feeder option.
  992.  
  993.  
  994.  
  995.  
  996.  
  997. Call:         dxeject();
  998.  
  999.  
  1000.  
  1001.  
  1002. Example:      main()
  1003.               {
  1004.                  dxeject();  /* eject page without loding new paper */
  1005.               }
  1006.  
  1007.  
  1008. Unicorn 1 Documentation  3.1                                      page 31
  1009.  
  1010. __________________________________________________________________________
  1011.  
  1012.  
  1013.                                dxff
  1014.  
  1015.  
  1016. Send a form feed character to the daisy wheel printer.
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022. Call:         dxff();
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029. Example:      main()
  1030.               {
  1031.                  dxff();  /* send form feed to daisy wheel printer */
  1032.               }
  1033.  
  1034.  
  1035. Unicorn 1 Documentation  3.1                                      page 32
  1036.  
  1037. __________________________________________________________________________
  1038.  
  1039.  
  1040.                                dxfor
  1041.  
  1042.  
  1043. Selects forward printing.  Used to cancel the backwards printing selected
  1044. by dxback.
  1045.  
  1046. è
  1047.  
  1048.  
  1049.  
  1050. Call:         dxfor();
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058. Example:      main()
  1059.               {
  1060.                  dxback();  /* select backwards printing */
  1061.                  dxfor();   /* cancel backwards printing */
  1062.               }
  1063.  
  1064.  
  1065. Unicorn 1 Documentation  3.1                                      page 33
  1066.  
  1067. __________________________________________________________________________
  1068.  
  1069.  
  1070.                                dxhlf
  1071.  
  1072.  
  1073. Advances the page 1/2 of the current line spacing.  Used with dxrhlf to
  1074. produce sub/superscripts.
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080. Call:         dxhlf();
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087. Example:      main()
  1088.               {
  1089.                  dxhlf();  /* move half line feed for a subscript */
  1090.                  dxrhlf(); /* move back to previous line */
  1091.               }
  1092.  
  1093.  
  1094. Unicorn 1 Documentation  3.1                                      page 34
  1095.  
  1096. __________________________________________________________________________
  1097.  
  1098.  
  1099.                                dxht
  1100.  
  1101. è
  1102. Sends a horizontal tab (HT) character to the daisy wheel printer.  Tab
  1103. stops must be set with dxsetht.
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109. Call:         dxht();
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116. Example:      main()
  1117.               {
  1118.                  dxht(); /* move to next tab stop set by dxsetht */
  1119.               }
  1120.  
  1121.  
  1122. Unicorn 1 Documentation  3.1                                      page 35
  1123.  
  1124. __________________________________________________________________________
  1125.  
  1126.  
  1127.                                dxinit
  1128.  
  1129.  
  1130. Initializes daisy wheel printer to normal power on settings.
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136. Call:         dxinit();
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143. Example:      main()
  1144.               {
  1145.                  dxinit(); /* cancel all previous settings and return to
  1146.                               default power on settings */
  1147.               }
  1148.  
  1149.  
  1150.  
  1151. Unicorn 1 Documentation  3.1                                      page 36
  1152.  
  1153. __________________________________________________________________________
  1154.  
  1155.  
  1156. è                               dxlf
  1157.  
  1158.  
  1159.  
  1160. Advances the paper one current line spacing.  Remains in current column.
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166. Call:         dxlf();
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174. Example:      main()
  1175.               {
  1176.                  dxlf(); /* advance paper one line */
  1177.               }
  1178.  
  1179.  
  1180.  
  1181. Unicorn 1 Documentation  3.1                                      page 37
  1182.  
  1183. __________________________________________________________________________
  1184.  
  1185.  
  1186.                                dxlinsp
  1187.  
  1188.  
  1189.  
  1190. Sets the line spacing for line feed characters to (n-1)/48 inch.  The value
  1191. of n can range from 1 to 126.  This is sometimes refered to as vertical
  1192. motion index (VMI).
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198. Call:         dxlinsp();
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204. Example:      main()
  1205.               {
  1206.                  dxlinsp(6); /* set line spacing to 6/48 inch or 8 lines/in */
  1207.               }
  1208.  
  1209.  
  1210. Unicorn 1 Documentation  3.1                                      page 38
  1211. è
  1212. __________________________________________________________________________
  1213.  
  1214.  
  1215.                                dxlmarg
  1216.  
  1217.  
  1218. Set the left margin at the current column.
  1219.  
  1220.  
  1221.  
  1222.  
  1223. Call:         dxlmarg();
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229. Example:      main()
  1230.               {
  1231.                  dxlmarg(); /* set the left margin to current location */
  1232.               }
  1233.  
  1234.  
  1235. Unicorn 1 Documentation  3.1                                      page 39
  1236.  
  1237. __________________________________________________________________________
  1238.  
  1239.  
  1240.                                dxpglen
  1241.  
  1242.  
  1243. Sets the page length to n lines.   This is stored as an absolute length
  1244. and does not change if you change line spacing.  This also sets the top
  1245. of form to current paper location.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251. Call:         dxpglen(n);
  1252.  
  1253.               n = number of lines on one page
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260. Example:      main()
  1261.               {
  1262.                  dxpglen(66); /* set page to 66 lines, normal 11" paper */
  1263.               }
  1264.  
  1265.  
  1266. è
  1267. Unicorn 1 Documentation  3.1                                      page 40
  1268.  
  1269. __________________________________________________________________________
  1270.  
  1271.  
  1272.                                dxrhlf
  1273.  
  1274.  
  1275. Roll the paper down one half current line spacing.  See dxhlf for further
  1276. uses and details.
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282. Call:         dxrhlf();
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Example:      main()
  1291.               {
  1292.                  dxhlf();  /* move half line feed for a subscript */
  1293.                  dxrhlf(); /* move back to previous line */
  1294.               }
  1295.  
  1296.  
  1297. Unicorn 1 Documentation  3.1                                      page 41
  1298.  
  1299. __________________________________________________________________________
  1300.  
  1301.  
  1302.                                dxrlf
  1303.  
  1304.  
  1305.  
  1306. Moves paper down one line which in effect moves the print position up one
  1307. line.
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314. Call:         dxrlf();
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321. è
  1322. Example:      main()
  1323.               {
  1324.                  dxrlf(); /* move print position up one line spacing */
  1325.               }
  1326.  
  1327.  
  1328. Unicorn 1 Documentation  3.1                                      page 42
  1329.  
  1330. __________________________________________________________________________
  1331.  
  1332.  
  1333.                                dxsetht
  1334.  
  1335.  
  1336.  
  1337.  
  1338. Sets a horizontal tab at current position.  Up to 160 HT's may be set.
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345. Call:         dxsetht();
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352. Example:      main()
  1353.               {
  1354.                  dxsetht();  /* set a tab at current column */
  1355.               }
  1356.  
  1357.  
  1358.  
  1359.  
  1360. Unicorn 1 Documentation  3.1                                      page 43
  1361.  
  1362. __________________________________________________________________________
  1363.  
  1364.  
  1365.                                dxshast
  1366.  
  1367.  
  1368.  
  1369. Select shadow print.  This is canceled by dxbsend or a carriage return.
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375. Call:         dxshast();
  1376. è
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382. Example:      main()
  1383.               {
  1384.                  dxshast();   /* turn on shadow printing */
  1385.               }
  1386.  
  1387.  
  1388.  
  1389.  
  1390. Unicorn 1 Documentation  3.1                                      page 44
  1391.  
  1392. __________________________________________________________________________
  1393.  
  1394.  
  1395.                                dxundend
  1396.  
  1397.  
  1398.  
  1399. Cancels underlining set by dxundlst.
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405. Call:         dxundend();
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413. Example:      main()
  1414.               {
  1415.                  dxundlst();  /* start underline */
  1416.                  lputch('a'); /* send an a to the printer and underline it */
  1417.                  dxundend();  /* stop the underlining */
  1418.               }
  1419.  
  1420.  
  1421.  
  1422. Unicorn 1 Documentation  3.1                                      page 45
  1423.  
  1424. __________________________________________________________________________
  1425.  
  1426.  
  1427.                                dxunldst
  1428.  
  1429.  
  1430.  
  1431. èStarts underlining.  All characters including spaces are underlined except
  1432. spaces before the first printable character or after the last printable
  1433. character.
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439. Call:         dxundlst();
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446. Example:      main()
  1447.               {
  1448.                  dxundlst();  /* start underline */
  1449.                  lputch('a'); /* send an a to the printer and underline it */
  1450.                  dxundend();  /* stop the underlining */
  1451.               }
  1452.  
  1453.  
  1454.  
  1455. Unicorn 1 Documentation  3.1                                      page 46
  1456.  
  1457. __________________________________________________________________________
  1458.  
  1459.  
  1460.                                dxuni
  1461.  
  1462.  
  1463. Selects uni-directional printing.  Used to print in one direction only
  1464. which improves alignment when printing vertical columns.
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470. Call:         dxuni();
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477. Example:      main()
  1478.               {
  1479.                  dxuni();  /* select unidirectional printing */
  1480.               }
  1481.  
  1482.  
  1483.  
  1484.