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