home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / csr.arc / CSR.DOC < prev    next >
Text File  |  1987-01-11  |  265KB  |  14,059 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.         C Spot Run
  20.  
  21.         A User-Supported C Add-On Library
  22.  
  23.         Version 2.0
  24.  
  25.         January 10, 1987
  26.  
  27.  
  28.         Bob Pritchett
  29.         New Dimension Software
  30.  
  31.         23 Pawtucket Dr.
  32.         Cherry Hill, NJ 08003
  33.  
  34.  
  35.         Copyright 1986, 1987 Bob Pritchett
  36.         All Rights Reserved
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.                                  To Mom and Dad
  84.  
  85.                    Your time, effort, encouragement and advice
  86.                      have been far above and beyond what any
  87.                            son could dream of asking.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.                                    Trademarks
  109.  
  110.          MS-DOS and Microsoft C are trademarks of Microsoft Corporation.
  111.             IBM-PC is a trademark of International Business Machines.
  112.               C Spot Run is a trademark of New Dimension Software.
  113.                 C86 is a trademark of Computer Innovations, Inc.
  114.                      Lattice is a trademark of Lattice, Inc.
  115.  
  116.  
  117.                                    Disclaimer
  118.  
  119.              This  library and all of its contents are provided "AS  IS."  
  120.         No  warranty is expressed or implied.  Use of this library is  at 
  121.         the  user's  own risk,  and the authors are not  liable  for  any 
  122.         damages  or loss of profits resulting from the use of the library 
  123.         or its documentation.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                           C Spot Run - Documentation  
  134.  
  135.  
  136.  
  137.                                 Table of Contents
  138.  
  139.             Dedication...............................................  2
  140.             Trademarks...............................................  2
  141.             Disclaimer...............................................  2
  142.  
  143.          1. Introduction.............................................  5
  144.             1.1. What is C Spot Run?.................................  5
  145.             1.2. Why C Spot Run?.....................................  5
  146.  
  147.          2. Obtaining and Copying C Spot Run.........................  6
  148.             2.1. User Supported Software.............................  6
  149.             2.2. Ownership of C Spot Run.............................  6
  150.             2.3. Contents of C Spot Run..............................  6
  151.             2.4. License for C Spot Run..............................  6
  152.  
  153.          3. Using the C Spot Run Library.............................  8
  154.             3.1. Using the Library with Your Compiler................  8
  155.             3.2. Modifying the Library...............................  8
  156.                  3.2.1. Problem Areas................................  8
  157.                  3.2.2. Helpful Suggestions..........................  8
  158.             3.3. Using the Utilities and Aids........................  9
  159.  
  160.          4. Format of Routine/Utility Descriptions...................  10
  161.             4.1. How to Use Routine Description Pages................  10
  162.             4.2. How to Use Utility Decription Pages.................  10
  163.  
  164.          5. The Library Routine Descriptions.........................
  165.             5.1. General Descriptions of Related Routines............
  166.                  5.1.1. Date Manipulation Routines...................
  167.                  5.1.2. Directory Management Routines................
  168.                  5.1.3. Graphics Routines............................
  169.                  5.1.4. Input Routines...............................
  170.                  5.1.5. Printer Operation Routines...................
  171.                  5.1.6. Real Time Timers.............................
  172.                  5.1.7. Window Function Library......................
  173.             5.2. Individual Routine Descriptions.....................
  174.  
  175.          6. Utility and Aid Descriptions.............................
  176.  
  177.          7. Header File Descriptions.................................
  178.  
  179.          8. Appendix A - Updating the Library........................
  180.  
  181.          9. Appendix B - Contacting Authors..........................
  182.  
  183.         10. Appendix C - Submitting Routines or Utilities............
  184.  
  185.         11. Appendix D - Library History and Changes.................
  186.  
  187.         12. Appendix E - ASCII Table.................................
  188.  
  189.         13. Appendix F - Window Border Characters....................
  190.  
  191.  
  192.  
  193.                                                            Page 3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                           C Spot Run - Documentation  
  200.  
  201.  
  202.         14. Quick Reference Chart....................................
  203.  
  204.         15. Routine/Utility Submission Form..........................
  205.  
  206.         16. User Response Form.......................................
  207.  
  208.         17. Order Form...............................................
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                                                            Page 4
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                           C Spot Run - Documentation  
  266.  
  267.  
  268.         1. Introduction
  269.  
  270.            1.1.  What is C Spot Run?
  271.  
  272.              C  Spot  Run is a library of C and Assembly routines  for  C 
  273.         programmers.   These  routines supplement the standard  libraries 
  274.         provided  with  compilers,  and  provide  tools  for  specialized 
  275.         applications.
  276.              All routines in this library are either in the public domain 
  277.         or  are  part of the user supported software world,  as  are  the 
  278.         accompanying utilities and programming aids.  
  279.              Our  goal  is  to  provide low  cost  (free!)  routines  and 
  280.         utilities  for  C programmers.   The use of pre-written  routines 
  281.         greatly reduces the amount of tedious code writing in almost  any 
  282.         situation, and we hope that our collection will prove to do so.
  283.  
  284.            1.2.  Why C Spot Run?
  285.  
  286.              What  is  probably the next question to cross your  mind  is 
  287.         simply,  why?   Good question,  and I hope this is a good answer.  
  288.         Because.   Because  there  are so many libraries similar to  this 
  289.         one.  Because they all cost money, and this one doesn't.  Because 
  290.         as of yet there is no central distribution point for many of  the 
  291.         C routines floating around in .C files everywhere.   We feel that 
  292.         C Spot Run is filling a need, and we hope you agree with us.   
  293.              We  would  appreciate your taking some time to let  us  know 
  294.         what you think of the library and what directions you would  like 
  295.         to see it take.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                                            Page 5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                           C Spot Run - Documentation  
  332.  
  333.  
  334.         2. Obtaining and Copying C Spot Run
  335.  
  336.            2.1. User Supported Software
  337.  
  338.              User  supported software is software distributed at no  cost 
  339.         other  then a small media charge with the expectation that  those 
  340.         who   find  it  useful  will  send  a  donation  to  support  the 
  341.         development.    In   most  cases  those  who  contribute   become 
  342.         registered users and receive automatic updates,  printed manuals, 
  343.         telephone support, and/or source code.
  344.              
  345.            2.2. Ownership of C Spot Run
  346.  
  347.              Without  a major essay on copyright laws,  the routines  and 
  348.         utilities  in  this package are the property of their  respective  
  349.         authors,  with  the  exception of those released  to  the  Public 
  350.         Domain (PD).  It is important to recognize the difference between 
  351.         Public   Domain  and  user-supported  software.   (User-supported 
  352.         includes  "ShareWare",   "FreeWare"  and  several  other  names.)  
  353.         Unlike  authors  who totally give their software  to  the  public 
  354.         domain,  some  authors  distribute  their  code  with  a  limited 
  355.         license,  usually  something  to the effect that you are  not  to 
  356.         distribute modified versions or charge for the distribution.  
  357.              The  routines  and  utilities  in this  library  are  either 
  358.         totally in the public domain,  in which case their source code is 
  359.         present,  or have been released to this library for  distribution 
  360.         as described in Appendix C of this document.
  361.              As to the library itself,  and this documentation,  they are 
  362.         property  of Bob Pritchett,  and released to the public under the 
  363.         limited license in section 2.4.
  364.  
  365.            2.3. Contents of C Spot Run
  366.  
  367.              The  very  basic  principle  behind this  library  is  user-
  368.         supported software.   In addition to monetary  contributions,  an 
  369.         even  more valuable form is that of routines or utilities.   Most 
  370.         of the routines and utilities in this library were written by two 
  371.         or  three people,  or are modifications of other routines in  the 
  372.         public domain.
  373.              We would like to build a sizable library of tools and  helps 
  374.         for C programmers,  and whether it is a new routine you wrote, or 
  375.         one that is already in the public domain world, your contribution 
  376.         of code and permission to let us use it would be appreciated.
  377.              At  present  this library is a collection  of  routines  and 
  378.         programming aids only.  Since the release of the first version of 
  379.         the   library,   the   response  has  been  positive,   and   our 
  380.         interpretation of it is that the library should continue to focus 
  381.         on  routines  and  programming aids,  as opposed  to  creating  a 
  382.         library of general C source code.
  383.  
  384.            2.4. Distribution License for C Spot Run
  385.  
  386.              The  C  Spot Run library of routines and  utilities  may  be 
  387.         freely duplicated and distributed under the following terms:
  388.  
  389.  
  390.  
  391.                                                            Page 6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                           C Spot Run - Documentation  
  398.  
  399.  
  400.  
  401.              o  No fee may be charged other than  reasonable expenses for 
  402.         media and reproduction, no more then eight dollars.
  403.  
  404.              o   The  library  MAY NOT be distrbuted  by  any  for-profit 
  405.         corporation,  including,  but  not limited to,  for-profit public 
  406.         domain software companies, without the express written permission 
  407.         of Bob Pritchett.
  408.  
  409.              o  The routines,  utilities, and documentation are not to be 
  410.         distributed in a modified form.
  411.  
  412.              o   The  routines  and  utilities are  not  to  be  used  in 
  413.         commercial  applications  or  business environments  without  the 
  414.         express written permission of the authors.
  415.  
  416.              o   Credit must be given to authors whose routines are  used 
  417.         in  any  distributed application,  in both the code  and  program 
  418.         documentation,  unless  other arrangements are made directly with 
  419.         the author.
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                                            Page 7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                           C Spot Run - Documentation  
  464.  
  465.  
  466.         3. Using the C Spot Run Library
  467.  
  468.            3.1. Using the Library with Your Compiler
  469.  
  470.              All  utilities  included in this library work with  straight 
  471.         ASCII text files,  unless otherwise specified,  and those dealing 
  472.         with the syntax of the C language should work with all flavors of 
  473.         C that conform to the basic guidelines in K&R. 
  474.              The  routines  are distributed  in  several  forms,  usually 
  475.         either  object  code or source code,  C  or  assembly.   Specific 
  476.         information  on  each routine and it's compiler  dependancies  is 
  477.         available  in  the  section entitled Compiler Specifics  in  each 
  478.         routine entry.   As a general rule, object code and libraries are 
  479.         in the Microsoft/Lattice format.  These libraries and object code 
  480.         modules can be linked to your program with LINK.   If the  source 
  481.         code  is available simply check it for compiler differences  (see 
  482.         the next section) and compile it with whatever compiler you use.
  483.  
  484.            3.2. Modifying the Library
  485.  
  486.              Although  many compilers use the same routines,  they  often 
  487.         are  named  differently,  or use a different set  of  parameters.  
  488.         This section should be of assistance in modifying source to  work 
  489.         with  your,  or  someone  else's,  compiler.   If you  have  some 
  490.         information that could be helpful in ocmpiler conversions, please 
  491.         contact us.
  492.  
  493.                 3.2.1. Problem Areas
  494.  
  495.              Some  of the more common differences in  compiler  libraries 
  496.         are the naming conventions used.   For instance,  the routines to 
  497.         perform  a DOS interrupt vary from intdos() to doint(),  and have 
  498.         just as many differences in parameters.   Some common differences 
  499.         are  in string manipulation,  hardware  specific  functions,  and 
  500.         memory  management.   Here is some information that should be  of 
  501.         help:
  502.  
  503.                 3.2.2. Helpful Suggestions
  504.  
  505.            Those  with  Microsoft C V3.0 should consult the  header  file 
  506.         V2TOV3.H  for  assistance,  and Appendix D of the  User's  Guide, 
  507.         Converting from Previous Versions of the Compiler.
  508.  
  509.              Microsoft  V3.0 uses unions declared in DOS.H as  parameters 
  510.         for it's hardware/DOS functions unlike most other compilers which 
  511.         need  the  register variables etc.  declared by  the  user.   The 
  512.         register  variables are stored in a union of type REGS,  and  are 
  513.         addressed  using the union member x to access registers with x as 
  514.         a second character,  or h to access the registers ending in h  or 
  515.         l.  Example: union REGS in;  n = in.x.ax;  y = in.h.bl;
  516.  
  517.              Microsoft's hardware interrupt is int86(int,&in,&out),  cor-
  518.         responding  to sysint(int,&in,&out) used by many other compilers.  
  519.         Likewise intdos(&in,&out) corresponds to sysint(0x21,&in,&out).
  520.  
  521.  
  522.  
  523.                                                            Page 8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                           C Spot Run - Documentation  
  530.  
  531.  
  532.              Lattice/Computer  Innovation's  movmem(source,  destination, 
  533.         width) corresponds to Microsoft's  movedata(destination,  source, 
  534.         width).
  535.  
  536.              All of Microsoft's string manipulation functions are in  the 
  537.         format   strxxx()   or   strnxxx().     Example:   strlwr(string) 
  538.         strcat(string1, string2) strncat(string1, string2, number).
  539.  
  540.            3.3. Using the Utilities and Aids
  541.  
  542.              The  use of utilities and programming aids should be clearly 
  543.         described on their description pages.   All include files  should 
  544.         be  included at the beginning of sources that need them,  and  in 
  545.         addition  to the description page most independant utilities will 
  546.         provide  a  short summary of their use when run with  no  command 
  547.         line parameters.
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                                            Page 9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                           C Spot Run - Documentation  
  596.  
  597.  
  598.         4. Format of Routine/Utility Descriptions
  599.  
  600.            4.1. How to Use the Routine Description Pages
  601.  
  602.              The  routine  description pages are set up in such a  manner 
  603.         that  updates  to  the library will not  require  a  totally  new 
  604.         manual.  
  605.              Each  routine has its own full page regardless of how  small 
  606.         or large it is.   The page is set up in a special order, with the 
  607.         name of the routine on the upper right of the page at the top for 
  608.         quick  indexing,  followed  by a short summary of  the  necessary 
  609.         arguments  and their data types.   Next is a line containing  the 
  610.         creation  and last update dates,  and then the author's name  and 
  611.         whether  the  source is in C or Assembly.   Following these is  a 
  612.         list of the files in which the code is contained, a list of other 
  613.         required functions that may not be in every library,  and then  a 
  614.         paragraph  description of the function.   This is followed with a 
  615.         paragraph  explaining  any ties to  one  specific  compiler,  the 
  616.         return value,  a list of related functions in the library,  and a 
  617.         final example of how it might be used in a portion of code.
  618.              It  is  recommended that you keep the complete manual  in  a 
  619.         three  ring binder,  and as you receive updates simply print  out 
  620.         the enclosed page,  and insert it in alphabetical order among the 
  621.         function  description pages.   (This manual may seem like a waste 
  622.         of paper, but this way it saves a lot in the long run.)
  623.  
  624.            4.2. How to Use the Utility Description Pages
  625.  
  626.              The  utility  description pages are similar to  the  routine 
  627.         descriptions   described   above  except  for   the   layout   of 
  628.         information.  On the utility description pages the first item is, 
  629.         as  with the routine descriptions,  the utility name on the upper 
  630.         right  hand corner.   Next is a summary of the utility  including 
  631.         the creation and last update dates, the author's name, the source 
  632.         language,  and then a copy of the documentation, usually an exact 
  633.         duplicate of whatever documentation the author has sent.
  634.              As  mentioned,  the  method for updating  these  description 
  635.         pages is the same as above in section 4.1.
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                                                            Page 10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                            Date Manipulation Routines
  665.  
  666.              This  library  comes with a variety of routines that can  be 
  667.         used to perform operations on and manipulate dates.
  668.              When  calling functions that require date elements the order 
  669.         of month,  day,  and year is used.   The only exceptions to  this 
  670.         ordering are the get_date() and set_date() functions,  which work 
  671.         with  the  system's internal date.   These routines  require  the 
  672.         arguments to be in the order of day, month, and year.
  673.              All  of  the  date  manipulation  routines  are  capable  of 
  674.         accepting  years  in both the two and four digit  formats.   (IE. 
  675.         1987 is evaluated in the same manner as is 87.)
  676.              The number of days between two given dates can be calculated 
  677.         directly with the dt_diff() routine, or through subtraction using 
  678.         the serial numbers of each date, as calculated with date_sn().
  679.              At  present  the  date routines do  not  take  into  account 
  680.         different calendar systems,  and,  with the exception of the year 
  681.         limited  serial number routines,  will assume all AD dates are in 
  682.         our current system.
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                           Directory Management Routines
  731.  
  732.              With the two basic file search routines ffirst() and fnext() 
  733.         any  number  of directories may be generated,  and when  combined 
  734.         with the windowing routines any application can have a convenient 
  735.         system for directory viewing and file selection.
  736.              The possibilities are endless, thus only a limited number of 
  737.         directory viewing routines have been provided,  but we trust that 
  738.         they will help you design and implement whatever file  management 
  739.         you require.  The following are some hints and suggestions:
  740.  
  741.              Finding  and  storing all the file names  before  displaying 
  742.         them has the benefit of allowing scrolling to take place forwards 
  743.         and back, but the disadvantage of a slight delay while reading in 
  744.         the information.  If scrolling is needed, try saving the names as 
  745.         they  are read and displayed,  and keep pointers allowing you  to 
  746.         scroll back, but not forward until the new file names are read.
  747.  
  748.              If  it  is neccessary to divide the file name and  extension 
  749.         two obvious alternatives are presented.   Either write a  routine 
  750.         to go through the string containing the name, looking for the dot 
  751.         separater,  and  split  the  string into two parts,  or  use  the 
  752.         sscanf() function to read the two fields into separate strings.
  753.  
  754.              Whatever you do with the provided directory  routines,  we'd 
  755.         appreciate  a copy of your routine for curiosity's sake,  and  if 
  756.         possible, inclusion in a future version of the library. 
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                                 Graphics Routines
  797.  
  798.              This  version  of  the library contains just  a  few  simple 
  799.         graphics  primitives  that work with the Color Graphics  Adapter.  
  800.         The  routines provided perform simple graphics functions with  no 
  801.         concern for the aspect ratio of the screen, relative coordinates, 
  802.         etc.   All of the functions work with the exact coordinates given 
  803.         and  mathamaticly  calculated assuming an aspect  ratio  of  one.  
  804.         (The IBM PC has a ratio of 1.2.)  
  805.              The purpose of these routines is to provide a very few basic 
  806.         routines  for  some  form  of graphics output.   If  you  have  a 
  807.         complete  graphics system,  or just one that's faster  than  that 
  808.         provided  here,  we  would  appreciate it if you  would  consider 
  809.         submitting a copy to the library.
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                                  Input Routines
  863.  
  864.              
  865.              The input routines are named in the following format:
  866.  
  867.              [w][f]inpt<type>[r][m][e][d]();
  868.  
  869.                   [w]       Window.  If input is in a window, use the [w] 
  870.         prefix.   NOTE:   If  the window pointer given is not to a  valid 
  871.         window the result is undefined.
  872.  
  873.                   [f]        Field.   Field input is input in  a  maximum 
  874.         length  field.   The  color and fill character for the  field  is 
  875.         specified by fcolor() and fchar().
  876.  
  877.                   <type>     Type.   This mandatory part of the  function 
  878.         name is the type of input being accepted.  
  879.  
  880.                   [r]        Range.   If  there is a minimum and  maximum 
  881.         entry this element is used in the name.
  882.  
  883.                   [m]       Mask.   This element means that an input mask 
  884.         will be specified.
  885.  
  886.                   [e]       Editing.   If the field supports full editing 
  887.         features, this element is used.
  888.  
  889.                   [d]       Default.   If there is to be a default  entry 
  890.         this element is used.
  891.  
  892.  
  893.              All  of these elements make for a large number  of  possible 
  894.         routines.   However, only a few of these options are implemented, 
  895.         and  users who have source code can use these functions as  bases 
  896.         for  new  ones.    For  a  list  of  which  functions  have  been 
  897.         implemented  with this version,  please check the quick reference 
  898.         chart at the end of the manual.
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                            Printer Operation Routines
  929.  
  930.              The printer output routines included in this verson, 1.0, of 
  931.         the  library are intended to provide only the basics for  printer 
  932.         control.   The  routines  provide  for single  character  output, 
  933.         lputchar(), string output, lprint(), and formatted string output, 
  934.         lprintf().  
  935.  
  936.              These  routines all call DOS function number 5  which  means 
  937.         that with the DOS MODE command etc.  the output can be redirected 
  938.         or reformatted.
  939.  
  940.              Many  libraries include an extensive set of routines to  set 
  941.         different attributes,  fonts,  and styles on printers.   However, 
  942.         since  these routines are usually dependant on one printer  make, 
  943.         and  generaly do little more then output two or three  characters 
  944.         it  was  thought  best  to provide only  the  generic  lputchar() 
  945.         function.  If you would like to provide a set of printer specific 
  946.         or  independant  routines  to  perform  these  functions,  please 
  947.         contact us.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                                 Real Time Timers
  995.  
  996.              The  timer  functions are designed to implement  up  to  ten 
  997.         different elapsed time counters.   The counters are numbered from 
  998.         zero to nine, each of which may be individually started, stopped, 
  999.         and  read.   The function init_tmr() must be called before any of 
  1000.         the timers are used, although it needs to be called only once.
  1001.  
  1002.              These   ten   counters  may  prove  especially   useful   in 
  1003.         communications,  timed input,  or other 'real time'  applications 
  1004.         due to the fact that they work with the internal system clock and 
  1005.         are  not bus clock rate dependant.   (The timer() routine,  not a 
  1006.         part of this collection, does report in clock ticks.)
  1007.  
  1008.              All of the timer functions, with the exception of init_tmr() 
  1009.         and  get_timer(),  require a single integer argument with a value 
  1010.         between zero and nine.  Any other value will normalized into that 
  1011.         range, which is the timer to use for that specific function call.  
  1012.         The  functions  that  return a time do so in tenths  of  seconds.  
  1013.         (The  maximum  time  any timer may  track  is  approximately  1.8 
  1014.         hours.)
  1015.  
  1016.              These  routines  were contributed by Dave Perras  who  wrote 
  1017.         them  with  a  Datalight C compiler.   The included  source  code 
  1018.         should be easily portable to most MS-DOS C compilers.
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                              Window Function Library
  1061.  
  1062.              The  C  Spot  Run window function library is  a  library  of 
  1063.         routines that perform background/foreground windowing.  What this 
  1064.         means  is  that any window that is overlapped by another  window, 
  1065.         when  addressed  for output,  will be moved to the front  of  the 
  1066.         'stack' and become the active window.  
  1067.  
  1068.              The  window library also contains a large number of  support 
  1069.         routines  to  make movement of and output to windows as  easy  as 
  1070.         possible.   There  are routines that make  pop-up  menus,  center 
  1071.         text,  draw  boxes,  and  do much more.   Full color  support  is 
  1072.         available,  and  for speed all of the cursor and output functions 
  1073.         are in assembly.
  1074.  
  1075.              All  windowing functions are in the  file  COUTPUT.OBJ,  and 
  1076.         source is not distributed.  
  1077.  
  1078.              For  ease  of calling,  in general you will  find  that  all 
  1079.         window  functions  are  preceeded by a w in  the  function  name, 
  1080.         (wopen(), wclose(), etc.) and in most cases the first argument is 
  1081.         the window pointer.
  1082.  
  1083.              For   more  information,   consult  the  detailed   function 
  1084.         descriptions.
  1085.  
  1086.              I would like to thank Philip A. Mongelluzo whose Windows for 
  1087.         C  and  Window BOSS packages were of invaluable use to me in  the 
  1088.         development  of this package,  not to mention the time  he  spent 
  1089.         patiently answering my questions.
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                                                               border
  1127.         Summary:
  1128.  
  1129.         int border(color);
  1130.         int color;               /* Color of Border */
  1131.  
  1132.         Created: 12/28/85        Last Updated: 12/28/85
  1133.  
  1134.         Author: Bob Pritchett         Source (C/A): A
  1135.  
  1136.         Located in: BORDER.OBJ
  1137.  
  1138.         Requires: Nothing.
  1139.  
  1140.         Description:
  1141.  
  1142.         This function draws sets the screen border to the specified color 
  1143.         using function 11 of the BIOS video interrupt.
  1144.  
  1145.         Works in text modes only.
  1146.  
  1147.         Compiler Specifics:
  1148.  
  1149.         Has Microsoft's assembly header, otherwise none.
  1150.  
  1151.         Return Value:
  1152.  
  1153.         Nothing.
  1154.  
  1155.         See Also:
  1156.  
  1157.  
  1158.  
  1159.         Example:
  1160.  
  1161.         border(4);          /* Red Border */
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                                                                  box
  1193.         Summary:
  1194.  
  1195.         int box(x,y,x2,y2,type);
  1196.         int x;                   /* Upper Left Row */
  1197.         int y;                   /* Upper Left Col */
  1198.         int x2;                  /* Lower Right Row */
  1199.         int y2;                  /* Lower Right Col */
  1200.         int type;                /* Style of Border */
  1201.  
  1202.         Created: 08/  /85        Last Updated: 05/22/86
  1203.  
  1204.         Author: Bob Pritchett         Source (C/A): C
  1205.  
  1206.         Located in: BOX.OBJ
  1207.  
  1208.         Requires: gotoxy() putch()
  1209.  
  1210.         Description:
  1211.  
  1212.         The  box  function draws a graphic box using the upper  left  and 
  1213.         lower  right  corner  coordinates.   The border style  can  be  a 
  1214.         combination  of the double and single line characters of the  IBM 
  1215.         character set,  or any other printable character used all the way 
  1216.         around.   The  border is chosen with type.   If type is equal  to 
  1217.         one,  an all single line border is drawn.  If it is two, a double 
  1218.         horizontal line and single vertical line is used,  if it is three 
  1219.         it  is  an all double border,  if it is four a single  horizontal 
  1220.         line  and double vertical line are used.   In the case of a five, 
  1221.         three ASCII characters, + - |, are used.  Any other value in type 
  1222.         will cause the border to consist entirely of this character.
  1223.  
  1224.         Compiler Specifics:
  1225.  
  1226.         BOX.OBJ  was  compiled using MSC 3.0,  but there are no  compiler 
  1227.         specifics  involved  other then putch(),  the  put  character  to 
  1228.         console function.
  1229.  
  1230.         Return Value:
  1231.  
  1232.         Returns  a  one  if successful,  or a  negative  one  if  invalid 
  1233.         coordinates are passed.
  1234.  
  1235.         See Also:
  1236.  
  1237.         cbox()
  1238.  
  1239.         Example:
  1240.  
  1241.         box(10,10,20,30,'*');    /* A box with a border of *'s */
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                                                               cbcapt
  1259.         Summary:
  1260.  
  1261.         int cbcapt(flag);
  1262.         int *flag;               /* Location of Integer Flag */
  1263.  
  1264.         Created: 10/26/86        Last Updated: 10/26/86
  1265.  
  1266.         Author:                       Source (C/A): A
  1267.  
  1268.         Located in: CBRKTRAP.OBJ
  1269.  
  1270.         Requires: Nothing.
  1271.  
  1272.         Description:
  1273.  
  1274.         This  function  allows  the  programmer to detect  and  handle  a 
  1275.         Control-C  or Control-Break entered by the  user.   The  function 
  1276.         must  be called with the location of a static integer which  will 
  1277.         be  set positive when a Control-C or Control-Break is  hit.   The 
  1278.         program may then choose to test and handle the flag, or ignore it 
  1279.         totally, effectually disabling the break features.
  1280.  
  1281.         This  function is based on routines in Advanced MS-DOS and The  C 
  1282.         Toolbox, by Ray Duncan and William Hunt.
  1283.  
  1284.         Compiler Specifics:
  1285.  
  1286.         None.
  1287.  
  1288.         Return Value:
  1289.  
  1290.         No return value.
  1291.  
  1292.         See Also:
  1293.  
  1294.         cbrest()
  1295.  
  1296.         Example:
  1297.  
  1298.         main()
  1299.          {
  1300.           static int flag = 0;
  1301.           timer();
  1302.           cbcapt(&flag);
  1303.           while ( flag == 0 )
  1304.                 printf("Waiting for Ctrl-Break.\n");
  1305.           printf("Control-Break detected after %ld clock ticks.\n"
  1306.                  ,timer());
  1307.           cbrest();
  1308.           exit(0);
  1309.          }
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                                                                 cbox
  1325.         Summary:
  1326.  
  1327.         int cbox(x,y,x2,y2,type);
  1328.         int x;                   /* Upper Left Row */
  1329.         int y;                   /* Upper Left Col */
  1330.         int x2;                  /* Lower Right Row */
  1331.         int y2;                  /* Lower Right Col */
  1332.         int type;                /* Style of Border */
  1333.  
  1334.         Created: 03/03/86        Last Updated: 03/03/86
  1335.  
  1336.         Author: Bob Pritchett         Source (C/A): C
  1337.  
  1338.         Located in: COUTPUT.OBJ
  1339.  
  1340.         Requires: putchci() gotoxy()
  1341.  
  1342.         Description:
  1343.  
  1344.         This  function  is functionaly the same as box() except that  the 
  1345.         box  is drawn in the current color.   It is primarily used as  an 
  1346.         internal routine in COUTPUT.OBJ.  For independant use, use color() 
  1347.         or wcolor() to set the color. 
  1348.  
  1349.         Compiler Specifics:
  1350.  
  1351.         None.
  1352.  
  1353.         Return Value:
  1354.  
  1355.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  1356.         coordinates are passed.
  1357.  
  1358.         See Also:
  1359.  
  1360.         color() wcolor() box()
  1361.  
  1362.         Example:
  1363.  
  1364.         #include <color.h>       /* Just for the colors... */
  1365.  
  1366.         color(RED_F,WHT_B);      /* Red on White */
  1367.  
  1368.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                                                               cbrest
  1391.         Summary:
  1392.  
  1393.         int cbrest();
  1394.  
  1395.         Created: 10/26/86        Last Updated: 10/26/86
  1396.  
  1397.         Author:                       Source (C/A): A
  1398.  
  1399.         Located in: CBRKTRAP.OBJ
  1400.  
  1401.         Requires: Nothing.
  1402.  
  1403.         Description:
  1404.  
  1405.         This  function disables the Control-C and Control-Break  trapping 
  1406.         turned on by cbcapt().  While it is not always neccessary to call 
  1407.         this function before exiting a program, it is a good practice.
  1408.  
  1409.         Compiler Specifics:
  1410.  
  1411.         None.
  1412.  
  1413.         Return Value:
  1414.  
  1415.         No return value.
  1416.  
  1417.         See Also:
  1418.  
  1419.         cbcapt()
  1420.  
  1421.         Example:
  1422.  
  1423.         main()
  1424.          {
  1425.           static int flag = 0;
  1426.           timer();
  1427.           cbcapt(&flag);
  1428.           while ( flag == 0 )
  1429.                 printf("Waiting for Ctrl-Break.\n");
  1430.           printf("Control-Break detected after %ld clock ticks.\n"
  1431.                  ,timer());
  1432.           cbrest();
  1433.           exit(0);
  1434.          }
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                                                              ccenter
  1457.         Summary:
  1458.  
  1459.         int ccenter(row,string,color);
  1460.         int row;                 /* Row to Center String on */
  1461.         char *string;            /* String to Center on Screen */
  1462.         int color;               /* Color to Print String in */
  1463.  
  1464.         Created: 12/28/85        Last Updated: 12/28/85
  1465.  
  1466.         Author: Bob Pritchett         Source (C/A): C
  1467.  
  1468.         Located in: CCENTER.C CENTER.OBJ
  1469.  
  1470.         Requires: gotoxy() ccputs()
  1471.  
  1472.         Description:
  1473.  
  1474.         This  routine  is functionaly the same as center() only that  the 
  1475.         line is displayed in the color specified.
  1476.  
  1477.         Compiler  Specifics:
  1478.  
  1479.         CCENTER.OBJ  was  compiled with MSC 3.0,  but there are no  other 
  1480.         compiler specifics involved.
  1481.  
  1482.         Return Value:
  1483.  
  1484.         Nothing is returned and there are no validity checks.   Giving  a 
  1485.         string longer then 80 characters, or a line number less then zero 
  1486.         or  greater  then 24 will produce an unknown  result  on  screen, 
  1487.         while it should return cleanly.
  1488.  
  1489.         See Also:
  1490.  
  1491.         center() putat() cputat()
  1492.  
  1493.         Example:
  1494.  
  1495.         #include <color.h>
  1496.  
  1497.         char *string;
  1498.         scanf("%s",string);
  1499.  
  1500.         ccenter(0,"This line is centered in color.",RED_F);
  1501.         ccenter(2,"This one is in magenta on black, as opposed to red."
  1502.                 ,MAG_F);
  1503.         ccenter(3,"And yet another line, this time in green.",GRN_F);
  1504.  
  1505.         ccenter(5,string,WHT_F+BLU_B);
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.                                                                 ccls
  1523.         Summary:
  1524.  
  1525.         #include <color.h>       /* For color definitions only... */
  1526.  
  1527.         int ccls(color);
  1528.         int color;               /* Color of Screen */
  1529.  
  1530.         Created: 12/28/85        Last Updated: 12/28/85
  1531.  
  1532.         Author: Bob Pritchett         Source (C/A): A
  1533.  
  1534.         Located in: CCLS.OBJ
  1535.  
  1536.         Requires: Nothing.
  1537.  
  1538.         Description:
  1539.  
  1540.         This  function  clears the screen and sets all the attributes  to 
  1541.         the given color.  The cursor is sent to the home position.
  1542.  
  1543.         Compiler Specifics:
  1544.  
  1545.         Has Microsoft's assembly header, otherwise none.
  1546.  
  1547.         Return Value:
  1548.  
  1549.         Nothing.
  1550.  
  1551.         See Also:
  1552.  
  1553.         cls()
  1554.  
  1555.         Example:
  1556.  
  1557.         #include <color.h>
  1558.  
  1559.         ccls(RED_F+BLU_B);       /* Attributes are red on blue. */
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.                                                               ccputs
  1589.         Summary:
  1590.  
  1591.         #include <color.h>       /* Color definitions only */
  1592.  
  1593.         int ccputs(string,color);
  1594.         int string;              /* String to Put */
  1595.         int color;               /* Color of String */
  1596.  
  1597.         Created: 12/29/85        Last Updated: 02/24/86
  1598.  
  1599.         Author: Bob Pritchett         Source (C/A): C
  1600.  
  1601.         Located in: CCPUTS.OBJ
  1602.  
  1603.         Requires: putchci()
  1604.  
  1605.         Description:
  1606.  
  1607.         This  function  puts the given string out to the  current  cursor 
  1608.         position  in  the  specified color,  using putchci() to  do  BIOS 
  1609.         output.
  1610.  
  1611.         Compiler Specifics:
  1612.  
  1613.         None.
  1614.  
  1615.         Return Value:
  1616.  
  1617.         Nothing.
  1618.  
  1619.         See Also:
  1620.  
  1621.         putchci()
  1622.  
  1623.         Example:
  1624.  
  1625.         #include <color.h>
  1626.  
  1627.         ccputs("This string in red.\n",RED_F);
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.                                                               center
  1655.         Summary:
  1656.  
  1657.         int center(row,string);
  1658.         int row;                 /* Row to Center String on */
  1659.         char *string;            /* String to Center on Screen */
  1660.  
  1661.         Created: 09/  /85        Last Updated: 02/24/86
  1662.  
  1663.         Author: Bob Pritchett         Source (C/A): C
  1664.  
  1665.         Located in: CENTER.C CENTER.OBJ
  1666.  
  1667.         Requires: gotoxy() prints()
  1668.  
  1669.         Description:
  1670.  
  1671.         This  routine will simply center string on line row.   An  eighty 
  1672.         column  display is assumed,  and the cursor is left at the end of 
  1673.         the string.
  1674.  
  1675.         Compiler  Specifics:
  1676.  
  1677.         CENTER.OBJ  was  compiled with MSC 3.0,  but there are  no  other 
  1678.         compiler specifics involved.
  1679.  
  1680.         Return Value:
  1681.  
  1682.         Nothing is returned and there are no validity checks.   Giving  a 
  1683.         string longer then 80 characters, or a line number less then zero 
  1684.         or  greater  then 24 will produce an unknown  result  on  screen, 
  1685.         while it should return cleanly.
  1686.  
  1687.         See Also:
  1688.  
  1689.         centerf() ccenter() putat() cputat()
  1690.  
  1691.         Example:
  1692.  
  1693.         #include <stdio.h>
  1694.  
  1695.         char *string;
  1696.         scanf("%s",string);
  1697.  
  1698.         center(0,"This line is centered.  Centering has a slight");
  1699.         center(1,"disadvantage with constant text in that the computation is");
  1700.         center(2,"done at run-time, as opposed to using putat() with a");
  1701.         center(3,"precalculated center.");
  1702.  
  1703.         center(5,string);
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                                                              centerf
  1721.         Summary:
  1722.  
  1723.         int centerf(row,string[,arguments...]);
  1724.         int row;                 /* Row to Center String on */
  1725.         char *string;            /* String to Center on Screen */
  1726.  
  1727.         Created: 04/13/86        Last Updated: 08/17/86
  1728.  
  1729.         Author: Bob Pritchett         Source (C/A): C
  1730.  
  1731.         Located in: CENTERF.OBJ
  1732.  
  1733.         Requires: gotoxy() prints()
  1734.  
  1735.         Description:
  1736.  
  1737.         This  routine  performs the exact same function as center()  with 
  1738.         the  exception  that the string may contain  formatting  controls 
  1739.         which  are  proccessed according to the same  rules  as  printf() 
  1740.         before the string is centered.  Up to 15 formatting arguments may 
  1741.         be used per string.
  1742.  
  1743.         Compiler  Specifics:
  1744.  
  1745.         None.
  1746.  
  1747.         Return Value:
  1748.  
  1749.         Nothing returned,  nor are coordinates checked, but be careful to 
  1750.         make  sure  the formatted string will be less then 80  characters 
  1751.         long.
  1752.  
  1753.         See Also:
  1754.  
  1755.         center() ccenter() putat() cputat()
  1756.  
  1757.         Example:
  1758.  
  1759.         #include <stdio.h>
  1760.  
  1761.         char *string;
  1762.         printf("What is your name? ");
  1763.         scanf("%s",string);
  1764.  
  1765.         centerf(4,"The answer is: %04d",243);
  1766.         centerf(7,"Hello, %s, nice to meet you.",string);
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.                                                               cfield
  1787.         Summary:
  1788.  
  1789.         int cfield(chr,clr,tms);
  1790.         int chr;                 /* Character to Use in Field */
  1791.         int clr;                 /* Attribute to Use for Field */
  1792.         int tms;                 /* Length of the Field */
  1793.  
  1794.         Created: 09/25/86        Last Updated: 09/25/86
  1795.  
  1796.         Author: Bob Pritchett         Source (C/A): A
  1797.  
  1798.         Located in: CFIELD.OBJ
  1799.  
  1800.         Requires: Nothing.
  1801.  
  1802.         Description:
  1803.  
  1804.         This  routine is a special assembly routine to create fields  for 
  1805.         the field input routines.   Given the fill character,  attribute, 
  1806.         and  length of the field it will create the field without  moving 
  1807.         the cursor.  No checking of parameters is done.
  1808.  
  1809.         Compiler  Specifics:
  1810.  
  1811.         None.
  1812.  
  1813.         Return Value:
  1814.  
  1815.         Nothing is returned.
  1816.  
  1817.         See Also:
  1818.  
  1819.         finptstr()
  1820.  
  1821.         Example:
  1822.  
  1823.         #include <color.h>
  1824.  
  1825.         cfield('*',WHT_F+BLU_B,10);        /* Ten character white on */ 
  1826.                                            /* blue asterisk field. */
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                                                             chk_date
  1853.         Summary:
  1854.  
  1855.         int chk_date(m,d,y);
  1856.         int m;                   /* Month of Date to Check */
  1857.         int d;                   /* Day of Date to Check */
  1858.         int y;                   /* Year of Date to Check */
  1859.  
  1860.         Created: 12/27/85        Last Updated: 12/27/85
  1861.  
  1862.         Author: Bob Pritchett         Source (C/A): C
  1863.  
  1864.         Located in: CSRDATE.OBJ
  1865.  
  1866.         Requires: num_days()
  1867.  
  1868.         Description:
  1869.  
  1870.         This  routine  verifies that the day and month of the given  date 
  1871.         are legitimate values.   The year is needed in order to check for 
  1872.         leapyears.
  1873.  
  1874.         Compiler  Specifics:
  1875.  
  1876.         None.
  1877.  
  1878.         Return Value:
  1879.  
  1880.         The function evaluates true if the date is valid,  false if it is 
  1881.         not.
  1882.  
  1883.         See Also:
  1884.  
  1885.         valid_date() num_days() dt_diff()
  1886.  
  1887.         Example:
  1888.  
  1889.         if ( chk_date(6,15,1500) )         /* Evaluates True */
  1890.            function();
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.                                                               chline
  1919.         Summary:
  1920.  
  1921.         int chline(x,y,y2,type);
  1922.         int x;                   /* Upper Left Row */
  1923.         int y;                   /* Upper Left Col */
  1924.         int y2;                  /* Lower Right Col */
  1925.         int type;                /* Style of Border */
  1926.  
  1927.         Created: 03/03/86        Last Updated: 03/03/86
  1928.  
  1929.         Author: Bob Pritchett         Source (C/A): C
  1930.  
  1931.         Located in: COUTPUT.OBJ
  1932.  
  1933.         Requires: putchci() gotoxy()
  1934.  
  1935.         Description:
  1936.  
  1937.         This  function  will  draw  a  line at  x,y  to  x,y2  using  the 
  1938.         character(s) specified in type.   Type may be any one of the five 
  1939.         types  accepted by box().   Usually this function is used to draw 
  1940.         lines  inside boxes,  as it will use the proper side  characters, 
  1941.         but by using an ASCII character in type an ordinary line of  that 
  1942.         character is drawn.   The line is drawn in the current color,  as 
  1943.         specified by color().
  1944.  
  1945.         Compiler Specifics:
  1946.  
  1947.         None.
  1948.  
  1949.         Return Value:
  1950.  
  1951.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  1952.         coordinates are passed.
  1953.  
  1954.         See Also:
  1955.  
  1956.         cvline() whline()
  1957.  
  1958.         Example:
  1959.  
  1960.         #include <color.h>       /* Just for the colors... */
  1961.  
  1962.         color(RED_F,WHT_B);      /* Red on White */
  1963.  
  1964.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1965.  
  1966.         chline(5,7,60,1);        /* Draws a line across the box */
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.                                                                  cls
  1985.         Summary:
  1986.  
  1987.         int cls();
  1988.  
  1989.         Created: 12/28/85        Last Updated: 08/20/86
  1990.  
  1991.         Author: Bob Pritchett         Source (C/A): A
  1992.  
  1993.         Located in: CLS.OBJ
  1994.  
  1995.         Requires: Nothing.
  1996.  
  1997.         Description:
  1998.  
  1999.         This  function clears the screen and sends the cursor to the home 
  2000.         position using the video BIOS interrupt.
  2001.  
  2002.         Compiler Specifics:
  2003.  
  2004.         Microsoft's assembly header information.
  2005.  
  2006.         Return Value:
  2007.  
  2008.         Nothing.
  2009.  
  2010.         See Also:
  2011.  
  2012.         ccls() wcls()
  2013.  
  2014.         Example:
  2015.  
  2016.         cls();
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                                                                color
  2051.         Summary:
  2052.  
  2053.         #include <color.h>       /* For Color Definitions Only */
  2054.  
  2055.         int color(attr)
  2056.         int attr;                /* Color Attributes */
  2057.  
  2058.         Created: 03/03/86        Last Updated: 08/06/86
  2059.  
  2060.         Author: Bob Pritchett         Source (C/A): C
  2061.  
  2062.         Located in: COUTPUT.OBJ
  2063.  
  2064.         Requires: Nothing.
  2065.  
  2066.         Description:
  2067.  
  2068.         This  routine  sets  the  colors  to be  used  in  all  following 
  2069.         operations  involving  color  in  the  windows  package,   unless 
  2070.         otherwise  specified.    In  version  1.0  color()  required  two 
  2071.         arguments,  the  fore  and background  attributes.   To  maintain 
  2072.         compatibility  with other <x>color() routines,  there is now only 
  2073.         one argument, with the attributes added together.
  2074.  
  2075.         If  color()'s  argument is -1,  it returns the current value  for 
  2076.         color operations.   This is useful if you wish to write windowing 
  2077.         functions that restore the current color attributes after opening 
  2078.         their own windows.
  2079.  
  2080.         Compiler  Specifics:
  2081.  
  2082.         None.
  2083.  
  2084.         Return Value:
  2085.  
  2086.         The color is returned.
  2087.  
  2088.         See Also:
  2089.  
  2090.         wcolor() mcolor()
  2091.  
  2092.         Example:
  2093.  
  2094.         #include <color.h>
  2095.  
  2096.         color(RED_F+BOLD+BLU_B);      /* Bold Red on Blue. */
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                                                         current_page
  2117.         Summary:
  2118.  
  2119.         int current_page();
  2120.  
  2121.         Created: 02/22/86        Last Updated: 02/24/86
  2122.  
  2123.         Author: Bob Pritchett         Source (C/A): C
  2124.  
  2125.         Located in: CURSOR.OBJ
  2126.  
  2127.         Requires: int86()
  2128.  
  2129.         Description:
  2130.  
  2131.         This function returns the current active video page.
  2132.  
  2133.         Compiler Specifics:
  2134.  
  2135.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  2136.         structures  of  MSC  and int86().   Usually needs a  change  like 
  2137.         sysint() instead of int86().  Check section three of this manual.
  2138.  
  2139.         Return Value:
  2140.  
  2141.         Number of current video page is returned,  0-3 or 0-7,  depending 
  2142.         on monitor.
  2143.  
  2144.         See Also:
  2145.  
  2146.         set_page()
  2147.  
  2148.         Example:
  2149.  
  2150.         #include <stdio.h>
  2151.  
  2152.         printf("The current video display page is: %d\n",current_page());
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                                                           cursor_off
  2183.         Summary:
  2184.  
  2185.         int cursor_off();
  2186.  
  2187.         Created: 02/22/86        Last Updated: 02/24/86
  2188.  
  2189.         Author: Bob Pritchett         Source (C/A): C
  2190.  
  2191.         Located in: CURSOR.OBJ
  2192.  
  2193.         Requires: int86()
  2194.  
  2195.         Description:
  2196.  
  2197.         This  function will turn the cursor off using the technique  used 
  2198.         by graphics modes in order to make it 'invisible.'
  2199.  
  2200.         Compiler Specifics:
  2201.  
  2202.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  2203.         structures  of  MSC  and int86().   Usually needs a  change  like 
  2204.         sysint() instead of int86().  Check section three of this manual.
  2205.  
  2206.         Return Value:
  2207.  
  2208.         Nothing.
  2209.  
  2210.         See Also:
  2211.  
  2212.         cursor_on()
  2213.  
  2214.         Example:
  2215.  
  2216.         cursor_off();
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                                                            cursor_on
  2249.         Summary:
  2250.  
  2251.         int cursor_on();
  2252.  
  2253.         Created: 02/22/86        Last Updated: 05/03/86
  2254.  
  2255.         Author: Bob Pritchett         Source (C/A): C
  2256.  
  2257.         Located in: CURSOR.OBJ
  2258.  
  2259.         Requires: int86()
  2260.  
  2261.         Description:
  2262.  
  2263.         Doing  the  opposite of the cursor_off() function  this  function 
  2264.         restores  the cursor and returns the shape (scan lines) to  their 
  2265.         default state.
  2266.  
  2267.         Compiler Specifics:
  2268.  
  2269.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  2270.         structures  of  MSC  and int86().   Usually needs a  change  like 
  2271.         sysint() instead of int86().  Check section three of this manual.
  2272.  
  2273.         Return Value:
  2274.  
  2275.         Nothing.
  2276.  
  2277.         See Also:
  2278.  
  2279.         cursor_off()
  2280.  
  2281.         Example:
  2282.  
  2283.         cursor_off();
  2284.  
  2285.         cursor_on();
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                                                          cursor_read
  2315.         Summary:
  2316.  
  2317.         int cursor_read(row,col)
  2318.         int *row;                /* Location to Store Row */
  2319.         int *col;                /* Location to Store Col */
  2320.  
  2321.         Created: 02/22/86        Last Updated: 02/22/86
  2322.  
  2323.         Author: Bob Pritchett         Source (C/A): C
  2324.  
  2325.         Located in: CURSOR.OBJ
  2326.  
  2327.         Requires: int86()
  2328.  
  2329.         Description:
  2330.  
  2331.         This  funciton places the current cursor positions into  row  and 
  2332.         col, using the video BIOS interrupt.
  2333.  
  2334.         Compiler Specifics:
  2335.  
  2336.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  2337.         structures  of  MSC  and int86().   Usually needs a  change  like 
  2338.         sysint() instead of int86().  Check section three of this manual.
  2339.  
  2340.         Return Value:
  2341.  
  2342.         Nothing.
  2343.  
  2344.         See Also:
  2345.  
  2346.         gotoxy()
  2347.  
  2348.         Example:
  2349.  
  2350.         int x;
  2351.         int y;
  2352.         cursor_read(&x,&y);
  2353.         gotoxy(x+2,y-3);         /* Move diagonally down and left. */
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                                                          cursor_size
  2381.         Summary:
  2382.  
  2383.         int cursor_size(start,end);
  2384.         int start;               /* Starting Scan Line */
  2385.         int end;                 /* Ending Scan Line */
  2386.  
  2387.         Created: 02/22/86        Last Updated: 02/24/86
  2388.  
  2389.         Author: Bob Pritchett         Source (C/A): C
  2390.  
  2391.         Located in: CURSOR.OBJ
  2392.  
  2393.         Requires: int86()
  2394.  
  2395.         Description:
  2396.  
  2397.         This  funciton  sets the cursor scan lines to start  and  finish.  
  2398.         Note that specifying a larger start then finish line causes it to 
  2399.         wrap around and form a two part cursor.
  2400.  
  2401.         Compiler Specifics:
  2402.  
  2403.         Compiled  with  MSC  3.0.   Only  specific  is  use  of  register 
  2404.         structures  of  MSC  and int86().   Usually needs a  change  like 
  2405.         sysint() instead of int86().  Check section three of this manual.
  2406.  
  2407.         Return Value:
  2408.  
  2409.         None.
  2410.  
  2411.         See Also:
  2412.  
  2413.         cursor_on() cursor_off()
  2414.  
  2415.         Example:
  2416.  
  2417.         cursor_size(6,7);        /* Sets cursor to two line underline */
  2418.                                  /* in color mode. */
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                                                               cvline
  2447.         Summary:
  2448.  
  2449.         int cvline(y,x,x2,type);
  2450.         int y;                   /* Upper Left Col */
  2451.         int x;                   /* Upper Left Row */
  2452.         int x2;                  /* Lower Right Row */
  2453.         int type;                /* Style of Border */
  2454.  
  2455.         Created: 03/03/86        Last Updated: 03/03/86
  2456.  
  2457.         Author: Bob Pritchett         Source (C/A): C
  2458.  
  2459.         Located in: COUTPUT.OBJ
  2460.  
  2461.         Requires: putchci() gotoxy()
  2462.  
  2463.         Description:
  2464.  
  2465.         This  function  will  draw  a  line at  x,y  to  x2,y  using  the 
  2466.         character(s) specified in type.   Type may be any one of the five 
  2467.         types  accepted by box().   Usually this function is used to draw 
  2468.         lines  inside  boxes,  as it will use the proper top  and  bottom 
  2469.         characters,  but by using an ASCII character in type an  ordinary 
  2470.         line  of  that  character is drawn.   The line is  drawn  in  the 
  2471.         current color, as specified by color().
  2472.  
  2473.         Compiler Specifics:
  2474.  
  2475.         None.
  2476.  
  2477.         Return Value:
  2478.  
  2479.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  2480.         coordinates are passed.
  2481.  
  2482.         See Also:
  2483.  
  2484.         chline() wvline()
  2485.  
  2486.         Example:
  2487.  
  2488.         #include <color.h>       /* Just for the colors... */
  2489.  
  2490.         color(RED_F,WHT_B);      /* Red on White */
  2491.  
  2492.         cbox(5,5,20,60,1);       /* A box with a single line border */
  2493.  
  2494.         cvline(7,5,20,1);        /* Draws a line down the box */
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.                                                              date_sn
  2513.         Summary:
  2514.  
  2515.         unsigned int date_sn(m,d,y);
  2516.         int m;                   /* Month */
  2517.         int d;                   /* Day */
  2518.         int y;                   /* Year */
  2519.  
  2520.         Created: 09/01/86        Last Updated: 09/01/86
  2521.  
  2522.         Author: George Roukas         Source (C/A): C
  2523.  
  2524.         Located in: CSRDATE.OBJ
  2525.  
  2526.         Requires: valid_date() day_of_year() isleap()
  2527.  
  2528.         Description:
  2529.  
  2530.         This  function turns the given date into a single integer  serial 
  2531.         number  which it returns.   This serial number is used by various 
  2532.         other date routines and can also be used for date arithmetic.
  2533.  
  2534.         The  serial  number  may not exceed 54788,  the  number  of  days 
  2535.         between January 1, 1900, and December 31, 2049.
  2536.  
  2537.         Note that the year may be in either four or two digit form.
  2538.  
  2539.         Compiler Specifics:
  2540.  
  2541.         None.
  2542.  
  2543.         Return Value:
  2544.  
  2545.         Returns an unsigned integer serial number.
  2546.  
  2547.         See Also:
  2548.  
  2549.         dt_diff() valid_date() sn_date()
  2550.  
  2551.         Example:
  2552.  
  2553.         int m, d, y;
  2554.  
  2555.         printf("\nEnter your birthdate: (MM/DD/YY) ");
  2556.         scanf("%d/%d/%d",m,d,y);
  2557.         printf("\nYou special serial number is %d.\n",date_sn(m,d,y));
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.                                                          day_of_year
  2579.         Summary:
  2580.  
  2581.         int date_sn(m,d,y);
  2582.         int m;                   /* Month */
  2583.         int d;                   /* Day */
  2584.         int y;                   /* Year */
  2585.  
  2586.         Created: 09/01/86        Last Updated: 09/01/86
  2587.  
  2588.         Author: George Roukas         Source (C/A): C
  2589.  
  2590.         Located in: CSRDATE.OBJ
  2591.  
  2592.         Requires: isleap()
  2593.  
  2594.         Description:
  2595.  
  2596.         This function is similar to the day_of_year() function in K&R, pp 
  2597.         103-104,  and  returns  the number of elapsed days in  the  given 
  2598.         year.
  2599.  
  2600.         Compiler Specifics:
  2601.  
  2602.         None.
  2603.  
  2604.         Return Value:
  2605.  
  2606.         Elapsed days since the beginning of the year.   1/1 = 1, 1/2 = 2, 
  2607.         etc.
  2608.  
  2609.         See Also:
  2610.  
  2611.         month_day()
  2612.  
  2613.         Example:
  2614.  
  2615.         int m, d, y;
  2616.  
  2617.         printf("\nEnter your birthdate: (MM/DD/YY) ");
  2618.         scanf("%d/%d/%d",m,d,y);
  2619.         printf("\nYou were born on the %d day of the year.\n"
  2620.               ,day_of_year(m,d,y));
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                                                               dirwin
  2645.         Summary:
  2646.  
  2647.         int dirwin(path,name);
  2648.         char *path;              /* Path, With Drive */
  2649.         char *name;              /* Template for File Name */
  2650.  
  2651.         Created: 04/20/86        Last Updated: 04/22/86
  2652.  
  2653.         Author: Bob Pritchett         Source (C/A): C
  2654.  
  2655.         Located in: DIRWIN.OBJ
  2656.  
  2657.         Requires: ffirst() fnext()
  2658.  
  2659.         Description:
  2660.  
  2661.         This  routine  opens a window in the current colors in which  the 
  2662.         specified  directory  is displayed in four columns of  nine  file 
  2663.         names.   When  a  directory exceeds thirty-six file names  a  key 
  2664.         press clears the window and displays the next thirty-six,  and so 
  2665.         on until the last screen is displayed,  after which the window is 
  2666.         closed.
  2667.  
  2668.         The  pathname  should include the drive letter  and  subdirectory 
  2669.         path.   If  the  root is being used at least the \ should  be  in 
  2670.         path.   The  title  used is  "[  Dir:  %s\\%s  ]",path,name.   An 
  2671.         appropriate path and template might be: "A:\\","*.*". 
  2672.  
  2673.         The  file names are displayed once in the order they are found on 
  2674.         the  disk.   (The  same  order with the DIR command  at  the  DOS 
  2675.         prompt.)  The filenames are left justified in their columns  with 
  2676.         a dot separater between the name and extension.
  2677.  
  2678.         Compiler Specifics:
  2679.  
  2680.         None.
  2681.  
  2682.         Return Value:
  2683.  
  2684.         Nothing.
  2685.  
  2686.         See Also:
  2687.  
  2688.  
  2689.  
  2690.         Example:
  2691.  
  2692.         dirwin("C:\\C","*.C");
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.                                                                  dma
  2711.         Summary:
  2712.  
  2713.         int dma(x);
  2714.         int x;                   /* Value of DMA Flag */
  2715.  
  2716.         Created: 05/24/86        Last Updated: 05/24/86
  2717.  
  2718.         Author: Bob Pritchett         Source (C/A): C
  2719.  
  2720.         Located in: COUTPUT.OBJ
  2721.  
  2722.         Requires: Nothing.
  2723.  
  2724.         Description:
  2725.  
  2726.         This  routine sets the direct memory access flag on or off.   The 
  2727.         flag defaults to 1, on.
  2728.  
  2729.         Compiler Specifics:
  2730.  
  2731.         None.
  2732.  
  2733.         Return Value:
  2734.  
  2735.         Returns -1 if a value other than 1 or 0 is passed.
  2736.  
  2737.         See Also:
  2738.  
  2739.         retrace()
  2740.  
  2741.         Example:
  2742.  
  2743.         dma(0);             /* Turn off Direct Memory Access */
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                                                              dt_diff
  2777.         Summary:
  2778.  
  2779.         int dt_diff(m,d,y,mn,dy,yr);
  2780.         int m;                   /* Month of First Date */
  2781.         int d;                   /* Day of First Date */
  2782.         int y;                   /* Year of First Date */
  2783.         int mn;                  /* Month of Second Date */
  2784.         int dy;                  /* Day of Second Date */
  2785.         int yr;                  /* Year of Second Date */
  2786.  
  2787.         Created: 12/27/85        Last Updated: 08/17/86
  2788.  
  2789.         Author: Bob Pritchett         Source (C/A): C
  2790.  
  2791.         Located in: CSRDATE.OBJ
  2792.  
  2793.         Requires: Nothing.
  2794.  
  2795.         Description:
  2796.  
  2797.         This  function will return the number of days difference  between 
  2798.         the two dates passed as parameters.
  2799.  
  2800.         Compiler Specifics:
  2801.  
  2802.         None.
  2803.  
  2804.         Return Value:
  2805.  
  2806.         Returns the number of days difference.
  2807.  
  2808.         See Also:
  2809.  
  2810.         date_sn() sn_date() chk_date() num_days()
  2811.  
  2812.         Example:
  2813.  
  2814.         int m;
  2815.         int d;
  2816.         int y;
  2817.  
  2818.         printf("I am %d days old as of August 17th, 1986.\n"
  2819.               ,dt_diff(6,15,1971,8,17,1986));
  2820.               /* The above returns 5541. */
  2821.  
  2822.         get_date(&d,&m,&y);
  2823.  
  2824.         printf("Ronald Reagan was born %d days ago.\n"
  2825.                ,dt_diff(2,6,1911,m,d,y));
  2826.         printf("C Spot Run Version 1.0 was released %d days ago.\n"
  2827.               ,dt_diff(5,5,1986,m,d,y));
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                                                                fchar
  2843.         Summary:
  2844.  
  2845.         int fchar(chr);
  2846.         int chr;                 /* Character to Use in Fields */
  2847.  
  2848.         Created: 09/25/86        Last Updated: 09/25/86
  2849.  
  2850.         Author: Bob Pritchett         Source (C/A): C
  2851.  
  2852.         Located in: FINPUT.OBJ
  2853.  
  2854.         Requires: Nothing.
  2855.  
  2856.         Description:
  2857.  
  2858.         This function sets the character to be used for the background of 
  2859.         field  input.   The  default is an ASCII space,  and when chr  is 
  2860.         given as -1,  at any time,  the function will return the  current 
  2861.         value  of the background character.   Otherwise the value of  chr 
  2862.         will be returned.
  2863.  
  2864.         Compiler Specifics:
  2865.  
  2866.         None.
  2867.  
  2868.         Return Value:
  2869.  
  2870.         Returns  the argument,  or in the case of the argument being  -1, 
  2871.         the current value of the background character.
  2872.  
  2873.         See Also:
  2874.  
  2875.         wfchar() fcolor() ffill() finptint() finptstr()
  2876.  
  2877.         Example:
  2878.  
  2879.         fchar('*');              /* Set background to *'s. */
  2880.  
  2881.         printf("The current background character is: %c.\n",fchar(-1));
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.                                                               fcolor
  2909.         Summary:
  2910.  
  2911.         #include <color.h>       /* For Color Defintions Only */
  2912.  
  2913.         int fcolor(clr);
  2914.         int clr;                 /* Color to Use in Fields */
  2915.  
  2916.         Created: 09/25/86        Last Updated: 09/25/86
  2917.  
  2918.         Author: Bob Pritchett         Source (C/A): C
  2919.  
  2920.         Located in: FINPUT.OBJ
  2921.  
  2922.         Requires: Nothing.
  2923.  
  2924.         Description:
  2925.  
  2926.         This  function  allows specification of the color to be  used  in 
  2927.         field  input routines.   If the argument clr is equal to  -1  the 
  2928.         current color is returned, and not changed.  The default is white 
  2929.         on black.
  2930.  
  2931.         Compiler Specifics:
  2932.  
  2933.         None.
  2934.  
  2935.         Return Value:
  2936.  
  2937.         Returns  the argument,  or in the case of the argument being  -1, 
  2938.         the current value of the field color.
  2939.  
  2940.         See Also:
  2941.  
  2942.         wfcolor() fchar() ffill() finptint() finptstr()
  2943.  
  2944.         Example:
  2945.  
  2946.         #include <color.h>
  2947.  
  2948.         fcolor(BLK_F+WHT_B);               /* Reverse video attribute. */
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.                                                                ffill
  2975.         Summary:
  2976.  
  2977.         int ffill(rw,cl,mx);
  2978.         int rw;                  /* Row of Field */
  2979.         int cl;                  /* Column of Field */
  2980.         int mx;                  /* Length of Field */
  2981.  
  2982.         Created: 12/05/86        Last Updated: 12/05/86
  2983.  
  2984.         Author: Bob Pritchett         Source (C/A): C
  2985.  
  2986.         Located in: FINPUT.OBJ
  2987.  
  2988.         Requires: gotoxy() cfield()
  2989.  
  2990.         Description:
  2991.  
  2992.         The  actual  input fields used by the input routines are  created 
  2993.         when  the input is performed,  and remain on the screen to  allow 
  2994.         the  program  to  bring  the user  back  to  change  the  field's 
  2995.         contents.   This arrangement means, though, that a full screen of 
  2996.         field  input will not display all the actual fields until all the 
  2997.         input  has  been  performed.    This  function  takes  the  three 
  2998.         arguments  common  to any field input function call in  order  to 
  2999.         'draw' the fields before input is performed.   The current  field 
  3000.         color and character attributes are used.
  3001.  
  3002.         Compiler Specifics:
  3003.  
  3004.         None.
  3005.  
  3006.         Return Value:
  3007.  
  3008.         Nothing is returned.
  3009.  
  3010.         See Also:
  3011.  
  3012.         wffill() fchar() fcolor() finptint() finptstr()
  3013.  
  3014.         Example:
  3015.  
  3016.         ffill(10,20,10);            /* At 10,20 a 10 character field. */
  3017.  
  3018.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  3019.         ffill(5,15,6);              /* At 5,15 a 6 character field. */
  3020.         gotoxy(5,15);               /* Not needed, as ffill() leaves */
  3021.                                     /* the cursor at the coordinates. */
  3022.         ccputs("192",fcolor(-1));   /* Put a default value on the */
  3023.                                     /* screen with the field color. */
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                                                               ffirst
  3041.         Summary:
  3042.  
  3043.         #include <csrdos.h>      /* Contains struct DIRS, for buf */
  3044.  
  3045.         int ffirst(dir,buf,template,attr);
  3046.         char *dir;               /* Subdir to Use */
  3047.         char *buf;               /* Location to Store Data */
  3048.         char *template;          /* FileName/Template to Search for */
  3049.         int attr;                /* Attribute to Include in Search */
  3050.  
  3051.         Created: 04/04/86        Last Updated: 04/15/86
  3052.  
  3053.         Author: Bob Pritchett         Source (C/A): C
  3054.  
  3055.         Located in: DIRSRCH.OBJ
  3056.  
  3057.         Requires: intdos()
  3058.  
  3059.         Description:
  3060.  
  3061.         Using  DOS 2.0 function 0x4e (2.00 and above only) this  function 
  3062.         begins  the  search for a file in the specified  directory  using 
  3063.         either  a file name or template with wildcard characters ( ?  * ) 
  3064.         as the file to search for.   The path must be a standard DOS path 
  3065.         name (without file name),  using two backslashes instead of  one.  
  3066.         If the path to search is the root, use the path string of "".
  3067.  
  3068.         The  attribute  specified in attr is the attribute to use in  the 
  3069.         search.   If none is specified, then only files are reported.  If 
  3070.         the volume attribute is used,  the volume label is returned.   If 
  3071.         the  sub-directory  attribute is specified,  all files  AND  sub-
  3072.         directories  are returned.   The same applies to the  hidden  and 
  3073.         and  system attributes,  but the archive and read-only attributes 
  3074.         can not be used in searches.
  3075.  
  3076.         After  a  file  is  found it's data is  placed  in  buf  (consult 
  3077.         CSRDOS.H  for  the  DIRS  structure).   The  entry  type  may  be 
  3078.         determined by & ing the returned attribute and the attribute  you 
  3079.         wish to test for, as in   if ( buf.attr & SUBDIR )  would be true 
  3080.         if the entry was a subdirectory.
  3081.  
  3082.         Compiler Specifics:
  3083.  
  3084.         None.
  3085.  
  3086.         Return Value:
  3087.  
  3088.         Returns the value of the AX register,  2 for file not found,  and 
  3089.         18 for no more files to be found.
  3090.  
  3091.         See Also:
  3092.  
  3093.         fnext()
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                                                               ffirst
  3107.  
  3108.  
  3109.  
  3110.  
  3111.         Example:
  3112.  
  3113.         #include <csrdos.h>
  3114.  
  3115.         struct DIRS buf;
  3116.  
  3117.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                                                                fnext
  3173.         Summary:
  3174.  
  3175.         #include <csrdos.h>      /* Contains struct DIRS, for buf */
  3176.  
  3177.         int fnext(dir,buf,template,attr);
  3178.         char *dir;               /* Subdir to Use */
  3179.         char *buf;               /* Location to Store Data */
  3180.         char *template;          /* FileName/Template to Search for */
  3181.         int attr;                /* Attribute to Include in Search */
  3182.  
  3183.         Created: 04/04/86        Last Updated: 04/15/86
  3184.  
  3185.         Author: Bob Pritchett         Source (C/A): C
  3186.  
  3187.         Located in: DIRSRCH.OBJ
  3188.  
  3189.         Requires: intdos()
  3190.  
  3191.         Description:
  3192.  
  3193.         Using  DOS 2.0 function 0x4f (2.00 and above only) this  function 
  3194.         continues  the  search begun with  ffirst().   This  function  is 
  3195.         dependant  upon  information  left in the first 21 bytes  of  the 
  3196.         buffer  used in ffirst,  so use the same buffer,  or begin a  new 
  3197.         sequence with ffirst().
  3198.  
  3199.         Compiler Specifics:
  3200.  
  3201.         None.
  3202.  
  3203.         Return Value:
  3204.  
  3205.         Returns the value of the AX register,  18 for no more files to be 
  3206.         found, or nothing.
  3207.  
  3208.         See Also:
  3209.  
  3210.         ffirst().
  3211.  
  3212.         Example:
  3213.  
  3214.         #include <csrdos.h>
  3215.  
  3216.         int x;
  3217.         struct DIRS buf;
  3218.  
  3219.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  3220.  
  3221.         while ( x != 18 )
  3222.          {
  3223.           printf("%s %ld\n",buf.name,buf.size); /* Print name & size. */
  3224.           x = fnext("",&buf,"*.SYS",0); /* Find next entry. */
  3225.          }
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.                                                             finptint
  3239.         Summary:
  3240.  
  3241.         int finptint(rw,cl,mx,x);
  3242.         int rw;                  /* Row of Field */
  3243.         int cl;                  /* Column of Field */
  3244.         int mx;                  /* Length of Field */
  3245.         int *x;                  /* Where to Put Result */
  3246.  
  3247.         Created: 09/25/86        Last Updated: 09/25/86
  3248.  
  3249.         Author: Bob Pritchett         Source (C/A): C
  3250.  
  3251.         Located in: FINPUT.OBJ
  3252.  
  3253.         Requires: gotoxy() cfield()
  3254.  
  3255.         Description:
  3256.  
  3257.         This function will draw the field as specified by the first three 
  3258.         arguments,  and  place the cursor at the first character of  this 
  3259.         field.  (See ffill() about drawing the field.)  It will then wait 
  3260.         for  the  user  to input an integer number with no more  than  mx 
  3261.         characters.   The  funtion  will not allow the user  to  move  on 
  3262.         without entering an integer.
  3263.  
  3264.         Compiler Specifics:
  3265.  
  3266.         None.
  3267.  
  3268.         Return Value:
  3269.  
  3270.         The integer inputted is returned.
  3271.  
  3272.         See Also:
  3273.  
  3274.         inptint() finptintd() wfinptint() ffill() finptstr()
  3275.  
  3276.         Example:
  3277.  
  3278.         int x;
  3279.  
  3280.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  3281.         finptint(5,15,6,&x);        /* At 5,15 a 6 character input. */
  3282.  
  3283.         printf("\n\n%d was the input.\n",x);
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.                                                            finptintd
  3305.         Summary:
  3306.  
  3307.         int finptintd(rw,cl,mx,x,d);
  3308.         int rw;                  /* Row of Field */
  3309.         int cl;                  /* Column of Field */
  3310.         int mx;                  /* Length of Field */
  3311.         int *x;                  /* Where to Put Result */
  3312.         int d;                   /* Default Integer */
  3313.  
  3314.         Created: 09/25/86        Last Updated: 09/25/86
  3315.  
  3316.         Author: Bob Pritchett         Source (C/A): C
  3317.  
  3318.         Located in: FINPUT.OBJ
  3319.  
  3320.         Requires: gotoxy() cfield()
  3321.  
  3322.         Description:
  3323.  
  3324.         This  function  will  behave  just as does  finptint()  with  the 
  3325.         exception that a carriage return as the first inputted  character 
  3326.         will  cause  the  default variable to  be  returned.   Any  other 
  3327.         character  as the first input will cause the default to be erased 
  3328.         to be replaced by the user input.
  3329.  
  3330.         Compiler Specifics:
  3331.  
  3332.         None.
  3333.  
  3334.         Return Value:
  3335.  
  3336.         The integer inputted is returned,  or,  in the case of a carriage 
  3337.         return, the default.
  3338.  
  3339.         See Also:
  3340.  
  3341.         inptintd() finptint() wfinptintd() ffill() finptstr()
  3342.  
  3343.         Example:
  3344.  
  3345.         int x;
  3346.  
  3347.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  3348.         finptintd(5,15,4,&x,37);    /* At 5,15 a 4 character input. */
  3349.  
  3350.         if ( x == 37 )
  3351.            printf("\n\nThe default, 37, was returned.\n");
  3352.         else 
  3353.            printf("\n\n%d was the input.\n",x);
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.                                                            finptintr
  3371.         Summary:
  3372.  
  3373.         int finptintr(rw,cl,mx,x,lw,hg);
  3374.         int rw;                  /* Row of Field */
  3375.         int cl;                  /* Column of Field */
  3376.         int mx;                  /* Length of Field */
  3377.         int *x;                  /* Where to Put Result */
  3378.         int lw;                  /* Minimum Acceptable Value */
  3379.         int hg;                  /* Maximum Acceptable Value */
  3380.  
  3381.         Created: 09/25/86        Last Updated: 09/25/86
  3382.  
  3383.         Author: Bob Pritchett         Source (C/A): C
  3384.  
  3385.         Located in: FINPUT.OBJ
  3386.  
  3387.         Requires: finptint()
  3388.  
  3389.         Description:
  3390.  
  3391.         This  function waits for a user inputted integer in the displayed 
  3392.         field.   A  beep will sound and a new integer waited for if there 
  3393.         is  no input or the inputted integer is not within the  specified 
  3394.         range.
  3395.  
  3396.         Compiler Specifics:
  3397.  
  3398.         None.
  3399.  
  3400.         Return Value:
  3401.  
  3402.         The inputted integer, within the range, is returned.
  3403.  
  3404.         See Also:
  3405.  
  3406.         inptintr() finptint() wfinptintd() ffill() finptstr()
  3407.         finptintrd()
  3408.  
  3409.         Example:
  3410.  
  3411.         int x;
  3412.  
  3413.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  3414.         finptintr(5,15,4,&x,3,10);  /* At 5,15 a 4 character input */
  3415.                                     /* greater than 2 and less than */
  3416.                                     /* ten. */
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.                                                           finptintrd
  3437.         Summary:
  3438.  
  3439.         int finptintrd(rw,cl,mx,x,lw,hg,d);
  3440.         int rw;                  /* Row of Field */
  3441.         int cl;                  /* Column of Field */
  3442.         int mx;                  /* Length of Field */
  3443.         int *x;                  /* Where to Put Result */
  3444.         int lw;                  /* Minimum Acceptable Value */
  3445.         int hg;                  /* Maximum Acceptable Value */
  3446.         int d;                   /* Default Value */
  3447.  
  3448.         Created: 09/25/86        Last Updated: 09/25/86
  3449.  
  3450.         Author: Bob Pritchett         Source (C/A): C
  3451.  
  3452.         Located in: FINPUT.OBJ
  3453.  
  3454.         Requires: finptintd()
  3455.  
  3456.         Description:
  3457.  
  3458.         This   function  behaves  as  do  finptintr()  and   finptintd(), 
  3459.         combined.  However no check is made to see that the default value 
  3460.         is  within  the  given range.   If it is  not,  it  will  not  be 
  3461.         returnable.
  3462.  
  3463.         Compiler Specifics:
  3464.  
  3465.         None.
  3466.  
  3467.         Return Value:
  3468.  
  3469.         The inputted integer,  within the range,  is returned, or, in the 
  3470.         case  of a carriage return as the first inputted  character,  the 
  3471.         default value.
  3472.  
  3473.         See Also:
  3474.  
  3475.         inptintr() finptint() wfinptintd() ffill() finptstr() 
  3476.         finptintr()
  3477.  
  3478.         Example:
  3479.  
  3480.         int x;
  3481.  
  3482.         putat(5,10,"Num: ");         /* A prompt for the next field. */
  3483.         finptintrd(5,15,4,&x,3,10,5);/* At 5,15 a 4 character input */
  3484.                                      /* greater than 2 and less than */
  3485.                                      /* ten, or 5. */
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.                                                             finptstr
  3503.         Summary:
  3504.  
  3505.         int finptstr(rw,cl,mx,str);
  3506.         int rw;                  /* Row of Field */
  3507.         int cl;                  /* Column of Field */
  3508.         int mx;                  /* Length of Field */
  3509.         char *str;               /* Where to Place Input */
  3510.  
  3511.         Created: 09/25/86        Last Updated: 09/25/86
  3512.  
  3513.         Author: Bob Pritchett         Source (C/A): C
  3514.  
  3515.         Located in: FINPUT.OBJ
  3516.  
  3517.         Requires: gotoxy() cfield()
  3518.  
  3519.         Description:
  3520.  
  3521.         This  function  displays the field and waits for a string  to  be 
  3522.         inputted  by the user.   In the case that no input is made a beep 
  3523.         is  sounded and the function continues to wait until a string  is 
  3524.         inputted.   When it is,  it is placed in the variable  specified, 
  3525.         str.
  3526.  
  3527.         Compiler Specifics:
  3528.  
  3529.         None.
  3530.  
  3531.         Return Value:
  3532.  
  3533.         A pointer to a duplicate of the inputted string is returned,  via 
  3534.         strdup().
  3535.  
  3536.         See Also:
  3537.  
  3538.         inptintr() finptint() wfinptintd() ffill() finptstr() 
  3539.         finptstrd()
  3540.  
  3541.         Example:
  3542.  
  3543.         char temp[80];
  3544.  
  3545.         finptstr(10,10,25,temp);
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.                                                            finptstrd
  3569.         Summary:
  3570.  
  3571.         int finptstrd(rw,cl,mx,str,def);
  3572.         int rw;                  /* Row of Field */
  3573.         int cl;                  /* Column of Field */
  3574.         int mx;                  /* Length of Field */
  3575.         char *str;               /* Where to Place Input */
  3576.         char *def;               /* Default String */
  3577.  
  3578.         Created: 09/25/86        Last Updated: 09/25/86
  3579.  
  3580.         Author: Bob Pritchett         Source (C/A): C
  3581.  
  3582.         Located in: FINPUT.OBJ
  3583.  
  3584.         Requires: gotoxy() cfield()
  3585.  
  3586.         Description:
  3587.  
  3588.         This  function behaves as does finptstr() with the exception that 
  3589.         the specified default string is displayed and will be returned as 
  3590.         the input in the case of a carriage return as the first character 
  3591.         entered.
  3592.  
  3593.         Compiler Specifics:
  3594.  
  3595.         None.
  3596.  
  3597.         Return Value:
  3598.  
  3599.         A pointer to a duplicate of the inputted string,  or the default, 
  3600.         is returned, via strdup().
  3601.  
  3602.         See Also:
  3603.  
  3604.         inptintr() finptint() wfinptintd() ffill() finptstr() 
  3605.         finptstre()
  3606.  
  3607.         Example:
  3608.  
  3609.         char temp[80];
  3610.  
  3611.         finptstrd(10,10,25,temp,"C Spot Run");
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.                                                            finptstre
  3635.         Summary:
  3636.  
  3637.         int finptstre(rw,cl,mx,str);
  3638.         int rw;                  /* Row of Field */
  3639.         int cl;                  /* Column of Field */
  3640.         int mx;                  /* Length of Field */
  3641.         char *str;               /* Where to Place Input */
  3642.  
  3643.         Created: 10/18/86        Last Updated: 10/18/86
  3644.  
  3645.         Author: Bob Pritchett         Source (C/A): C
  3646.  
  3647.         Located in: FINPUT.OBJ
  3648.  
  3649.         Requires: finptstred()
  3650.  
  3651.         Description:
  3652.  
  3653.         This  function  calls  finptstred()  with a  NULL  string  for  a 
  3654.         default and will not return until input has been made.
  3655.  
  3656.         Compiler Specifics:
  3657.  
  3658.         None.
  3659.  
  3660.         Return Value:
  3661.  
  3662.         Nothing is returned.
  3663.  
  3664.         See Also:
  3665.  
  3666.         inptstr() finptint() wfinptintd() ffill() finptstr() 
  3667.         finptstred() finptstr()
  3668.  
  3669.         Example:
  3670.  
  3671.         char temp[80];
  3672.  
  3673.         finptstre(10,10,25,temp);
  3674.  
  3675.         printf("temp contains: >%s<\n");
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.                                                           finptstred
  3701.         Summary:
  3702.  
  3703.         int finptstred(rw,cl,mx,str,def);
  3704.         int rw;                  /* Row of Field */
  3705.         int cl;                  /* Column of Field */
  3706.         int mx;                  /* Length of Field */
  3707.         char *str;               /* Where to Place Input */
  3708.         char *def;               /* Default String */
  3709.  
  3710.         Created: 10/18/86        Last Updated: 10/18/86
  3711.  
  3712.         Author: Bob Pritchett         Source (C/A): C
  3713.  
  3714.         Located in: FINPUT.OBJ
  3715.  
  3716.         Requires: gotoxy() cfield()
  3717.  
  3718.         Description:
  3719.  
  3720.         This  powerful  function displays the field specified and  places 
  3721.         the  default  string  within it,  and the  cursor  at  the  first 
  3722.         character  of  this string.   The default string may be  returned 
  3723.         with a carriage return as the first character,  it may be editted 
  3724.         with the left and right arrow keys and ins and del, the field may 
  3725.         be erased with the Alt-X combination,  and the default input  can 
  3726.         be  restored with the Alt-D combination.   Editting is  performed 
  3727.         with  the  ins and del keys in combination with movement  by  the 
  3728.         left  and  right arrow keys.   The insert key will toggle  insert 
  3729.         'mode' on and off,  although the cursor will not reflect the mode 
  3730.         change.   When in insert mode all characters to the right of  the 
  3731.         cursor  will  move right (and possibly scroll out of  the  field) 
  3732.         when  characters  are  inputted.   The  del key  will  erase  the 
  3733.         character the cursor rests on and move everything to the right of 
  3734.         the cursor left one space.   In order to allow for design of full 
  3735.         input  screens  the function will return with the  input  in  the 
  3736.         appropriate location and the value of the key as the return value 
  3737.         if  one  of  several extended function keys  is  entered.   These 
  3738.         special  keys are any use of a function key or keys,  other  than 
  3739.         left and right arrows,  on the numeric keypad.   (Home, up, down, 
  3740.         end,  PgUp, PgDn.)  (NOTE: Steps were taken to make this function 
  3741.         as  flexible  as possible.   However,  in  most  cases  requiring 
  3742.         complicated input the peculiarities of this and related functions 
  3743.         will  damage their usefullness.   If you need to make use of this 
  3744.         type   of  function  in  an  'error  proof'  application  it   is 
  3745.         recommended  that you contact the author about getting a  special 
  3746.         routine or the source code to this one.)
  3747.  
  3748.         Compiler Specifics:
  3749.  
  3750.         None.
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.                                                           finptstred
  3767.  
  3768.  
  3769.         Return Value:
  3770.  
  3771.         A  one is returned unless input was terminated by a special  key, 
  3772.         in which case its value will be returned.  (Special keys return a 
  3773.         null followed by an integer.  The integer is returned here.)
  3774.  
  3775.         See Also:
  3776.  
  3777.         inptstr() finptint() wfinptintd() ffill() finptstr() 
  3778.         finptstred()
  3779.  
  3780.         Example:
  3781.  
  3782.         char temp[80];
  3783.         int x;
  3784.  
  3785.         x = finptstred(10,10,25,temp,"C Spot Run");
  3786.  
  3787.         if ( x != 1 )                 /* Special Value */
  3788.            proccess(x);                /* Proccess Key */
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.                                                              finptyn
  3833.         Summary:
  3834.  
  3835.         int finptyn(rw,cl);
  3836.         int rw;                  /* Row of Field */
  3837.         int cl;                  /* Column of Field */
  3838.  
  3839.         Created: 09/25/86        Last Updated: 09/25/86
  3840.  
  3841.         Author: Bob Pritchett         Source (C/A): C
  3842.  
  3843.         Located in: FINPUT.OBJ
  3844.  
  3845.         Requires: gotoxy() cfield()
  3846.  
  3847.         Description:
  3848.  
  3849.         This  function  displays  a three character field  at  the  given 
  3850.         coordinates  and waits for either a 'Y' or an 'N' (upper or lower 
  3851.         case)  to  be  inputted.   Any other  character  will  cause  the 
  3852.         function  to  sound a beep and continue to wait.   When  a  valid 
  3853.         character  is  inputted  the full word will be displayed  in  the 
  3854.         field  and  either  a  one or zero  returned,  for  'Y'  or  'N', 
  3855.         respectively.
  3856.  
  3857.         Compiler Specifics:
  3858.  
  3859.         None.
  3860.  
  3861.         Return Value:
  3862.  
  3863.         A one or a zero for a 'Y' or an 'N'.
  3864.  
  3865.         See Also:
  3866.  
  3867.         inptyn() finptint() wfinptintd() ffill() finptstr() finptynd()
  3868.  
  3869.         Example:
  3870.  
  3871.         char temp[80];
  3872.  
  3873.         finptyn(10,10);
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.                                                             finptynd
  3899.         Summary:
  3900.  
  3901.         int finptynd(rw,cl,def);
  3902.         int rw;                  /* Row of Field */
  3903.         int cl;                  /* Column of Field */
  3904.         int def;                 /* Default Input */
  3905.  
  3906.         Created: 09/25/86        Last Updated: 09/25/86
  3907.  
  3908.         Author: Bob Pritchett         Source (C/A): C
  3909.  
  3910.         Located in: FINPUT.OBJ
  3911.  
  3912.         Requires: gotoxy() cfield()
  3913.  
  3914.         Description:
  3915.  
  3916.         This  function  behaves exactly as finptyn() with  the  exception 
  3917.         that  the  default input is displayed and will be returned  if  a 
  3918.         carriage return is entered instead of a 'Y' or 'N'.   The default 
  3919.         value  needs to be in the format of the return value,  a  one  or 
  3920.         zero.
  3921.  
  3922.         Compiler Specifics:
  3923.  
  3924.         None.
  3925.  
  3926.         Return Value:
  3927.  
  3928.         A one or a zero for a 'Y' or an 'N', or whatever the default was.
  3929.  
  3930.         See Also:
  3931.  
  3932.         inptynd() finptint() wfinptintd() ffill() finptstr() finptyn()
  3933.  
  3934.         Example:
  3935.  
  3936.         char temp[80];
  3937.  
  3938.         finptynd(10,10,0);                 /* Default to no. */
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.                                                             fixcolor
  3965.         Summary:
  3966.  
  3967.         int fixcolor(atrib);
  3968.         int *attr;               /* Attribute to Check/Modify */
  3969.  
  3970.         Created: 12/12/86        Last Updated: 12/13/86
  3971.  
  3972.         Author:                       Source (C/A): C
  3973.  
  3974.         Located in: COUTPUT.OBJ
  3975.  
  3976.         Requires: Nothing.
  3977.  
  3978.         Description:
  3979.  
  3980.         This  function will,  when a monochrome card,  or the CGA's black 
  3981.         and  white mode,  is currently in use,  modify the  attribute  in 
  3982.         order to make it compatible with monochrome attribute set.   This 
  3983.         routine is used internally by the windowing functions.
  3984.  
  3985.         Compiler Specifics:
  3986.  
  3987.         None.
  3988.  
  3989.         Return Value:
  3990.  
  3991.         Nothing.
  3992.  
  3993.         See Also:
  3994.  
  3995.         color() wcolor()
  3996.  
  3997.         Example:
  3998.  
  3999.         #include <color.h>
  4000.  
  4001.         int x;
  4002.         int y;
  4003.  
  4004.         x = WHT_F+BLU_B;
  4005.         y = RED_F+WHT_B;
  4006.  
  4007.         fixcolor(&x);         /* Modify the attribute if neccessary. * /
  4008.         fixcolor(&y);
  4009.  
  4010.          /* On a monochrome card x is now equivalent to WHT_F+BLK_B, */
  4011.          /* and y to BLK_F+WHT_B. */
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.                                                                gback
  4031.         Summary:
  4032.  
  4033.         int gback(clr);
  4034.         int clr;                 /* Color for Background */
  4035.  
  4036.         Created: 10/31/86        Last Updated: 10/31/86
  4037.  
  4038.         Author: Bob Pritchett         Source (C/A): A
  4039.  
  4040.         Located in: GBACK.OBJ
  4041.  
  4042.         Requires: Nothing.
  4043.  
  4044.         Description:
  4045.  
  4046.         This  routine  initializes the graphics screen to  the  specified 
  4047.         color, one of the palette colors in the description of gpal().
  4048.  
  4049.         Compiler Specifics:
  4050.  
  4051.         None.
  4052.  
  4053.         Return Value:
  4054.  
  4055.         Nothing.
  4056.  
  4057.         See Also:
  4058.  
  4059.         ginit() gline() gdot() gpal()
  4060.  
  4061.         Example:
  4062.  
  4063.         ginit();
  4064.         gpal(0);
  4065.         gback(1);           /* Background to Green */
  4066.  
  4067.         gdot(10,10,2);      /* Red Dot at 10,10 */
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.                                                                 gbox
  4097.         Summary:
  4098.  
  4099.         int gbox(x,y,x2,y2,clr);
  4100.         int x;                   /* Upper Left Row */
  4101.         int y;                   /* Upper Left Column */
  4102.         int x2;                  /* Lower Right Row */
  4103.         int y2;                  /* Lower Right Column */
  4104.         int clr;                 /* Color for Box */
  4105.  
  4106.         Created: 11/01/86        Last Updated: 11/01/86
  4107.  
  4108.         Author: Bob Pritchett         Source (C/A): C
  4109.  
  4110.         Located in: GBOX.OBJ
  4111.  
  4112.         Requires: gline()
  4113.  
  4114.         Description:
  4115.  
  4116.         This function draws a box with the coordinates given in the given 
  4117.         color.  See gpal() and ginit() for information on valid values.
  4118.  
  4119.         Compiler Specifics:
  4120.  
  4121.         None.
  4122.  
  4123.         Return Value:
  4124.  
  4125.         Nothing.
  4126.  
  4127.         See Also:
  4128.  
  4129.         ginit() gline() gfbox() gpal()
  4130.  
  4131.         Example:
  4132.  
  4133.         ginit();
  4134.         gpal(0);
  4135.         gback(2);           /* Background to Red */
  4136.  
  4137.         gbox(10,10,20,20,1);      /* Green Box at 10,10 */
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.                                                              gcircle
  4163.         Summary:
  4164.  
  4165.         int gcircle(x,y,r,clr);
  4166.         int x;                   /* Row of Center */
  4167.         int y;                   /* Column of Center */
  4168.         int r;                   /* Radius of Circle */
  4169.         int clr;                 /* Color for Box */
  4170.  
  4171.         Created: 10/31/86        Last Updated: 10/31/86
  4172.  
  4173.         Author:                       Source (C/A): C
  4174.  
  4175.         Located in: GCIRCLE.OBJ
  4176.  
  4177.         Requires: gdot()
  4178.  
  4179.         Description:
  4180.  
  4181.         This  routine  draws a circle at the given row and column in  the 
  4182.         specified color with the given radius.   This routine assumes  an 
  4183.         aspect  ratio  of  1,  and consequently  will  generate  slightly 
  4184.         eliptical circles on an IBM PC.
  4185.  
  4186.         Compiler Specifics:
  4187.  
  4188.         None.
  4189.  
  4190.         Return Value:
  4191.  
  4192.         Nothing.
  4193.  
  4194.         See Also:
  4195.  
  4196.         ginit() gline() gdot() gpal()
  4197.  
  4198.         Example:
  4199.  
  4200.         ginit();
  4201.         gpal(0);
  4202.         gback(2);           /* Background to Red */
  4203.  
  4204.         gcircle(100,150,10,1);   /* Green Circle with radius of 10. */
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.                                                                 gdot
  4229.         Summary:
  4230.  
  4231.         int gdot(x,y,clr);
  4232.         int x;                   /* Row */
  4233.         int y;                   /* Column */
  4234.         int clr;                 /* Color */
  4235.  
  4236.         Created: 10/31/86        Last Updated: 10/31/86
  4237.  
  4238.         Author: Bob Pritchett         Source (C/A): A
  4239.  
  4240.         Located in: GDOT.OBJ
  4241.  
  4242.         Requires: Nothing.
  4243.  
  4244.         Description:
  4245.  
  4246.         This function puts a graphic dot at the row and column specified.  
  4247.         The color may be 0-3 in medium resulution,  or 0-1 in high.   See 
  4248.         the  descriptions of gpal() and ginit() for a list of colors  and 
  4249.         maximum coordinate values.
  4250.  
  4251.         Compiler Specifics:
  4252.  
  4253.         None.
  4254.  
  4255.         Return Value:
  4256.  
  4257.         Nothing.
  4258.  
  4259.         See Also:
  4260.  
  4261.         ginit() gline() gback() gpal()
  4262.  
  4263.         Example:
  4264.  
  4265.         ginit();
  4266.         gpal(0);
  4267.  
  4268.         gdot(10,10,2);
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.                                                             get_date
  4295.         Summary:
  4296.  
  4297.         int get_date(dy,mn,yr);
  4298.         int *dy;                 /* Location of Day */
  4299.         int *mn;                 /* Location of Month */
  4300.         int *yr;                 /* Location of Year */
  4301.  
  4302.         Created: 03/31/86        Last Updated: 03/31/86
  4303.  
  4304.         Author: Bob Pritchett         Source (C/A): C
  4305.  
  4306.         Located in: GET_DATE.OBJ
  4307.  
  4308.         Requires: intdos()
  4309.  
  4310.         Description:
  4311.  
  4312.         This  routine obtains the current date by using the DOS interrupt 
  4313.         0x2a, and places it into the variables specified.  The day starts 
  4314.         with numbering with 1, and continue to a maximum of 31, the month 
  4315.         is numbered from 1 to 12, and the year is from 1980 to 2099.
  4316.  
  4317.         Compiler Specifics:
  4318.  
  4319.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  4320.         unions specified in DOS.H.
  4321.  
  4322.         Return Value:
  4323.  
  4324.         Nothing.
  4325.  
  4326.         See Also:
  4327.  
  4328.         get_dow() set_date() get_time()
  4329.  
  4330.         Example:
  4331.  
  4332.         int d;
  4333.         int m;
  4334.         int y;
  4335.  
  4336.         get_date(&d,&m,&y);
  4337.  
  4338.         printf("Today is %d/%d/%d.\n",m,d,y);
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.                                                              get_dow
  4361.         Summary:
  4362.  
  4363.         int get_dow();
  4364.  
  4365.         Created: 03/31/86        Last Updated: 03/31/86
  4366.  
  4367.         Author: Bob Pritchett         Source (C/A): C
  4368.  
  4369.         Located in: GET_DOW.OBJ
  4370.  
  4371.         Requires: intdos()
  4372.  
  4373.         Description:
  4374.  
  4375.         This  routine returns the day of the week,  0 for sunday,  1  for 
  4376.         monday, etc.  It is obtained with a DOS interrupt.
  4377.  
  4378.         Compiler Specifics:
  4379.  
  4380.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  4381.         unions specified in DOS.H.
  4382.  
  4383.         Return Value:
  4384.  
  4385.         Nothing.
  4386.  
  4387.         See Also:
  4388.  
  4389.         get_date() get_time()
  4390.  
  4391.         Example:
  4392.  
  4393.         printf("Today is the %d day of the week.\n",get_dow());
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.                                                            get_drive
  4427.         Summary:
  4428.  
  4429.         int get_drive();
  4430.  
  4431.         Created: 04/04/86        Last Updated: 04/04/86
  4432.  
  4433.         Author: Bob Pritchett         Source (C/A): A
  4434.  
  4435.         Located in: GETDRIVE.OBJ
  4436.  
  4437.         Requires: Nothing.
  4438.  
  4439.         Description:
  4440.  
  4441.         This  function returns a single integer representing the  current 
  4442.         logical drive.  The drives are number from 0, as in 0 = A, 1 = B, 
  4443.         2 = C,  etc.   Remember that even with only one floppy,  DOS will 
  4444.         still  have  an A and B drive,  with the single floppy acting  as 
  4445.         both.
  4446.  
  4447.         Compiler Specifics:
  4448.  
  4449.         None.
  4450.  
  4451.         Return Value:
  4452.  
  4453.         The current drive.
  4454.  
  4455.         See Also:
  4456.  
  4457.         set_drive() num_drives()
  4458.  
  4459.         Example:
  4460.  
  4461.         printf("Current Drive is: %c:\n",'A'+get_drive());
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.                                                             get_mode
  4493.         Summary:
  4494.  
  4495.         int get_mode();
  4496.  
  4497.         Created: 04/16/86        Last Updated: 08/06/86
  4498.  
  4499.         Author: Bob Pritchett         Source (C/A): A
  4500.  
  4501.         Located in: GETMODE.OBJ
  4502.  
  4503.         Requires: Nothing.
  4504.  
  4505.         Description:
  4506.  
  4507.         This function returns the current video mode.
  4508.  
  4509.         Compiler Specifics:
  4510.  
  4511.         None.
  4512.  
  4513.         Return Value:
  4514.  
  4515.         The current video mode.
  4516.  
  4517.         See Also:
  4518.  
  4519.         set_mode()
  4520.  
  4521.         Example:
  4522.  
  4523.         #include <stdio.h>
  4524.  
  4525.         printf("Current video mode is: %d\n",get_mode());
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.                                                                getpw
  4559.         Summary:
  4560.  
  4561.         int getpw(pass);
  4562.         char *pass;              /* The Password to Check Against */
  4563.  
  4564.         Created: 04/13/86        Last Updated: 08/08/86
  4565.  
  4566.         Author: Bob Pritchett         Source (C/A): C
  4567.  
  4568.         Located in: GETPW.OBJ
  4569.  
  4570.         Requires: Windowing routines and getch().
  4571.  
  4572.         Description:
  4573.  
  4574.         This  function opens a small blue and white window in the  center 
  4575.         of  the  screen and inputs a password up to  eighteen  characters 
  4576.         long.   As  each  character  is inputed an  asterisk  is  echoed.  
  4577.         Backspace editing is permitted.  If the entered password is equal 
  4578.         to  the  specified password (case ignored) the funtion returns  a 
  4579.         one, otherwise it returns a 0 on failure.
  4580.  
  4581.         Compiler Specifics:
  4582.  
  4583.         Uses MSC's getch().
  4584.  
  4585.         Return Value:
  4586.  
  4587.         1 if the correct password is entered, 0 if not.
  4588.  
  4589.         See Also:
  4590.  
  4591.  
  4592.  
  4593.         Example:
  4594.  
  4595.         if ( getpw("pass") == 0 )
  4596.            printf("** Access Denied **\n");
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.                                                             get_time
  4625.         Summary:
  4626.  
  4627.         int get_time(hr,mn,sc,hn);
  4628.         int *hr;                 /* Location of Hour */
  4629.         int *mn;                 /* Location of Minutes */
  4630.         int *sc;                 /* Location of Seconds */
  4631.         int *hn;                 /* Location of Hundredths */
  4632.  
  4633.         Created: 03/31/86        Last Updated: 03/31/86
  4634.  
  4635.         Author: Bob Pritchett         Source (C/A): C
  4636.  
  4637.         Located in: GET_TIME.OBJ
  4638.  
  4639.         Requires: intdos()
  4640.  
  4641.         Description:
  4642.  
  4643.         Using  DOS interrupt 0x2c this routine obtains the current  time, 
  4644.         to the hundredths, and places it in the variables specified.  The 
  4645.         time  is given in 24 hour format,  and everything starts counting 
  4646.         at 0, 0 to 23 hours, 0 to 59 seconds etc.
  4647.  
  4648.         Compiler Specifics:
  4649.  
  4650.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  4651.         unions specified in DOS.H.
  4652.  
  4653.         Return Value:
  4654.  
  4655.         Nothing.
  4656.  
  4657.         See Also:
  4658.  
  4659.         get_dow() get_date() set_time()
  4660.  
  4661.         Example:
  4662.  
  4663.         int h;
  4664.         int m;
  4665.         int s;
  4666.         int hn;
  4667.  
  4668.         get_time(&h,&m,&s,&hn);
  4669.  
  4670.         printf("The time is %d:%d:%d.%d.\n",h,m,s,hn);
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.                                                            get_timer
  4691.         Summary:
  4692.  
  4693.         long get_timer();
  4694.  
  4695.         Created: 01/03/87        Last Updated: 01/03/87
  4696.  
  4697.         Author: Dave Perras           Source (C/A): C
  4698.  
  4699.         Located in: TIMERS.C TIMERS.OBJ
  4700.  
  4701.         Requires: int86()
  4702.  
  4703.         Description:
  4704.  
  4705.         This function is used by the other timer routines in order to get 
  4706.         the value of the real time clock.  All DOS and compiler specifics 
  4707.         concerning the timer routines are contained in this routine.
  4708.  
  4709.         Compiler Specifics:
  4710.  
  4711.         This  function  uses  the  int86() function and may  need  to  be 
  4712.         modified for some compilers.
  4713.  
  4714.         Return Value:
  4715.  
  4716.         A  long value is returned holding the number of clock ticks  from 
  4717.         the real time clock counter.
  4718.  
  4719.         See Also:
  4720.  
  4721.         start_tmr() stop_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  4722.         init_tmr()
  4723.  
  4724.         Example:
  4725.  
  4726.         long ltime;
  4727.  
  4728.         ltime = get_timer();
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.                                                                gfbox
  4757.         Summary:
  4758.  
  4759.         int gfbox(x,y,x2,y2,clr);
  4760.         int x;                   /* Upper Left Row */
  4761.         int y;                   /* Upper Left Column */
  4762.         int x2;                  /* Lower Right Row */
  4763.         int y2;                  /* Lower Right Column */
  4764.         int clr;                 /* Color for Box */
  4765.  
  4766.         Created: 11/01/86        Last Updated: 11/01/86
  4767.  
  4768.         Author: Bob Pritchett         Source (C/A): C
  4769.  
  4770.         Located in: GFBOX.OBJ
  4771.  
  4772.         Requires: gline()
  4773.  
  4774.         Description:
  4775.  
  4776.         This  function is identical to gbox() with the exception that the 
  4777.         box created is filled in with the specified color.
  4778.  
  4779.         Compiler Specifics:
  4780.  
  4781.         None.
  4782.  
  4783.         Return Value:
  4784.  
  4785.         Nothing.
  4786.  
  4787.         See Also:
  4788.  
  4789.         ginit() gline() gpal() gbox()
  4790.  
  4791.         Example:
  4792.  
  4793.         ginit();
  4794.         gpal(0);
  4795.         gback(2);           /* Background to Red */
  4796.  
  4797.         gfbox(10,10,20,20,1);      /* Solid Green Box at 10,10 */
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.                                                                ginit
  4823.         Summary:
  4824.  
  4825.         int ginit();
  4826.  
  4827.         Created: 10/31/86        Last Updated: 10/31/86
  4828.  
  4829.         Author: Bob Pritchett         Source (C/A): C
  4830.  
  4831.         Located in: GINIT.OBJ
  4832.  
  4833.         Requires: Nothing.
  4834.  
  4835.         Description:
  4836.  
  4837.         This  function sets up the screen on a CGA for medium  resolution 
  4838.         graphics.   It is the exact equivalent of set_mode(4).  To set up 
  4839.         for high resolution graphics, use the command set_mode(6) instead 
  4840.         of ginit().
  4841.  
  4842.         Compiler Specifics:
  4843.  
  4844.         None.
  4845.  
  4846.         Return Value:
  4847.  
  4848.         Nothing.
  4849.  
  4850.         See Also:
  4851.  
  4852.         set_mode() gback() gdot() gpal()
  4853.  
  4854.         Example:
  4855.  
  4856.         ginit();            /* Medium Resolution Screen */
  4857.         gpal(0);
  4858.         gback(2);           /* Background to Red */
  4859.  
  4860.         gcircle(100,150,10,1);   /* Green Circle with radius of 10. */
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.                                                                gline
  4889.         Summary:
  4890.  
  4891.         int gline(x,y,x2,y2,clr);
  4892.         int x;                   /* Starting Row */
  4893.         int y;                   /* Starting Column */
  4894.         int x2;                  /* Ending Row */
  4895.         int y2;                  /* Ending Column */
  4896.         int clr;                 /* Color of Line */
  4897.  
  4898.         Created:   /  /          Last Updated:   /  /  
  4899.  
  4900.         Author: Dan Rollins           Source (C/A): C
  4901.  
  4902.         Located in: GLINE.OBJ
  4903.  
  4904.         Requires: gdot()
  4905.  
  4906.         Description:
  4907.  
  4908.         This routine,  found in the Febuary,  1986,  Dr.  Dobb's Journal, 
  4909.         plots  a  line from the first to the second set  of  coordinates.  
  4910.         The first set of coordinates needn't be lower than the second.
  4911.  
  4912.         Compiler Specifics:
  4913.  
  4914.         None.
  4915.  
  4916.         Return Value:
  4917.  
  4918.         Nothing.
  4919.  
  4920.         See Also:
  4921.  
  4922.         gcircle() gback() gdot() gpal()
  4923.  
  4924.         Example:
  4925.  
  4926.         ginit();            /* Medium Resolution Screen */
  4927.         gpal(0);
  4928.         gback(2);           /* Background to Red */
  4929.  
  4930.         gline(10,10,50,50,1);    /* A Diagonal Green Line */
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.                                                               gotoxy
  4955.         Summary:
  4956.  
  4957.         int gotoxy(row,col);
  4958.         int row;                 /* Screen Row */
  4959.         int col;                 /* Screen Column */
  4960.  
  4961.         Created: 00/00/00        Last Updated: 08/20/86
  4962.  
  4963.         Author:                       Source (C/A): A
  4964.  
  4965.         Located in: GOTOXY.OBJ
  4966.  
  4967.         Requires: Nothing
  4968.  
  4969.         Description:
  4970.  
  4971.         The gotoxy function will set the cursor to the screen coordinates 
  4972.         specified  in row and col,  regardless of windows or other  high-
  4973.         level screen manipulation.
  4974.  
  4975.         Service two of the bios video interrupt 0x10 is used.
  4976.  
  4977.         Compiler Specifics:
  4978.  
  4979.         Assembled with calling sequence for MSC 3.0 and  Lattice.   Other 
  4980.         compilers not yet tested.  Standard Microsoft OBJ format.
  4981.  
  4982.         Return Value:
  4983.  
  4984.         This  routine  returns  nothing,  and does not  check  coordinate 
  4985.         validity.
  4986.  
  4987.         See Also:
  4988.  
  4989.         wgotoxy()
  4990.  
  4991.         Example:
  4992.  
  4993.         #include <stdio.h>
  4994.  
  4995.         int row;
  4996.         int col;
  4997.  
  4998.         row = 10;
  4999.         col = 20;
  5000.  
  5001.         gotoxy(row,col);
  5002.  
  5003.         printf("I am now at Column 20 on Row 10.\n");
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.                                                                 gpal
  5021.         Summary:
  5022.  
  5023.         int gpal(palette);
  5024.         int palette;             /* Color Palette to Use */
  5025.  
  5026.         Created: 10/31/86        Last Updated: 10/31/86
  5027.  
  5028.         Author: Bob Pritchett         Source (C/A): A
  5029.  
  5030.         Located in: GPAL.OBJ
  5031.  
  5032.         Requires: Nothing.
  5033.  
  5034.         Description:
  5035.  
  5036.         This  routine  sets the current color palette for use  in  medium 
  5037.         resolution  graphics.   (In  high  resolution graphics  the  only 
  5038.         choices are on one palette, 0 for black, 1 for white.)
  5039.  
  5040.                   Palette 0:               Palette 1:
  5041.                   (0) Background Color     (0) Background Color
  5042.                   (1) Green                (1) Cyan
  5043.                   (2) Red                  (2) Magenta
  5044.                   (3) Brown                (3) White
  5045.  
  5046.         Compiler Specifics:
  5047.  
  5048.         None.
  5049.  
  5050.         Return Value:
  5051.  
  5052.         Nothing.
  5053.  
  5054.         See Also:
  5055.  
  5056.         ginit() gback() gdot()
  5057.  
  5058.         Example:
  5059.  
  5060.         ginit();            /* Medium Resolution Screen */
  5061.         gpal(0);
  5062.         gback(2);           /* Background to Red */
  5063.  
  5064.         gline(10,10,50,50,3);    /* A Diagonal Brown Line */
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.                                                             init_tmr
  5087.         Summary:
  5088.  
  5089.         void init_tmr();
  5090.  
  5091.         Created: 01/03/87        Last Updated: 01/03/87
  5092.  
  5093.         Author: Dave Perras           Source (C/A): C
  5094.  
  5095.         Located in: TIMERS.C TIMERS.OBJ
  5096.  
  5097.         Requires: get_timer()
  5098.  
  5099.         Description:
  5100.  
  5101.         This  function  must  be called before any  of  the  other  timer 
  5102.         functions  are  called.   It tests the real time clock to  ensure 
  5103.         that it is operating,  clears the ten timers to zero and sets  an 
  5104.         internal flag to show that the timers have been initialized.
  5105.  
  5106.         Compiler Specifics:
  5107.  
  5108.         None.
  5109.  
  5110.         Return Value:
  5111.  
  5112.         This function returns the elapsed time (in tenths of seconds) for 
  5113.         16000 iterations of an empty "for" loop.   If the real time clock 
  5114.         is diagnosed as not working, and error value of zero is returned.
  5115.  
  5116.         See Also:
  5117.  
  5118.         start_tmr() stop_tmr() read_tmr() reset_tmr() zero_tmr()
  5119.         get_timer()
  5120.  
  5121.         Example:
  5122.  
  5123.         #include <stdio.h>
  5124.  
  5125.         if ( ! init_tmr() )
  5126.            fprintf(stderr,"Real Time Clock Error\n");
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.                                                              inptint
  5153.         Summary:
  5154.  
  5155.         int inptint(prompt);
  5156.         char *prompt;            /* Prompt for Input */
  5157.  
  5158.         Created: 08/16/86        Last Updated: 08/16/86
  5159.  
  5160.         Author: Bob Pritchett         Source (C/A): C
  5161.  
  5162.         Located in: INPUT.OBJ
  5163.  
  5164.         Requires: Nothing.
  5165.  
  5166.         Description:
  5167.  
  5168.         This  function  displays the prompt given at the  current  cursor 
  5169.         location  using  stdout  and then inputs  an  integer.   After  a 
  5170.         carriage  return  (with mandatory input of an integer) the  value 
  5171.         entered is returned.
  5172.  
  5173.         Compiler Specifics:
  5174.  
  5175.         None.
  5176.  
  5177.         Return Value:
  5178.  
  5179.         The integer inputted.
  5180.  
  5181.         See Also:
  5182.  
  5183.         inptintd() inptintr() inptintrd()
  5184.  
  5185.         Example:
  5186.  
  5187.         printf("inptint() returns: %d.\n",inptint("Enter Integer:"));
  5188.  
  5189.              /* The above function prompts "Enter Integer: " and then */
  5190.              /* executes the printf statement. */
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.                                                             inptintd
  5219.         Summary:
  5220.  
  5221.         int inptintd(prompt,def);
  5222.         char *prompt;            /* Prompt for Input */
  5223.         int def;                 /* Default Integer */
  5224.  
  5225.         Created: 08/16/86        Last Updated: 08/16/86
  5226.  
  5227.         Author: Bob Pritchett         Source (C/A): C
  5228.  
  5229.         Located in: INPUT.OBJ
  5230.  
  5231.         Requires: Nothing.
  5232.  
  5233.         Description:
  5234.  
  5235.         This  function displays the prompt given followed by the  default 
  5236.         integer.   If a carriage return is entered as the first character 
  5237.         the  default  integer  will be  returned.   If  any  other  valid 
  5238.         character  is entered the default will be erased and the user may 
  5239.         enter an integer value.
  5240.  
  5241.         Compiler Specifics:
  5242.  
  5243.         None.
  5244.  
  5245.         Return Value:
  5246.  
  5247.         The integer inputted, or the default.
  5248.  
  5249.         See Also:
  5250.  
  5251.         inptint() inptintr() inptintrd()
  5252.  
  5253.         Example:
  5254.  
  5255.         printf("inptintd() returns: %d.\n",inptintd("Enter Integer:",9));
  5256.  
  5257.              /* The above function prompts "Enter Integer: " and then */
  5258.              /* executes the printf statement. */
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.                                                             inptintr
  5285.         Summary:
  5286.  
  5287.         int inptintr(prompt,low,high);
  5288.         char *prompt;            /* Prompt for Input */
  5289.         int low;                 /* Lowest Acceptable Input */
  5290.         int high;                /* Highest Acceptable Input */
  5291.  
  5292.         Created: 08/16/86        Last Updated: 08/16/86
  5293.  
  5294.         Author: Bob Pritchett         Source (C/A): C
  5295.  
  5296.         Located in: INPUT.OBJ
  5297.  
  5298.         Requires: Nothing.
  5299.  
  5300.         Description:
  5301.  
  5302.         After  displaying the prompt specified this function  will  input 
  5303.         and  integer  in the same manner as inptint(),  only checking  to 
  5304.         make sure that the value inputted is within the range given.   If 
  5305.         it is not equal to or within this range the function will  prompt 
  5306.         for another integer until a valid one is entered.
  5307.  
  5308.         Compiler Specifics:
  5309.  
  5310.         None.
  5311.  
  5312.         Return Value:
  5313.  
  5314.         The integer inputted, within the specified range.
  5315.  
  5316.         See Also:
  5317.  
  5318.         inptint() inptintd() inptintrd()
  5319.  
  5320.         Example:
  5321.  
  5322.         printf("inptintr() returns: %d.\n",inptintr("Enter Integer:"
  5323.                ,5,62));
  5324.  
  5325.              /* The above function prompts "Enter Integer: " and then */
  5326.              /* executes the printf statement.  The returned value */
  5327.              /* will be greater than 4 and less than 63. */ 
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.                                                            inptintrd
  5351.         Summary:
  5352.  
  5353.         int inptintrd(prompt,low,high,def);
  5354.         char *prompt;            /* Prompt for Input */
  5355.         int low;                 /* Lowest Acceptable Input */
  5356.         int high;                /* Highest Acceptable Input */
  5357.         int def;                 /* Default Value */
  5358.  
  5359.         Created: 08/16/86        Last Updated: 08/16/86
  5360.  
  5361.         Author: Bob Pritchett         Source (C/A): C
  5362.  
  5363.         Located in: INPUT.OBJ
  5364.  
  5365.         Requires: Nothing.
  5366.  
  5367.         Description:
  5368.  
  5369.         This function displays the default integer value after the prompt 
  5370.         and  then returns either the default integer or a  user  inputted 
  5371.         value  within  the specified range.   The input follows the  same 
  5372.         rules as inptintd() and inptintr().
  5373.  
  5374.         Compiler Specifics:
  5375.  
  5376.         None.
  5377.  
  5378.         Return Value:
  5379.  
  5380.         The integer inputted, or the default, within the specified range.
  5381.  
  5382.         See Also:
  5383.  
  5384.         inptint() inptintd() inptintr()
  5385.  
  5386.         Example:
  5387.  
  5388.         printf("inptintrd() returns: %d.\n",inptintrd("Enter Integer:"
  5389.                ,8,50,30));
  5390.  
  5391.              /* The above function prompts "Enter Integer: 30" and */
  5392.              /* then executes the printf statement.  The returned */
  5393.              /* value will be greater than 7 and less than 51. */ 
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.                                                              inptstr
  5417.         Summary:
  5418.  
  5419.         char *inptstr(prompt);
  5420.         char *prompt;            /* Prompt for Input */
  5421.  
  5422.         Created: 08/25/86        Last Updated: 08/25/86
  5423.  
  5424.         Author: Bob Pritchett         Source (C/A): C
  5425.  
  5426.         Located in: INPUT.OBJ
  5427.  
  5428.         Requires: Nothing.
  5429.  
  5430.         Description:
  5431.  
  5432.         After  displaying  the  given prompt this function waits  for  an 
  5433.         input string.   Nothing longer than 80 characters will be handled 
  5434.         correctly,  and the routine will beep at a carriage return in the 
  5435.         first column,  making some input mandatory.   For functions  with 
  5436.         more control over input parameters, see inptstrd() and finptstr() 
  5437.         and related routines.
  5438.  
  5439.         Compiler Specifics:
  5440.  
  5441.         None.
  5442.  
  5443.         Return Value:
  5444.  
  5445.         The character string inputted.
  5446.  
  5447.         See Also:
  5448.  
  5449.         inptstrd() finptstr() finptstrd() finptstre() finptstred()
  5450.  
  5451.         Example:
  5452.  
  5453.         printf("Hello there, %s.\n",inptstr("Your name?"));
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.                                                             inptstrd
  5483.         Summary:
  5484.  
  5485.         char *inptstrd(prompt,def);
  5486.         char *prompt;            /* Prompt for Input */
  5487.         char *def;               /* Default String */
  5488.  
  5489.         Created: 08/25/86        Last Updated: 08/25/86
  5490.  
  5491.         Author: Bob Pritchett         Source (C/A): C
  5492.  
  5493.         Located in: INPUT.OBJ
  5494.  
  5495.         Requires: Nothing.
  5496.  
  5497.         Description:
  5498.  
  5499.         This  function  acts  in the same manner as  inptstr()  with  the 
  5500.         exception  that  a default string may be specified,  and  at  the 
  5501.         choice  of the user this string may be returned instead of a user 
  5502.         entered string.   When the function is called the default  string 
  5503.         is displayed immediately following the prompt,  and the cursor is 
  5504.         placed  at  the  first character of the string.   If  a  carriage 
  5505.         return  is entered as the first inputted character,  the  default 
  5506.         string is returned.   Any other key causes the default string  to 
  5507.         be  erased and a user entered string may be inputted. 
  5508.  
  5509.         Compiler Specifics:
  5510.  
  5511.         None.
  5512.  
  5513.         Return Value:
  5514.  
  5515.         The character string inputted, or the default string.
  5516.  
  5517.         See Also:
  5518.  
  5519.         inptstr() finptstr() finptstrd() finptstre() finptstred()
  5520.  
  5521.         Example:
  5522.  
  5523.         printf("Hello there, %s.\n",inptstrd("Your name?","Richard"));
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.                                                               inptyn
  5549.         Summary:
  5550.  
  5551.         char *inptyn(prompt);
  5552.         char *prompt;            /* Prompt for Input */
  5553.  
  5554.         Created: 08/16/86        Last Updated: 08/16/86
  5555.  
  5556.         Author: Bob Pritchett         Source (C/A): C
  5557.  
  5558.         Located in: INPUT.OBJ
  5559.  
  5560.         Requires: Nothing.
  5561.  
  5562.         Description:
  5563.  
  5564.         This function displays the given prompt and then waits for either 
  5565.         a  Y  or  an  N in reply.   A single character  is  all  that  is 
  5566.         inputted,  and a Y or N must be entered.  If a Y is entered a one 
  5567.         is returned, if an N is entered a zero is returned.
  5568.  
  5569.         Compiler Specifics:
  5570.  
  5571.         None.
  5572.  
  5573.         Return Value:
  5574.  
  5575.         A one or zero, dependent on the inputted character.
  5576.  
  5577.         See Also:
  5578.  
  5579.         inptynd() finptyn() finptynd();
  5580.  
  5581.         Example:
  5582.  
  5583.         if ( inptyn("Do you program microcomputers?") )
  5584.            printf("Oh, you do.");
  5585.  
  5586.              /* Prompts 'Do you program microcomputers? (Y/N) ' */
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.                                                             inptynd
  5615.         Summary:
  5616.  
  5617.         char *inptynd(prompt,x);
  5618.         char *prompt;            /* Prompt for Input */
  5619.         int x;                   /* Default Answer */
  5620.  
  5621.         Created: 08/16/86        Last Updated: 08/16/86
  5622.  
  5623.         Author: Bob Pritchett         Source (C/A): C
  5624.  
  5625.         Located in: INPUT.OBJ
  5626.  
  5627.         Requires: Nothing.
  5628.  
  5629.         Description:
  5630.  
  5631.         This  function  works just like inptyn() except that the  default 
  5632.         response  is  the uppercase letter in the prompt  which  will  be 
  5633.         returned if a carriage return is entered instead of a Y or N.
  5634.  
  5635.         Compiler Specifics:
  5636.  
  5637.         None.
  5638.  
  5639.         Return Value:
  5640.  
  5641.         A  one  or  zero,  dependent on the inputted  character,  or  the 
  5642.         default.
  5643.  
  5644.         See Also:
  5645.  
  5646.         inptyn() finptyn() finptynd();
  5647.  
  5648.         Example:
  5649.  
  5650.         if ( inptyn("Do you program microcomputers?",1) )
  5651.            printf("Oh, you do.");
  5652.  
  5653.              /* Prompts 'Do you program microcomputers? (Y/n) ' */
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.                                                               isleap
  5681.         Summary:
  5682.  
  5683.         int isleap(y);
  5684.         int y;                   /* Year */
  5685.  
  5686.         Created: 09/01/86        Last Updated: 09/01/86
  5687.  
  5688.         Author: George Roukas         Source (C/A): C
  5689.  
  5690.         Located in: CSRDATE.OBJ
  5691.  
  5692.         Requires: Nothing.
  5693.  
  5694.         Description:
  5695.  
  5696.         This function will tell if the specified year (four or two  digit 
  5697.         format) is a leap year.
  5698.  
  5699.         Compiler Specifics:
  5700.  
  5701.         None.
  5702.  
  5703.         Return Value:
  5704.  
  5705.         Returns a one if it is a leap year, zero if it is not.
  5706.  
  5707.         See Also:
  5708.  
  5709.  
  5710.  
  5711.         Example:
  5712.  
  5713.         int x = 1986;
  5714.  
  5715.         if ( isleap(x) )
  5716.            printf("%d is a leap year.\n");
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.                                                               iswild
  5747.         Summary:
  5748.  
  5749.         #include <csrmisc.h>     /* Header File Containing the Macro */
  5750.  
  5751.         int iswild(c);
  5752.         int c;                   /* Character to Test */
  5753.  
  5754.         Created: 12/05/86        Last Updated: 12/05/86
  5755.  
  5756.         Author: Bob Pritchett         Source (C/A): C
  5757.  
  5758.         Located in: CSRMISC.H
  5759.  
  5760.         Requires: Nothing.
  5761.  
  5762.         Description:
  5763.  
  5764.         This  macro evaluates positive if the given character is a '?' or 
  5765.         an '*'. 
  5766.  
  5767.         Compiler Specifics:
  5768.  
  5769.         None.
  5770.  
  5771.         Return Value:
  5772.  
  5773.         Acts positive if the character is a wildcard, negative if not.
  5774.  
  5775.         See Also:
  5776.  
  5777.         istemplate()
  5778.  
  5779.         Example:
  5780.  
  5781.         if ( iswild('?') )
  5782.            printf("This character is a wild card.\n");
  5783.  
  5784.                   /* The printf statement is executed. */
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.  
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.                                                           istemplate
  5813.         Summary:
  5814.  
  5815.         int istemplate(str);
  5816.         char *str;               /* String to Evaluate */
  5817.  
  5818.         Created: 12/05/86        Last Updated: 12/05/86
  5819.  
  5820.         Author: Bob Pritchett         Source (C/A): C
  5821.  
  5822.         Located in: WILDCARD.OBJ
  5823.  
  5824.         Requires: Nothing.
  5825.  
  5826.         Description:
  5827.  
  5828.         This  function returns a one if a wildcard is encountered  within 
  5829.         the  given string.   By using this function it can be  determined 
  5830.         whether a file may be opened or if the string should be passed to 
  5831.         the ffirst() and fnext() routines.
  5832.  
  5833.         Compiler Specifics:
  5834.  
  5835.         None.
  5836.  
  5837.         Return Value:
  5838.  
  5839.         Returns a one if a wildcard is encountered, zero if not.
  5840.  
  5841.         See Also:
  5842.  
  5843.         iswild()
  5844.  
  5845.         Example:
  5846.  
  5847.         if ( istemplate("file*.e?w") )
  5848.            printf("The filename given is a template.\n");
  5849.  
  5850.                   /* The printf statement is executed. */
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.                                                                itofa
  5879.         Summary:
  5880.  
  5881.         int itofa(x,str);
  5882.         int x;                   /* Integer to Format */
  5883.         char *str;               /* Location to Place String */
  5884.  
  5885.         Created: 11/07/85        Last Updated: 11/07/86
  5886.  
  5887.         Author: Bob Pritchett         Source (C/A): C
  5888.  
  5889.         Located in: IOTFA.OBJ
  5890.  
  5891.         Requires: Nothing.
  5892.  
  5893.         Description:
  5894.  
  5895.         This  function  takes an integer and returns a string  with  that 
  5896.         integer formatted with commas.  The string is placed in str and a 
  5897.         pointer is returned to it.
  5898.  
  5899.         Compiler Specifics:
  5900.  
  5901.         None.
  5902.  
  5903.         Return Value:
  5904.  
  5905.         Returns a pointer to the formatted string.
  5906.  
  5907.         See Also:
  5908.  
  5909.         ltofa()
  5910.  
  5911.         Example:
  5912.  
  5913.         int x = 12526;
  5914.         char temp[10];
  5915.  
  5916.         printf("There are %s people in this county.\n",itofa(x,temp));
  5917.  
  5918.              /* Returns "12,526". */
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.                                                               lprint
  5945.         Summary:
  5946.  
  5947.         int lprint(string);
  5948.         char *string;            /* String to Print */
  5949.  
  5950.         Created: 03/10/86        Last Updated: 03/11/86
  5951.  
  5952.         Author: Bob Pritchett         Source (C/A): C
  5953.  
  5954.         Located in: PRINT.OBJ
  5955.  
  5956.         Requires: lputchar()
  5957.  
  5958.         Description:
  5959.  
  5960.         This  function simply prints the string to the printer.   Nothing 
  5961.         other then the standard escape codes are recognized.
  5962.  
  5963.         Compiler Specifics:
  5964.  
  5965.         None.
  5966.  
  5967.         Return Value:
  5968.  
  5969.         Nothing.
  5970.  
  5971.         See Also:
  5972.  
  5973.         wprint()
  5974.  
  5975.         Example:
  5976.  
  5977.         lprint("This string has no formatting at all.\n");
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.                                                              lprintf
  6011.         Summary:
  6012.  
  6013.         int lprintf(string[,arguments...]);
  6014.         char *string;            /* Format String to Print */
  6015.  
  6016.         Created: 03/10/86        Last Updated: 08/17/86
  6017.  
  6018.         Author: Bob Pritchett         Source (C/A): C
  6019.  
  6020.         Located in: PRINT.OBJ
  6021.  
  6022.         Requires: Nothing.
  6023.  
  6024.         Description:
  6025.  
  6026.         This function is a version of the familiar printf() function that 
  6027.         prints  directly to the printer.   (Note that DOS function  5  is 
  6028.         used,  it  is  not  done through file  pointers.)   The  argument 
  6029.         formatting should be in the same format as for printf().
  6030.  
  6031.         Compiler Specifics:
  6032.  
  6033.         None.
  6034.  
  6035.         Return Value:
  6036.  
  6037.         Nothing.
  6038.  
  6039.         See Also:
  6040.  
  6041.         wprintf()
  6042.  
  6043.         Example:
  6044.  
  6045.         lprintf("This goes to the printer: %02d %5s\n",6,"Wow");
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.                                                             lputchar
  6077.         Summary:
  6078.  
  6079.         int lputchar(c);
  6080.         int c;                   /* Character to Print */
  6081.  
  6082.         Created: 03/10/86        Last Updated: 03/11/86
  6083.  
  6084.         Author: Bob Pritchett         Source (C/A): C
  6085.  
  6086.         Located in: PRINT.OBJ
  6087.  
  6088.         Requires: bdos()
  6089.  
  6090.         Description:
  6091.  
  6092.         Using the bdos call five this routine simply puts the character c 
  6093.         to the printer.  It is called by lprint().
  6094.  
  6095.         Compiler Specifics:
  6096.  
  6097.         None.
  6098.  
  6099.         Return Value:
  6100.  
  6101.         Nothing.
  6102.  
  6103.         See Also:
  6104.  
  6105.         lprint() lprintf()
  6106.  
  6107.         Example:
  6108.  
  6109.         lputchar('\r');
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.                                                                ltofa
  6143.         Summary:
  6144.  
  6145.         int ltofa(x,str);
  6146.         long x;                  /* Long to Format */
  6147.         char *str;               /* Location to Place String */
  6148.  
  6149.         Created: 11/07/85        Last Updated: 11/07/86
  6150.  
  6151.         Author: Bob Pritchett         Source (C/A): C
  6152.  
  6153.         Located in: LOTFA.OBJ
  6154.  
  6155.         Requires: Nothing.
  6156.  
  6157.         Description:
  6158.  
  6159.         Performing  just like itofa(),  this function formats  the  given 
  6160.         number into an ASCII string with commas.
  6161.  
  6162.         Compiler Specifics:
  6163.  
  6164.         None.
  6165.  
  6166.         Return Value:
  6167.  
  6168.         Returns a pointer to the formatted string.
  6169.  
  6170.         See Also:
  6171.  
  6172.         itofa()
  6173.  
  6174.         Example:
  6175.  
  6176.         long x = 2364736;
  6177.         char temp[15];
  6178.  
  6179.         printf("There are %s apples in this county.\n",ltofa(x,temp));
  6180.  
  6181.              /* Returns "2,364,736". */
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.                                                                match
  6209.         Summary:
  6210.  
  6211.         int match(pat,str,start);
  6212.         char pat[];              /* Pattern to Search for */
  6213.         char str[];              /* String to Search in */
  6214.         int start;               /* Character to Start on */
  6215.  
  6216.         Created: 11/23/85        Last Updated: 11/23/85
  6217.  
  6218.         Author: Bob Pritchett         Source (C/A): C
  6219.  
  6220.         Located in: MATCH.OBJ
  6221.  
  6222.         Requires: strlen()
  6223.  
  6224.         Description:
  6225.  
  6226.         The  match() function searches the string str for the string pat, 
  6227.         and  returns  an integer value of the first place  pat  is  found 
  6228.         within  str.   By  changing the variable start from  it's  normal 
  6229.         useage  as  0,  you may begin the search from a certain place  in 
  6230.         str.   The following wildcards are acceptable within pat:  
  6231.  
  6232.                   #  Any digit from 1-9, and 0
  6233.                   ?  Any character at all
  6234.                   !  Any upper-case letter
  6235.                   ^  Any control character
  6236.  
  6237.         Compiler Specifics:
  6238.  
  6239.         None.
  6240.  
  6241.         Return Value:
  6242.  
  6243.         Returns the first place that pat is found within str.
  6244.  
  6245.         See Also:
  6246.  
  6247.  
  6248.         Example:
  6249.  
  6250.         x = match("a?c","xyzabc",0);  /* x = 3, where abc begins. */
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.                                                               mcolor
  6275.         Summary:
  6276.  
  6277.         #include <color.h>       /* For Color Definitions Only */
  6278.  
  6279.         int mcolor(norm,bar);
  6280.         int norm;                /* Color Used for Menu Options */
  6281.         int bar;                 /* Color for Hightlight Bar */
  6282.  
  6283.         Created: 04/16/86        Last Updated: 04/16/86
  6284.  
  6285.         Author: Bob Pritchett         Source (C/A): C
  6286.  
  6287.         Located in: COUTPUT.OBJ
  6288.  
  6289.         Requires: Nothing.
  6290.  
  6291.         Description:
  6292.  
  6293.         This  function sets the colors to be used by pop_menu() and  it's 
  6294.         scrolling highlight bar.  The variable norm contains the complete 
  6295.         attribute for each option, and bar for the highlight bar.
  6296.  
  6297.         Compiler Specifics:
  6298.  
  6299.         None.
  6300.  
  6301.         Return Value:
  6302.  
  6303.         Nothing.
  6304.  
  6305.         See Also:
  6306.  
  6307.         color() wcolor()
  6308.  
  6309.         Example:
  6310.  
  6311.         #include <color.h>
  6312.  
  6313.         mcolor(WHT_F+BLU_B,YEL_F+RED_B);
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.                                                              message
  6341.         Summary:
  6342.  
  6343.         int message(mess,x);
  6344.         char *mess;              /* Message to Display */
  6345.         int x;                   /* Flag for Window Message */
  6346.  
  6347.         Created: 08/09/86        Last Updated: 08/09/86
  6348.  
  6349.         Author: Bob Pritchett         Source (C/A): C
  6350.  
  6351.         Located in: MESSAGE.OBJ
  6352.  
  6353.         Requires: Nothing.
  6354.  
  6355.         Description:
  6356.  
  6357.         This  function  opens  a small window in the  current  color  and 
  6358.         displays the string specified in mess.   If the variable x is set 
  6359.         to one, the message "[ Hit a Key ]" is displayed on the bottom of 
  6360.         the  window.   A single keystroke closes the window,  and the key 
  6361.         value is returned.
  6362.  
  6363.         Compiler Specifics:
  6364.  
  6365.         None.
  6366.  
  6367.         Return Value:
  6368.  
  6369.         The key used to close the window.
  6370.  
  6371.         See Also:
  6372.  
  6373.  
  6374.  
  6375.         Example:
  6376.  
  6377.         message("**  Attempt to Open File Failed **",1);
  6378.  
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.                                                            month_day
  6407.         Summary:
  6408.  
  6409.         int month_day(yr,yd,m,d);
  6410.         int yr;                  /* Year To Calculate For */
  6411.         int yd;                  /* Number of Days Elapsed in Year */
  6412.         int *m;                  /* Where to Store Month */
  6413.         int *d;                  /* Where to Store Day */
  6414.  
  6415.         Created: 09/01/86        Last Updated: 09/01/86
  6416.  
  6417.         Author: George Roukas         Source (C/A): C
  6418.  
  6419.         Located in: CSRDATE.OBJ
  6420.  
  6421.         Requires: isleap()
  6422.  
  6423.         Description:
  6424.  
  6425.         Similar  to the K&R (pp 103-104) routine of the same  name,  this 
  6426.         function  calculates the menth and day of the year when given the 
  6427.         year and number of days elapsed in that year.
  6428.  
  6429.         Compiler Specifics:
  6430.  
  6431.         None.
  6432.  
  6433.         Return Value:
  6434.  
  6435.         Nothing.
  6436.  
  6437.         See Also:
  6438.  
  6439.         date_sn() sn_date() isleap()
  6440.  
  6441.         Example:
  6442.  
  6443.         int m;
  6444.         int d;
  6445.  
  6446.         month_day(1986,3,&m,&d);
  6447.  
  6448.         printf("%02d/%02d is 3 days into 1986.\n",m,d);
  6449.  
  6450.                   /* Will output: 01/03 is.... */
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.                                                             num_days
  6473.         Summary:
  6474.  
  6475.         int num_days(m,y);
  6476.         int m;                   /* Month to Get Number of Days For */
  6477.         int y;                   /* Year */
  6478.  
  6479.         Created: 12/27/85        Last Updated: 12/27/85
  6480.  
  6481.         Author: Bob Pritchett         Source (C/A): C
  6482.  
  6483.         Located in: CSRDATE.OBJ
  6484.  
  6485.         Requires: isleap()
  6486.  
  6487.         Description:
  6488.  
  6489.         This function returns the number of days in the month  specified, 
  6490.         leap years taken into account.
  6491.  
  6492.         Compiler Specifics:
  6493.  
  6494.         None.
  6495.  
  6496.         Return Value:
  6497.  
  6498.         The number of days.
  6499.  
  6500.         See Also:
  6501.  
  6502.         date_sn() sn_date() isleap() chk_date()
  6503.  
  6504.         Example:
  6505.  
  6506.         printf("%d days in February, 1980.\n",num_days(2,1980));
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.                                                           num_drives
  6539.         Summary:
  6540.  
  6541.         int num_drives();
  6542.  
  6543.         Created: 04/06/86        Last Updated: 04/06/86
  6544.  
  6545.         Author: Bob Pritchett         Source (C/A): A
  6546.  
  6547.         Located in: NUMDRVS.OBJ
  6548.  
  6549.         Requires: Nothing.
  6550.  
  6551.         Description:
  6552.  
  6553.         This  function  returns  a single integer value,  the  number  of 
  6554.         logical drives available.   Remember that although this  function 
  6555.         returns the number of available drives, access to these drives is 
  6556.         numbered  from  zero,  so if 3 drives are reported,  the  highest 
  6557.         number that may be accessed is 2.
  6558.  
  6559.         Compiler Specifics:
  6560.  
  6561.         None.
  6562.  
  6563.         Return Value:
  6564.  
  6565.         The total number of logical drives installed.
  6566.  
  6567.         See Also:
  6568.  
  6569.         get_drive() set_drive()
  6570.  
  6571.         Example:
  6572.  
  6573.         printf("%d drives installed.  A: - %c:\n",num_drives(),
  6574.                ( 'A' + ( num_drives() - 1 ) ));
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.                                                                pmenu
  6605.         Summary:
  6606.  
  6607.         #include <csrmenu.h>     /* Contains MENU typedef */
  6608.  
  6609.         int pmenu(menu)
  6610.         MENU menu;               /* Pointer to Menu Structure */
  6611.  
  6612.         Created: 08/08/86        Last Updated: 08/20/86
  6613.  
  6614.         Author: Bob Pritchett         Source (C/A): C
  6615.  
  6616.         Located in: MENU.OBJ
  6617.  
  6618.         Requires: Nothing.
  6619.  
  6620.         Description:
  6621.  
  6622.         This function will display a pop up menu and allow for  selection 
  6623.         of an item with the arrow keys,  or the space and backspace keys. 
  6624.         The  differences between pmenu() and pop_menu() are mostly in the 
  6625.         calling method.   By using a data element of the MENU type as the 
  6626.         only argument, the number of parameters specifiable is increased, 
  6627.         allowing  for  better control of the menu,  while the  number  of 
  6628.         function arguments is reduced to one for cleaner coding.
  6629.  
  6630.         If the first character in an item name is a hyphen, the item will 
  6631.         be a horizontal line of the border color and type.  If the return 
  6632.         value  of  an  element  is  a  negative  one,  the  item  is  non 
  6633.         selectable.
  6634.  
  6635.         Note,  unlike  pop_menu(),  pmenu() will center the text of  each 
  6636.         entry to the width of the largest entry.  If you place a space on 
  6637.         each side of only the largest (widest) entry in a menu structure, 
  6638.         all menu options will have at least one space on each side.
  6639.  
  6640.         For information on specification of menus,  read the  description 
  6641.         of CSRMENU.H.
  6642.  
  6643.         Compiler Specifics:
  6644.  
  6645.         None.
  6646.  
  6647.         Return Value:
  6648.  
  6649.         The value of the menu item selected or a -1 for failure.
  6650.  
  6651.         See Also:
  6652.  
  6653.         pop_menu()
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.                                                                pmenu
  6671.  
  6672.  
  6673.  
  6674.  
  6675.         Example:
  6676.  
  6677.         #include <csrmenu.h>
  6678.         #include <color.h>
  6679.  
  6680.         MENU mnu;
  6681.  
  6682.         main() 
  6683.          {
  6684.           int x;
  6685.           strcpy(mnu->title,"Menu");
  6686.           mnu->type = 3;
  6687.           mnu->border = WHT_F+BLU_B;
  6688.           mnu->normal = RED_F+WHT_B;
  6689.           mnu->bar = WHT_F+RED_B;
  6690.           mnu->row = 6;
  6691.           mnu->col = 20;
  6692.           mnu->num = 4;
  6693.           strcpy(mnu->entry[0].text,"Help");
  6694.           mnu->entry[0].value = 1;
  6695.           strcpy(mnu->entry[1].text,"Exit");
  6696.           mnu->entry[1].value = 2;
  6697.           strcpy(mnu->entry[2].text,"-");
  6698.           mnu->entry[2].value = -1;
  6699.           strcpy(mnu->entry[3].text," Static ");
  6700.           mnu->entry[3].value = -1;
  6701.           x = pmenu(mnu);
  6702.           if ( x == -1 )
  6703.              exit(1);
  6704.           else if ( x == 1 )
  6705.              help();
  6706.           else
  6707.              exit(0);
  6708.           .
  6709.           .
  6710.           .
  6711.          }
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.                                                             pop_menu
  6737.         Summary:
  6738.  
  6739.         int pop_menu(x,y,num,args,title,type);
  6740.         int x;                   /* Row to Start on */
  6741.         int y;                   /* Col to Start on */
  6742.         int num;                 /* Number of Options */
  6743.         char *args[];            /* Function Names */
  6744.         char *title;             /* Menu Title */
  6745.         int type;                /* Window Type */
  6746.  
  6747.         Created: 03/09/86        Last Updated: 03/09/86
  6748.  
  6749.         Author: Bob Pritchett         Source (C/A): C
  6750.  
  6751.         Located in: COUTPUT.OBJ
  6752.  
  6753.         Requires: wopen() wclose() wtitle()
  6754.  
  6755.         Description:
  6756.  
  6757.         This  function  opens  a  window at x,y titled  with  the  string 
  6758.         pointed to by title,  of type border style,  and with num options 
  6759.         stored in args[].   The window's width is the size of the maximum 
  6760.         length option.   The options are printed as sent to the  routine, 
  6761.         but  for  a clean highligh bar,  and better performance  all  the 
  6762.         options should be centered previously in a string.   See the demo 
  6763.         programs for more examples of this.   Also note,  after an option 
  6764.         is selected with the highlight bar,  the it's number is returned, 
  6765.         and the window closed.  You must reopen the menu, this preferably 
  6766.         done  in  a loop[ structure that opens the  menu,  processes  the 
  6767.         resulting  code,  and  then reopens the menu.   This system is  a 
  6768.         simple building block for more advanced menu design.
  6769.  
  6770.         Compiler Specifics:
  6771.  
  6772.         See window notes.
  6773.  
  6774.         Return Value:
  6775.  
  6776.         The number of the option selected with the highlight bar, or a -1 
  6777.         signifying the user aborted the menu with the ESC key.
  6778.  
  6779.         See Also:
  6780.  
  6781.         mcolor()
  6782.  
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.                                                             pop_menu
  6803.  
  6804.  
  6805.  
  6806.  
  6807.         Example:
  6808.  
  6809.         #include <color.h>
  6810.  
  6811.         static char *array[] =
  6812.          {
  6813.           " Option 1 ",
  6814.           " Option 2 ",
  6815.           "   Quit   "
  6816.          };
  6817.  
  6818.         main()
  6819.          {
  6820.           int x;
  6821.           cls();
  6822.  
  6823.           while ( 1 )
  6824.            {
  6825.  
  6826.         /* Inside doesn't matter, mcolor() does that, so we use wcolor
  6827.            only to set our border.  Then mcolor() will set our menu
  6828.            colors.  (Color definition in loop in case other routines 
  6829.            change them.) */
  6830.  
  6831.             wcolor(BLK_F,BLU_F+WHT_B);
  6832.             mcolor(YEL_F+RED_B,WHT_F+BLU_B);
  6833.  
  6834.             x = pop_menu(9,27,3,array," Menu ",3);
  6835.             if ( x == 0 )
  6836.                opt1();
  6837.             else if ( x == 1 )
  6838.                opt2();
  6839.             else if ( x == 2 || x == -1 )
  6840.                exit(0);
  6841.            }
  6842.          }
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.                                                         print_screen
  6869.         Summary:
  6870.  
  6871.         int print_screen();
  6872.  
  6873.         Created: 03/10/86        Last Updated: 03/10/86
  6874.  
  6875.         Author: Bob Pritchett         Source (C/A): C
  6876.  
  6877.         Located in: PRINT.OBJ
  6878.  
  6879.         Requires: int86()
  6880.  
  6881.         Description:
  6882.  
  6883.         Performing the exact same feature as if you had hit the PrtSc key 
  6884.         while holding the shift key down,  this routine prints the screen 
  6885.         with the bios interrupt five.
  6886.  
  6887.         Compiler Specifics:
  6888.  
  6889.         None.
  6890.  
  6891.         Return Value:
  6892.  
  6893.         Nothing.
  6894.  
  6895.         See Also:
  6896.  
  6897.  
  6898.  
  6899.         Example:
  6900.  
  6901.         print_screen();
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.                                                               prtrns
  6935.         Summary:
  6936.  
  6937.         int prtrns(c);
  6938.         int c;                   /* Character to translate */
  6939.  
  6940.         Created: 02/22/86        Last Updated: 02/22/86
  6941.  
  6942.         Author: Bob Pritchett         Source (C/A): C
  6943.  
  6944.         Located in: PRTRNS.C PRTRNS.OBJ
  6945.  
  6946.         Requires: Nothing.
  6947.  
  6948.         Description:
  6949.  
  6950.         This function is a simple one that takes c as an argument, and if 
  6951.         it is a special box drawing character form the extended character 
  6952.         set  it is translated into an equivalent in the lower  127  ASCII 
  6953.         range.   Possibly  useful  in writing a screen or text dump  that 
  6954.         originally contained special characters.
  6955.  
  6956.         Compiler Specifics:
  6957.  
  6958.         None.
  6959.  
  6960.         Return Value:
  6961.  
  6962.         Returns the character, translated if neccessary.
  6963.  
  6964.         See Also:
  6965.  
  6966.  
  6967.  
  6968.         Example:
  6969.  
  6970.         #include <stdio.h>
  6971.  
  6972.         int c = 179;
  6973.  
  6974.         c = prtrns(c);           /* Would return |, replacing 179. */
  6975.  
  6976.         putc(c,stdprn);
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.                                                                putat
  7001.         Summary:
  7002.  
  7003.         int putat(x,y,string);
  7004.         int x;                   /* Row to Put At */
  7005.         int y;                   /* Col to Put At */
  7006.         char *string;            /* String to Put */
  7007.  
  7008.         Created: 12/28/85        Last Updated: 12/28/85
  7009.  
  7010.         Author: Bob Pritchett         Source (C/A): C
  7011.  
  7012.         Located in: PUTAT.OBJ
  7013.  
  7014.         Requires: ccputs() putchci()
  7015.  
  7016.         Description:
  7017.  
  7018.         This  function  places the specified string at x,y on the  global 
  7019.         screen.
  7020.  
  7021.         Compiler Specifics:
  7022.  
  7023.         None.
  7024.  
  7025.         Return Value:
  7026.  
  7027.         Nothing.
  7028.  
  7029.         See Also:
  7030.  
  7031.         putatf() wputat() wputatf()
  7032.  
  7033.         Example:
  7034.  
  7035.         putat(10,25,"+ The plus is at 10,25.");
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.                                                               putatf
  7067.         Summary:
  7068.  
  7069.         int putatf(x,y,string,args...);
  7070.         int x;                   /* Row to Put At */
  7071.         int y;                   /* Col to Put At */
  7072.         char *string;            /* Formatted String to Put */
  7073.         args...                  /* Formatting Arguments */
  7074.  
  7075.         Created: 05/01/86        Last Updated: 08/20/86
  7076.  
  7077.         Author: Bob Pritchett         Source (C/A): C
  7078.  
  7079.         Located in: PUTATF.OBJ
  7080.  
  7081.         Requires: ccputs() putchci()
  7082.  
  7083.         Description:
  7084.  
  7085.         This  performs the same function as putat() with the addition  of 
  7086.         up to 15 formatting arguments in the same format as printf().
  7087.  
  7088.         Compiler Specifics:
  7089.  
  7090.         None.
  7091.  
  7092.         Return Value:
  7093.  
  7094.         Nothing.
  7095.  
  7096.         See Also:
  7097.  
  7098.         putat() wputat() wputatf()
  7099.  
  7100.         Example:
  7101.  
  7102.         putatf(10,25,"+ The plus %s at %d,%d.","is",10,25);
  7103.  
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.                                                               putchc
  7133.         Summary:
  7134.  
  7135.         int putchc(c,color);
  7136.         int c;                   /* Character to Print */
  7137.         int color;               /* Attribute to Use */
  7138.  
  7139.         Created: 09/25/86        Last Updated: 09/25/86
  7140.  
  7141.         Author: Bob Pritchett         Source (C/A): A
  7142.  
  7143.         Located in: PUTCHC.OBJ
  7144.  
  7145.         Requires: Nothing.
  7146.  
  7147.         Description:
  7148.  
  7149.         This function simply outputs the character and attribute without 
  7150.         incrementing the cursor.
  7151.  
  7152.         Compiler  Specifics:
  7153.  
  7154.         None. 
  7155.  
  7156.         Return Value:
  7157.  
  7158.         Nothing.
  7159.  
  7160.         See Also:
  7161.  
  7162.         putchci() wputchar()
  7163.  
  7164.         Example:
  7165.  
  7166.         #include <color.h>
  7167.  
  7168.         putchc('C',GRN_F+BLK_B);     /* Put out a C in green. */
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.                                                              putchci
  7199.         Summary:
  7200.  
  7201.         int putchci(c,color);
  7202.         int c;                   /* Character to Print */
  7203.         int color;               /* Attribute to Use */
  7204.  
  7205.         Created: 12/28/85        Last Updated: 09/25/86
  7206.  
  7207.         Author: Bob Pritchett         Source (C/A): A
  7208.  
  7209.         Located in: PUTCHCI.OBJ
  7210.  
  7211.         Requires: Nothing.
  7212.  
  7213.         Description:
  7214.  
  7215.         This simply outputs the character c, using the color in color, to 
  7216.         the video memory, and then increments the cursor.
  7217.  
  7218.         Compiler  Specifics:
  7219.  
  7220.         None. 
  7221.  
  7222.         Return Value:
  7223.  
  7224.         Nothing.
  7225.  
  7226.         See Also:
  7227.  
  7228.         wputchar()
  7229.  
  7230.         Example:
  7231.  
  7232.         #include <color.h>
  7233.  
  7234.         putchci('A',RED_F+BLK_B);     /* Put out an A in red. */
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.                                                             read_tmr
  7265.         Summary:
  7266.  
  7267.         unsigned read_tmr(x);
  7268.         int x;                   /* The Number of the Counter to Use */
  7269.  
  7270.         Created: 01/03/87        Last Updated: 01/03/87
  7271.  
  7272.         Author: Dave Perras           Source (C/A): C
  7273.  
  7274.         Located in: TIMERS.C TIMERS.OBJ
  7275.  
  7276.         Requires: get_timer()
  7277.  
  7278.         Description:
  7279.  
  7280.         This function reads the specified timer and returns, in tenths of 
  7281.         seconds, the difference between the stored time and the current.
  7282.  
  7283.         Compiler Specifics:
  7284.  
  7285.         None.
  7286.  
  7287.         Return Value:
  7288.  
  7289.         An  unsigned value representing the tenths of seconds which  have 
  7290.         elapsed since the start_tmr() function was called for this timer.  
  7291.         If  the specified timer has not been initialized or has not  been 
  7292.         started an error value of zero is returned.
  7293.  
  7294.         See Also:
  7295.  
  7296.         get_timer() start_tmr() stop_tmr() reset_tmr() zero_tmr() timer()
  7297.         init_tmr()
  7298.  
  7299.         Example:
  7300.  
  7301.         init_tmr();              /* Initialize Timers */
  7302.  
  7303.         start_tmr(5);            /* Start timer number 5. */
  7304.  
  7305.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  7306.                   /* The above statement does not stop the timer. */
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.  
  7323.  
  7324.  
  7325.  
  7326.  
  7327.  
  7328.  
  7329.  
  7330.                                                            reset_tmr
  7331.         Summary:
  7332.  
  7333.         void reset_tmr(x);
  7334.         int x;                   /* The Number of the Counter to Use */
  7335.  
  7336.         Created: 01/03/87        Last Updated: 01/03/87
  7337.  
  7338.         Author: Dave Perras           Source (C/A): C
  7339.  
  7340.         Located in: TIMERS.C TIMERS.OBJ
  7341.  
  7342.         Requires: Nothing.
  7343.  
  7344.         Description:
  7345.  
  7346.         This  function  zeros the specified timer and clears  its  active 
  7347.         flag.
  7348.  
  7349.         Compiler Specifics:
  7350.  
  7351.         None.
  7352.  
  7353.         Return Value:
  7354.  
  7355.         Nothing is returned.
  7356.  
  7357.         See Also:
  7358.  
  7359.         get_timer() start_tmr() stop_tmr() read_tmr() zero_tmr() timer()
  7360.         init_tmr()
  7361.  
  7362.         Example:
  7363.  
  7364.         init_tmr();              /* Initialize Timers */
  7365.  
  7366.         start_tmr(5);            /* Start timer number 5. */
  7367.  
  7368.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  7369.                   /* The above statement does not stop the timer. */
  7370.  
  7371.         reset_tmr(5);            /* Stop and reset timer 5. */
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.  
  7392.  
  7393.  
  7394.  
  7395.  
  7396.                                                              restore
  7397.         Summary:
  7398.  
  7399.         int restore(x,y,x2,y2,array);
  7400.         int x;                   /* Upper Left Row */
  7401.         int y;                   /* Upper Left Col */
  7402.         int x2;                  /* Lower Right Row */
  7403.         int y2;                  /* Lower Right Col */
  7404.         char *array;             /* Array to Store Screen In */
  7405.  
  7406.         Created: 03/03/86        Last Updated: 03/03/86
  7407.  
  7408.         Author: Bob Pritchett         Source (C/A): C
  7409.  
  7410.         Located in: COUTPUT.OBJ
  7411.  
  7412.         Requires: Nothing.
  7413.  
  7414.         Description:
  7415.  
  7416.         This function restores the portion of the screen previously saved 
  7417.         by save() in array at the coordinates which are specified,  which 
  7418.         don't have to be the same as those at which it was saved.
  7419.  
  7420.         Compiler  Specifics:
  7421.  
  7422.         The MSC function movedata() was used. 
  7423.  
  7424.         Return Value:
  7425.  
  7426.         Nothing is returned and there are no validity checks.   Giving  a 
  7427.         set of bad coordinates will generate unknown results. 
  7428.  
  7429.         See Also:
  7430.  
  7431.         save() restore_screen()
  7432.  
  7433.         Example:
  7434.  
  7435.         char *temp;
  7436.         temp = malloc(4000);     /* Size of screen and attributes. */
  7437.  
  7438.         save(0,0,24,79,temp);    /* Save whole screen. */
  7439.  
  7440.         restore(0,0,24,79,temp); /* Restore screen. */
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.  
  7455.  
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.  
  7462.                                                       restore_cursor
  7463.         Summary:
  7464.  
  7465.         int restore_cursor();
  7466.  
  7467.         Created: 02/22/86        Last Updated: 02/24/86
  7468.  
  7469.         Author: Bob Pritchett         Source (C/A): C
  7470.  
  7471.         Located in: CURSOR.OBJ
  7472.  
  7473.         Requires: int86()
  7474.  
  7475.         Description:
  7476.  
  7477.         This  function  will return the cursor to the location it was  at 
  7478.         when save_cursor() was called.
  7479.  
  7480.         Compiler Specifics:
  7481.  
  7482.         Problems associated with int86() only.
  7483.  
  7484.         Return Value:
  7485.  
  7486.         Nothing.
  7487.  
  7488.         See Also:
  7489.  
  7490.         save_cursor() restore_screen()
  7491.  
  7492.         Example:
  7493.  
  7494.         save_cursor();
  7495.  
  7496.         restore_cursor();
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.                                                       restore_screen
  7529.         Summary:
  7530.  
  7531.         int restore_screen();
  7532.  
  7533.         Created: 03/09/86        Last Updated: 10/23/86
  7534.  
  7535.         Author: Bob Pritchett         Source (C/A): C
  7536.  
  7537.         Located in: SRSCREEN.OBJ
  7538.  
  7539.         Requires: restore()
  7540.  
  7541.         Description:
  7542.  
  7543.         This  function  restores  the screen  saved  with  save_screen().  
  7544.         Useful  for  restoring  the screen present  when  a  program  was 
  7545.         invoked after it finishes executing.
  7546.  
  7547.         Compiler Specifics:
  7548.  
  7549.         None.
  7550.  
  7551.         Return Value:
  7552.  
  7553.         Nothing.
  7554.  
  7555.         See Also:
  7556.  
  7557.         save_screen() restore_cursor()
  7558.  
  7559.         Example:
  7560.  
  7561.         main()
  7562.          {
  7563.           save_screen();
  7564.  
  7565.           /* Etc... */
  7566.  
  7567.           restore_screen();
  7568.           exit(0);
  7569.          }
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.                                                              retrace
  7595.         Summary:
  7596.  
  7597.         int retrace(x);
  7598.         int x;                   /* Type of Retrace to Test For */
  7599.  
  7600.         Created: 06/06/86        Last Updated: 06/06/86
  7601.  
  7602.         Author: Bob Pritchett         Source (C/A): C
  7603.  
  7604.         Located in: COUTPUT.OBJ
  7605.  
  7606.         Requires: Nothing.
  7607.  
  7608.         Description:
  7609.  
  7610.         This  routine  determines which retrace to move data  into  video 
  7611.         memory under.   The value can be 1,  (FAST) which represents data 
  7612.         movement during the horizontal retrace, or 8, (SLOW) which causes 
  7613.         data  to  be moved during the vertical  retrace.   The  fast/slow 
  7614.         adjectives  have little to do with the data movement due  to  the 
  7615.         number  of screen repaints per second.   The default is  vertical 
  7616.         retrace,  8,  and  the main purpose of this function is to  allow 
  7617.         an alternate method if desirable on some monitors.
  7618.  
  7619.         Compiler Specifics:
  7620.  
  7621.         None.
  7622.  
  7623.         Return Value:
  7624.  
  7625.         Returns -1 if a value other then 1 or 8 is passed.
  7626.  
  7627.         See Also:
  7628.  
  7629.         dma()
  7630.  
  7631.         Example:
  7632.  
  7633.         retrace(8);
  7634.                  /* Change to data movement during vertical retrace. */
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.                                                                 save
  7661.         Summary:
  7662.  
  7663.         int save(x,y,x2,y2,array);
  7664.         int x;                   /* Upper Left Row */
  7665.         int y;                   /* Upper Left Col */
  7666.         int x2;                  /* Lower Right Row */
  7667.         int y2;                  /* Lower Right Col */
  7668.         char *array;             /* Array to Store Screen In */
  7669.  
  7670.         Created: 03/03/86        Last Updated: 03/03/86
  7671.  
  7672.         Author: Bob Pritchett         Source (C/A): C
  7673.  
  7674.         Located in: COUTPUT.OBJ
  7675.  
  7676.         Requires: Nothing.
  7677.  
  7678.         Description:
  7679.  
  7680.         This  function  saves the portion of the screen specified by  the 
  7681.         four coordinates into array.   No other action is taken,  and the 
  7682.         screen is not erased within that area.
  7683.  
  7684.         Compiler  Specifics:
  7685.  
  7686.         The MSC function movedata() was used. 
  7687.  
  7688.         Return Value:
  7689.  
  7690.         Nothing is returned and there are no validity checks.   Giving  a 
  7691.         set of bad coordinates will generate unknown results. 
  7692.  
  7693.         See Also:
  7694.  
  7695.         restore() save_screen()
  7696.  
  7697.         Example:
  7698.  
  7699.         char *temp;
  7700.         temp = malloc(4000);     /* Size of screen and attributes. */
  7701.  
  7702.         save(0,0,24,79,temp);    /* Save whole screen. */
  7703.  
  7704.         restore(0,0,24,79,temp); /* Restore screen. */
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.                                                          save_cursor
  7727.         Summary:
  7728.  
  7729.         int save_cursor();
  7730.  
  7731.         Created: 02/22/86        Last Updated: 02/24/86
  7732.  
  7733.         Author: Bob Pritchett         Source (C/A): C
  7734.  
  7735.         Located in: CURSOR.OBJ
  7736.  
  7737.         Requires: int86()
  7738.  
  7739.         Description:
  7740.  
  7741.         This  funciton  will  save  the current  cursor  position  in  an 
  7742.         internal  variable  for  restoration with restore_cursor()  at  a 
  7743.         later time.
  7744.  
  7745.         Compiler Specifics:
  7746.  
  7747.         int86().
  7748.  
  7749.         Return Value:
  7750.  
  7751.         Nothing.
  7752.  
  7753.         See Also:
  7754.  
  7755.         restore_cursor()
  7756.  
  7757.         Example:
  7758.  
  7759.         save_cursor();           /* Save it here... */
  7760.  
  7761.         printf("This is a string of text...");
  7762.  
  7763.         restore_cursor();        /* To the beginning of the line... */ 
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.                                                          save_screen
  7793.         Summary:
  7794.  
  7795.         int save_screen();
  7796.  
  7797.         Created: 03/09/86        Last Updated: 10/23/86
  7798.  
  7799.         Author: Bob Pritchett         Source (C/A): C
  7800.  
  7801.         Located in: SRSCREEN.OBJ
  7802.  
  7803.         Requires: save()
  7804.  
  7805.         Description:
  7806.  
  7807.         This  function saves the current screen and attributes for  later 
  7808.         restoration with the restore_screen() function.
  7809.  
  7810.         Compiler Specifics:
  7811.  
  7812.         None.
  7813.  
  7814.         Return Value:
  7815.  
  7816.         Nothing.
  7817.  
  7818.         See Also:
  7819.  
  7820.         save_cursor() restore_screen()
  7821.  
  7822.         Example:
  7823.  
  7824.         main()
  7825.          {
  7826.           save_screen();
  7827.  
  7828.           /* Etc... */
  7829.  
  7830.           restore_screen();
  7831.           exit(0);
  7832.          }
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.                                                               scroll
  7859.         Summary:
  7860.  
  7861.         int scroll(x,y,x2,y2,dir,num);
  7862.         int x;                   /* Upper Left Row */
  7863.         int y;                   /* Upper Left Col */
  7864.         int x2;                  /* Lower Right Row */
  7865.         int y2;                  /* Lower Right Col */
  7866.         int dir;                 /* 0 - Up / 1 - Down */
  7867.         int num;                 /* Number of Lines */
  7868.  
  7869.         Created: 03/03/86        Last Updated: 03/03/86
  7870.  
  7871.         Author: Bob Pritchett         Source (C/A): C
  7872.  
  7873.         Located in: COUTPUT.OBJ
  7874.  
  7875.         Requires: int86()
  7876.  
  7877.         Description:
  7878.  
  7879.         This function scrolls the area inside and including the specified 
  7880.         coordinates  in  the  specified  window.   The  number  of  lines 
  7881.         scrolled  is determined by the value of num and setting num to  0 
  7882.         and  the  direction  0,  up,  will  cause  the  window  to  clear 
  7883.         completly.
  7884.  
  7885.         Compiler Specifics:
  7886.  
  7887.         None other then int86() related.
  7888.  
  7889.         Return Value:
  7890.  
  7891.         Nothing.
  7892.  
  7893.         See Also:
  7894.  
  7895.         wscroll()
  7896.  
  7897.         Example:
  7898.  
  7899.         scroll(0,0,24,80,0,0);        /* Clear the whole screen. */
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.                                                             set_date
  7925.         Summary:
  7926.  
  7927.         int set_date(dy,mn,yr);
  7928.         int dy;                  /* Day */
  7929.         int mn;                  /* Month */
  7930.         int yr;                  /* Year */
  7931.  
  7932.         Created: 03/31/86        Last Updated: 03/31/86
  7933.  
  7934.         Author: Bob Pritchett         Source (C/A): C
  7935.  
  7936.         Located in: SET_DATE.OBJ
  7937.  
  7938.         Requires: intdos()
  7939.  
  7940.         Description:
  7941.  
  7942.         Using the DOS interrupts this routine sets the date as  specified 
  7943.         in   the  three  parameters.    For  more  information  see   the 
  7944.         description of get_date();
  7945.  
  7946.         Compiler Specifics:
  7947.  
  7948.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  7949.         unions specified in DOS.H.
  7950.  
  7951.         Return Value:
  7952.  
  7953.         Nothing.
  7954.  
  7955.         See Also:
  7956.  
  7957.         get_dow() get_date() set_time()
  7958.  
  7959.         Example:
  7960.  
  7961.         int d = 4;
  7962.         int m = 7;
  7963.         int y = 1987;
  7964.  
  7965.         set_date(d,m,y);    /* Fourth of July, 1987. */
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.                                                            set_drive
  7991.         Summary:
  7992.  
  7993.         int set_drive(x);
  7994.         int x;                   /* Drive Numer to Set to */
  7995.  
  7996.         Created: 04/06/86        Last Updated: 04/06/86
  7997.  
  7998.         Author: Bob Pritchett         Source (C/A): A
  7999.  
  8000.         Located in: SETDRIVE.OBJ
  8001.  
  8002.         Requires: Nothing.
  8003.  
  8004.         Description:
  8005.  
  8006.         This  function sets the current drive to the number specified  by 
  8007.         x.  For an explanation of numbering conventions, see get_drive().
  8008.  
  8009.         Compiler Specifics:
  8010.  
  8011.         None.
  8012.  
  8013.         Return Value:
  8014.  
  8015.         Nothing.
  8016.  
  8017.         See Also:
  8018.  
  8019.         get_drive() num_drives()
  8020.  
  8021.         Example:
  8022.  
  8023.         if ( num_drives() != 1 ) /* If we have more then 2 logical */
  8024.            set_drive(2);         /* Make the current the first HD, C: */
  8025.         else
  8026.            set_drive(0);         /* Else make it A: */
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.                                                             set_mode
  8057.         Summary:
  8058.  
  8059.         #include <csrmodes.h>    /* For Declarations Only */
  8060.  
  8061.         int set_mode(x);
  8062.         int x;                   /* Video Mode to Set to */
  8063.  
  8064.         Created: 05/03/86        Last Updated: 08/27/86
  8065.  
  8066.         Author: Bob Pritchett         Source (C/A): A
  8067.  
  8068.         Located in: SETMODE.OBJ
  8069.  
  8070.         Requires: Nothing.
  8071.  
  8072.         Description:
  8073.  
  8074.         This function sets the video mode as specified in x.   Please see 
  8075.         CSRMODES.H for a description of these modes.
  8076.  
  8077.         Compiler Specifics:
  8078.  
  8079.         None.
  8080.  
  8081.         Return Value:
  8082.  
  8083.         Nothing.
  8084.  
  8085.         See Also:
  8086.  
  8087.         get_mode()
  8088.  
  8089.         Example:
  8090.  
  8091.         #include <csrmodes.h>
  8092.  
  8093.         set_mode(CO80);          /* 80 Columns - Color */
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.                                                             set_time
  8123.         Summary:
  8124.  
  8125.         int set_time(hr,mn,sc,hn);
  8126.         int hr;                  /* Hour */
  8127.         int mn;                  /* Minutes */
  8128.         int sc;                  /* Seconds */
  8129.         int hn;                  /* Hundredths */
  8130.  
  8131.         Created: 03/31/86        Last Updated: 03/31/86
  8132.  
  8133.         Author: Bob Pritchett         Source (C/A): C
  8134.  
  8135.         Located in: SET_TIME.OBJ
  8136.  
  8137.         Requires: intdos()
  8138.  
  8139.         Description:
  8140.  
  8141.         This routine uses DOS to set the current time as specified.   For 
  8142.         more information see the description of get_time().
  8143.  
  8144.         Compiler Specifics:
  8145.  
  8146.         Compiled  with MSC 3.0,  uses the dosint() function and  register 
  8147.         unions specified in DOS.H.
  8148.  
  8149.         Return Value:
  8150.  
  8151.         Nothing.
  8152.  
  8153.         See Also:
  8154.  
  8155.         get_dow() set_date() get_time()
  8156.  
  8157.         Example:
  8158.  
  8159.         int h = 3;
  8160.         int m = 15;
  8161.         int s = 0;
  8162.         int hn = 0;
  8163.  
  8164.         set_time(h,m,s,hn);       /* Set the time to 3:15am. */
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.  
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.                                                              sn_date
  8189.         Summary:
  8190.  
  8191.         unsigned int sn_date(sn,m,d,y);
  8192.         unsigned int sn;         /* Serial Number to Convert to Date */
  8193.         int *m;                  /* Location to Store Month */
  8194.         int *d;                  /* Location to Store Day */
  8195.         int *y;                  /* Location to Store Year */
  8196.  
  8197.         Created: 09/01/86        Last Updated: 09/01/86
  8198.  
  8199.         Author: Bob Pritchett         Source (C/A): C
  8200.  
  8201.         Located in: CSRDATE.OBJ
  8202.  
  8203.         Requires: isleap()
  8204.  
  8205.         Description:
  8206.  
  8207.         This  routine will turn serial numbers created by date_sn()  into 
  8208.         dates.
  8209.  
  8210.         Compiler Specifics:
  8211.  
  8212.         None.
  8213.  
  8214.         Return Value:
  8215.  
  8216.         Returns  a zero if the serial number is invalid,  else returns  a 
  8217.         one.
  8218.  
  8219.         See Also:
  8220.  
  8221.         date_sn() valid_date() isleap() dt_diff()
  8222.  
  8223.         Example:
  8224.  
  8225.         int m;
  8226.         int d;
  8227.         int y;
  8228.         int sn;
  8229.  
  8230.         sn = date_sn(12,25,86);       /* Convert to serial number. */
  8231.  
  8232.         /* . . . Modify/Manipulate Serial Number . . . */
  8233.  
  8234.         sn_date(sn,&m,&d,&y);         /* Convert back to date. */
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.                                                                sound
  8255.         Summary:
  8256.  
  8257.         #include <csrsound.h>    /* Only for Note Definitions */
  8258.  
  8259.         int sound(tone,duration);
  8260.         int tone;                /* Frequency in Hertz */
  8261.         int duration;            /* Length in Milliseconds */
  8262.  
  8263.         Created: 05/12/86        Last Updated: 05/12/86
  8264.  
  8265.         Author: Bob Pritchett         Source (C/A): C
  8266.  
  8267.         Located in: CSRSOUND.OBJ
  8268.  
  8269.         Requires: Nothing.
  8270.  
  8271.         Description:
  8272.  
  8273.         This routine will sound the specified frequency for the length of 
  8274.         time,  in milliseconds, specified in duration.  The function does 
  8275.         not return until the sound has completed playing.
  8276.  
  8277.         Compiler Specifics:
  8278.  
  8279.         None.
  8280.  
  8281.         Return Value:
  8282.  
  8283.         Nothing.
  8284.  
  8285.         See Also:
  8286.  
  8287.  
  8288.  
  8289.         Example:
  8290.  
  8291.         #include <csrsound.h>
  8292.  
  8293.         sound(C,500);
  8294.         sound(D,250);
  8295.         sound(E,125);
  8296.  
  8297.  
  8298.  
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.                                                              soundex
  8321.         Summary:
  8322.  
  8323.         int soundex(name,code);
  8324.         char *name;              /* Name to Process */
  8325.         char *code;              /* String to Hold Code */
  8326.  
  8327.         Created: 00/00/00        Last Updated: 06/08/86
  8328.  
  8329.         Author: David Lovelock        Source (C/A): C
  8330.  
  8331.         Located in: SOUNDEX.OBJ
  8332.  
  8333.         Requires: Nothing.
  8334.  
  8335.         Description:
  8336.  
  8337.         This  routine  will,  for any given name,  return  a  code  value 
  8338.         representing it.   This code value will be the same as values for 
  8339.         similar sounding names.  The code consists of the first letter of 
  8340.         the name, followed by three digits and a NULL.  
  8341.  
  8342.         Compiler Specifics:
  8343.  
  8344.         None.
  8345.  
  8346.         Return Value:
  8347.  
  8348.         Nothing.
  8349.  
  8350.         See Also:
  8351.  
  8352.  
  8353.  
  8354.         Example:
  8355.  
  8356.         /* All should return an identical code. */
  8357.  
  8358.         char code[5];
  8359.  
  8360.         soundex("MacHew",code);
  8361.         printf("MacHew: %s.\n",code);
  8362.  
  8363.         soundex("MacKew",code);
  8364.         printf("MacKew: %s.\n",code);
  8365.  
  8366.         soundex("McQue",code);
  8367.         printf("McQue: %s.\n",code);
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.                                                            start_tmr
  8387.         Summary:
  8388.  
  8389.         void start_tmr(x);
  8390.         int x;                   /* The Number of the Counter to Use */
  8391.  
  8392.         Created: 01/03/87        Last Updated: 01/03/87
  8393.  
  8394.         Author: Dave Perras           Source (C/A): C
  8395.  
  8396.         Located in: TIMERS.C TIMERS.OBJ
  8397.  
  8398.         Requires: get_timer()
  8399.  
  8400.         Description:
  8401.  
  8402.         This  function  will begin tracking the elapsed  time  using  the 
  8403.         timer  number  given.   This is done by reading and  storing  the 
  8404.         value of the real time clock.
  8405.  
  8406.         Compiler Specifics:
  8407.  
  8408.         None.
  8409.  
  8410.         Return Value:
  8411.  
  8412.         Nothing is returned.
  8413.  
  8414.         See Also:
  8415.  
  8416.         get_timer() stop_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  8417.         init_tmr()
  8418.  
  8419.         Example:
  8420.  
  8421.         init_tmr();              /* Initialize Timers */
  8422.  
  8423.         start_tmr(2);            /* Start timer number 2. */
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.                                                             stop_tmr
  8453.         Summary:
  8454.  
  8455.         unsigned stop_tmr(x);
  8456.         int x;                   /* The Number of the Counter to Use */
  8457.  
  8458.         Created: 01/03/87        Last Updated: 01/03/87
  8459.  
  8460.         Author: Dave Perras           Source (C/A): C
  8461.  
  8462.         Located in: TIMERS.C TIMERS.OBJ
  8463.  
  8464.         Requires: get_timer()
  8465.  
  8466.         Description:
  8467.  
  8468.         This  function  will first read the current setting of  the  real 
  8469.         time clock, determine the difference in tenths of seconds between 
  8470.         the  stored and current time,  and then zero the specified  timer 
  8471.         and reset its active flag.
  8472.  
  8473.         Compiler Specifics:
  8474.  
  8475.         None.
  8476.  
  8477.         Return Value:
  8478.  
  8479.         An  unsigned value representing the tenths of seconds which  have 
  8480.         elapsed since the start_tmr() function was called for this timer.  
  8481.         The  maximum  interval  over  which  the  timer  is  accurate  is 
  8482.         determined  by  the  size of an  unsigned  int,  which  for  most 
  8483.         compilers results in an approximate limit of 1.8 hours.
  8484.  
  8485.         See Also:
  8486.  
  8487.         get_timer() start_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  8488.         init_tmr()
  8489.  
  8490.         Example:
  8491.  
  8492.         init_tmr();              /* Initialize Timers */
  8493.  
  8494.         start_tmr(5);            /* Start timer number 5. */
  8495.  
  8496.         printf("%d seconds have elapsed.\n",10 * stop_tmr(5));
  8497.  
  8498.  
  8499.  
  8500.  
  8501.  
  8502.  
  8503.  
  8504.  
  8505.  
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.                                                               strcen
  8519.         Summary:
  8520.  
  8521.         strcen(string,result,width);
  8522.         char *string;            /* String to Center */
  8523.         char *result;            /* Where to Put It */
  8524.         int width;               /* Width to Center on */
  8525.  
  8526.         Created: 03/03/86        Last Updated: 09/17/86
  8527.  
  8528.         Author: Bob Pritchett         Source (C/A): C
  8529.  
  8530.         Located in: STRCEN.OBJ
  8531.  
  8532.         Requires: strtrm()
  8533.  
  8534.         Description:
  8535.  
  8536.         This  routine  places  string into result  with  the  appropriate 
  8537.         amount  of preceding and trailing spaces.   The length of  result 
  8538.         will  be width.   Note that the string is trimmed (See strcen().) 
  8539.         before  it is centered,  and that an uneven number of  spaces  on 
  8540.         each side results in the extra space being tagged to the end.
  8541.  
  8542.         Compiler Specifics:
  8543.  
  8544.         None.
  8545.  
  8546.         Return Value:
  8547.  
  8548.         Nothing.
  8549.  
  8550.         See Also:
  8551.  
  8552.         strtrm() strlft() strght() center()
  8553.  
  8554.         Example:
  8555.  
  8556.         char temp[25];
  8557.  
  8558.         strcen("  Centered   ",temp,20);
  8559.         printf("Centered String:\n 12345678901234567890\n>%s<\n",temp);
  8560.  
  8561.         /*  Results in  >      Centered      <  */
  8562.  
  8563.  
  8564.  
  8565.  
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.                                                               strght
  8585.         Summary:
  8586.  
  8587.         strght(string,result,width);
  8588.         char *string;            /* String to Right Justify */
  8589.         char *result;            /* Where to Put It */
  8590.         int width;               /* Width to Justify in */
  8591.  
  8592.         Created: 09/07/86        Last Updated: 09/17/86
  8593.  
  8594.         Author: Bob Pritchett         Source (C/A): C
  8595.  
  8596.         Located in: STRGHT.OBJ
  8597.  
  8598.         Requires: strtrm()
  8599.  
  8600.         Description:
  8601.  
  8602.         This  routine  will right justify the given string,  placing  the 
  8603.         result  in the specified variable.   The string will  be  trimmed 
  8604.         with strtrm() before the justification.
  8605.  
  8606.         Compiler Specifics:
  8607.  
  8608.         None.
  8609.  
  8610.         Return Value:
  8611.  
  8612.         Nothing.
  8613.  
  8614.         See Also:
  8615.  
  8616.         strcen() strlft() strtrm()
  8617.  
  8618.         Example:
  8619.  
  8620.         char temp[25];
  8621.  
  8622.         strght("  Right Just.   ",temp,20);
  8623.         printf("Justified String:\n 12345678901234567890\n>%s<\n",temp);
  8624.  
  8625.         /*  Results in  >         Right Just.<  */
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.                                                               strlft
  8651.         Summary:
  8652.  
  8653.         strlft(string,result,width);
  8654.         char *string;            /* String to Left Justify */
  8655.         char *result;            /* Where to Put It */
  8656.         int width;               /* Width to Justify in */
  8657.  
  8658.         Created: 09/07/86        Last Updated: 09/17/86
  8659.  
  8660.         Author: Bob Pritchett         Source (C/A): C
  8661.  
  8662.         Located in: STRLFT.OBJ
  8663.  
  8664.         Requires: strtrm()
  8665.  
  8666.         Description:
  8667.  
  8668.         This  routine  will left justify the given  string,  placing  the 
  8669.         result  in  the specified variable.   The string will be  trimmed 
  8670.         with strtrm() before the justification.
  8671.  
  8672.         Compiler Specifics:
  8673.  
  8674.         None.
  8675.  
  8676.         Return Value:
  8677.  
  8678.         Nothing.
  8679.  
  8680.         See Also:
  8681.  
  8682.         strcen() strght() strtrm()
  8683.  
  8684.         Example:
  8685.  
  8686.         char temp[25];
  8687.  
  8688.         strght("  Left Just.   ",temp,20);
  8689.         printf("Justified String:\n 12345678901234567890\n>%s<\n",temp);
  8690.  
  8691.         /*  Results in  >Left Just.          <  */
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.                                                               strtrm
  8717.         Summary:
  8718.  
  8719.         strtrm(string,result);
  8720.         char *string;            /* String to Trim */
  8721.         char *result;            /* Where to Put It */
  8722.  
  8723.         Created: 09/07/86        Last Updated: 09/17/86
  8724.  
  8725.         Author: Bob Pritchett         Source (C/A): C
  8726.  
  8727.         Located in: STRTRM.OBJ
  8728.  
  8729.         Requires: Nothing.
  8730.  
  8731.         Description:
  8732.  
  8733.         This  routine  trims  all preceding and trailing  spaces  from  a 
  8734.         string, while preserving spaces inside the string.
  8735.  
  8736.         Compiler Specifics:
  8737.  
  8738.         None.
  8739.  
  8740.         Return Value:
  8741.  
  8742.         The length of the new string.
  8743.  
  8744.         See Also:
  8745.  
  8746.         strcen() strght() strlft()
  8747.  
  8748.         Example:
  8749.  
  8750.         char temp[25];
  8751.  
  8752.         strtrm("  Trim This.   ",temp);
  8753.         printf("Trimmed String:\n>%s<\n",temp);
  8754.  
  8755.         /*  Results in  >Trim This.<  */
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.  
  8765.  
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.                                                                timer
  8783.         Summary:
  8784.  
  8785.         int timer();
  8786.  
  8787.         Created: 04/14/86        Last Updated: 04/14/86
  8788.  
  8789.         Author: Unknown               Source (C/A): C
  8790.  
  8791.         Located in: TIMER.OBJ
  8792.  
  8793.         Requires: int86()
  8794.  
  8795.         Description:
  8796.  
  8797.         This  routine  will return an integer representing the number  of 
  8798.         clock ticks since the last call.   Remember that there are  about 
  8799.         18.2 ticks per second.
  8800.  
  8801.         Compiler Specifics:
  8802.  
  8803.         None.
  8804.  
  8805.         Return Value:
  8806.  
  8807.         The number of ticks since last call.
  8808.  
  8809.         See Also:
  8810.  
  8811.  
  8812.  
  8813.         Example:
  8814.  
  8815.         timer();            /* Start count... */
  8816.         routine();
  8817.         printf("routine() took %d ticks to execute.\n",timer());
  8818.  
  8819.  
  8820.  
  8821.  
  8822.  
  8823.  
  8824.  
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.                                                           valid_date
  8849.         Summary:
  8850.  
  8851.         int valid_date(m,d,y);
  8852.         int m;                   /* Month to Check */
  8853.         int d;                   /* Day to Check */
  8854.         int y;                   /* Year to Check */
  8855.  
  8856.         Created: 09/01/86        Last Updated: 09/01/86
  8857.  
  8858.         Author: George Roukas         Source (C/A): C
  8859.  
  8860.         Located in: CSRDATE.OBJ
  8861.  
  8862.         Requires: isleap()
  8863.  
  8864.         Description:
  8865.  
  8866.         This function performs in a manner similar to that of  chk_date() 
  8867.         with the exception that it verifies that the year is between 1900 
  8868.         and 2050, in order to be compatible with date_sn() and sn_date().
  8869.  
  8870.         Compiler Specifics:
  8871.  
  8872.         None.
  8873.  
  8874.         Return Value:
  8875.  
  8876.         Evaluates as true if the date is valid, false if it is not.
  8877.  
  8878.         See Also:
  8879.  
  8880.         chk_date() date_sn() sn_date() isleap()
  8881.  
  8882.         Example:
  8883.  
  8884.         if ( valid_date(6,15,1791) )       /* Evaluates as False */
  8885.            function();
  8886.  
  8887.         if ( valid_date(6,15,1971) )       /* Evaluates as True */
  8888.            otherwise();
  8889.  
  8890.  
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.  
  8909.  
  8910.  
  8911.  
  8912.  
  8913.  
  8914.                                                               vidblt
  8915.         Summary:
  8916.  
  8917.         vidblt(ss,so,ds,do,x);
  8918.         int ss;                  /* Segment Address of Source */
  8919.         int so;                  /* Segment Offset of Source */
  8920.         int ds;                  /* Segment Address of Destination */
  8921.         int do;                  /* Segment Offset of Destination */
  8922.         int x;                   /* Number of Bytes to Move */
  8923.  
  8924.         Created: 00/00/85        Last Updated: 00/00/85
  8925.  
  8926.         Author: Philip A. Mongelluzzo Source (C/A): A
  8927.  
  8928.         Located in: SNOWLESS.OBJ
  8929.  
  8930.         Requires: Uses _csrbit in COUTPUT.OBJ to determine retrace mode.
  8931.  
  8932.         Description:
  8933.  
  8934.         This  routine is similar to Microsoft's movedata() except that it 
  8935.         is  used for moving data (with the same parameters) to  and  from 
  8936.         the color monitor memory without causing snow or flicker.
  8937.  
  8938.         Compiler Specifics:
  8939.  
  8940.         Uses Microsoft's assembly header and footer.
  8941.  
  8942.         Return Value:
  8943.  
  8944.         No return value.
  8945.  
  8946.         See Also:
  8947.  
  8948.  
  8949.  
  8950.         Example:
  8951.  
  8952.         /* Contact Bob Pritchett if you need to use it independantly. */
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.                                                            wactivate
  8981.         Summary:
  8982.  
  8983.         int wactivate(wind);
  8984.         int wind;                /* Pointer to Window to Activate */
  8985.  
  8986.         Created: 03/03/86        Last Updated: 03/09/86
  8987.  
  8988.         Author: Bob Pritchett         Source (C/A): C
  8989.  
  8990.         Located in: COUTPUT.OBJ
  8991.  
  8992.         Requires: Nothing.
  8993.  
  8994.         Description:
  8995.  
  8996.         This  function activates the specified window.   If the window is 
  8997.         overlayed  by  other windows it is brought out  from  behind  and 
  8998.         becomes the active window, on top of the other and uncovered.
  8999.  
  9000.         Compiler Specifics:
  9001.  
  9002.         Compiled with MSC.  See window notes.
  9003.  
  9004.         Return Value:
  9005.  
  9006.         Nothing.
  9007.  
  9008.         See Also:
  9009.  
  9010.         wclose() wopen()
  9011.  
  9012.         Example:
  9013.  
  9014.         wactivate(w3);                /* Activate an opened window */
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.  
  9027.  
  9028.  
  9029.  
  9030.  
  9031.  
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.                                                               wblank
  9047.         Summary:
  9048.  
  9049.         int wblank(wind,row);
  9050.         int wind;                /* Pointer to Window to Use */
  9051.         int row;                 /* Row to Clear */
  9052.  
  9053.         Created: 04/30/86        Last Updated: 04/30/86
  9054.  
  9055.         Author: Bob Pritchett         Source (C/A): C
  9056.  
  9057.         Located in: COUTPUT.OBJ
  9058.  
  9059.         Requires: Nothing.
  9060.  
  9061.         Description:
  9062.  
  9063.         This  function will erase the specified row within the  specified 
  9064.         window by deleting then inserting that row.   The cursor is place 
  9065.         at column 0 in this row.
  9066.  
  9067.         Compiler Specifics:
  9068.  
  9069.         Compiled with MSC.  See window notes.
  9070.  
  9071.         Return Value:
  9072.  
  9073.         Nothing.
  9074.  
  9075.         See Also:
  9076.  
  9077.         winsert() wdelete()
  9078.  
  9079.         Example:
  9080.  
  9081.         wblank(win,3);
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.  
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.                                                              wborder
  9113.         Summary:
  9114.  
  9115.         int wborder(num,type);
  9116.         int num;                 /* Number of Window to Use */
  9117.         int type;                /* Type of Window Border to Use */
  9118.  
  9119.         Created: 04/25/86        Last Updated: 04/25/86
  9120.  
  9121.         Author: Bob Pritchett         Source (C/A): C
  9122.  
  9123.         Located in: COUTPUT.OBJ
  9124.  
  9125.         Requires: Nothing.
  9126.  
  9127.         Description:
  9128.  
  9129.         This function redraws the border of a window, using whatever type 
  9130.         is  specified,  and the colors stored for this window.   The most 
  9131.         useful  purpose is to 'erase' wtitle() and  wmessage()  messages, 
  9132.         and to change the style of the border.
  9133.  
  9134.         Compiler Specifics:
  9135.  
  9136.         Compiled with MSC.  See window notes.
  9137.  
  9138.         Return Value:
  9139.  
  9140.         Nothing.
  9141.  
  9142.         See Also:
  9143.  
  9144.         wcolor()
  9145.  
  9146.         Example:
  9147.  
  9148.         wborder(win,4);
  9149.  
  9150.  
  9151.  
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.                                                              wcenter
  9179.         Summary:
  9180.  
  9181.         int wcenter(win,x,str);
  9182.         int win;                 /* Window to Use */
  9183.         int x;                   /* Line to Center on */
  9184.         char *str;               /* String to Center */
  9185.  
  9186.         Created: 03/03/86        Last Updated: 03/03/86
  9187.  
  9188.         Author: Bob Pritchett         Source (C/A): C
  9189.  
  9190.         Located in: WCENTER.OBJ
  9191.  
  9192.         Requires: wgotoxy() wprint()
  9193.  
  9194.         Description:
  9195.  
  9196.         This  routine is functionally the same as center() except that  x 
  9197.         is a line within the specified window, and the string is centered 
  9198.         in window coordinates,  not global.  The window's inside color is 
  9199.         used.
  9200.  
  9201.         Compiler Specifics:
  9202.  
  9203.         None.
  9204.  
  9205.         Return Value:
  9206.  
  9207.         Nothing.
  9208.  
  9209.         See Also:
  9210.  
  9211.         wcenterf() center()
  9212.  
  9213.         Example:
  9214.  
  9215.         wcenter(w3,5,"This is centered in window 3.");
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.  
  9223.  
  9224.  
  9225.  
  9226.  
  9227.  
  9228.  
  9229.  
  9230.  
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.                                                             wcenterf
  9245.         Summary:
  9246.  
  9247.         int wcenterf(win,x,str[,arguments...]);
  9248.         int win;                 /* Window to Use */
  9249.         int x;                   /* Line to Center on */
  9250.         char *str;               /* String to Center */
  9251.  
  9252.         Created: 04/13/86        Last Updated: 08/17/86
  9253.  
  9254.         Author: Bob Pritchett         Source (C/A): C
  9255.  
  9256.         Located in: WCENTERF.OBJ
  9257.  
  9258.         Requires: wgotoxy() wprint()
  9259.  
  9260.         Description:
  9261.  
  9262.         Just like centerf() only in the specified window.
  9263.  
  9264.         Compiler Specifics:
  9265.  
  9266.         None.
  9267.  
  9268.         Return Value:
  9269.  
  9270.         Nothing.
  9271.  
  9272.         See Also:
  9273.  
  9274.         center() centerf() wcenter()
  9275.  
  9276.         Example:
  9277.  
  9278.         wcenterf(w3,5,"This is %s in window 3.","centered");
  9279.  
  9280.  
  9281.  
  9282.  
  9283.  
  9284.  
  9285.  
  9286.  
  9287.  
  9288.  
  9289.  
  9290.  
  9291.  
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.                                                               wclose
  9311.         Summary:
  9312.  
  9313.         int wclose(wind);
  9314.         int wind;                /* Pointer to Window to Close */
  9315.  
  9316.         Created: 03/03/86        Last Updated: 03/09/86
  9317.  
  9318.         Author: Bob Pritchett         Source (C/A): C
  9319.  
  9320.         Located in: COUTPUT.OBJ
  9321.  
  9322.         Requires: Nothing.
  9323.  
  9324.         Description:
  9325.  
  9326.         This  function  closes  a  video window  previously  opened  with 
  9327.         wopen().   The  portion of the screen that was covered with   the 
  9328.         window is restored.  NOTE:  You may close a window other then the 
  9329.         active one, it will be acitivated and properly closed.
  9330.  
  9331.         Compiler Specifics:
  9332.  
  9333.         Compiled with MSC.  See window notes.
  9334.  
  9335.         Return Value:
  9336.  
  9337.         Nothing.
  9338.  
  9339.         See Also:
  9340.  
  9341.         wcloseall() wopen() wactivate()
  9342.  
  9343.         Example:
  9344.  
  9345.         int w;
  9346.  
  9347.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  9348.  
  9349.         wclose(w);                    /* Restore covered screen area */
  9350.  
  9351.  
  9352.  
  9353.  
  9354.  
  9355.  
  9356.  
  9357.  
  9358.  
  9359.  
  9360.  
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.                                                            wcloseall
  9377.         Summary:
  9378.  
  9379.         int wcloseall();
  9380.  
  9381.         Created: 03/03/86        Last Updated: 03/09/86
  9382.  
  9383.         Author: Bob Pritchett         Source (C/A): C
  9384.  
  9385.         Located in: COUTPUT.OBJ
  9386.  
  9387.         Requires: Nothing.
  9388.  
  9389.         Description:
  9390.  
  9391.         This  function closes all the open windows by repeatedly  calling 
  9392.         wclose().   The active window is closed first,  and so on all the 
  9393.         way down the stack.
  9394.  
  9395.         Compiler Specifics:
  9396.  
  9397.         Compiled with MSC.  See window notes.
  9398.  
  9399.         Return Value:
  9400.  
  9401.         Nothing.
  9402.  
  9403.         See Also:
  9404.  
  9405.         wclose() wopen() wactivate()
  9406.  
  9407.         Example:
  9408.  
  9409.         int w;
  9410.         int w2;
  9411.  
  9412.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  9413.         w2 = wopen(5,5,17,54,3);
  9414.  
  9415.         wcloseall();                  /* Restore covered screen area */
  9416.  
  9417.  
  9418.  
  9419.  
  9420.  
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.  
  9440.  
  9441.  
  9442.                                                                 wcls
  9443.         Summary:
  9444.  
  9445.         int wcls(num);
  9446.  
  9447.         Created: 03/03/86        Last Updated: 03/09/86
  9448.  
  9449.         Author: Bob Pritchett         Source (C/A): C
  9450.  
  9451.         Located in: COUTPUT.OBJ
  9452.  
  9453.         Requires: Nothing.
  9454.  
  9455.         Description:
  9456.  
  9457.         This  routine  will clear the specified window with it's  current 
  9458.         interior  attributes.   If  not active the  cleared  window  will 
  9459.         become the foremost window.
  9460.  
  9461.         Compiler Specifics:
  9462.  
  9463.         Compiled with MSC.  See window notes.
  9464.  
  9465.         Return Value:
  9466.  
  9467.         Nothing.
  9468.  
  9469.         See Also:
  9470.  
  9471.         cls() ccls()
  9472.  
  9473.         Example:
  9474.  
  9475.         wcls(win);          /* Clear window win. */
  9476.  
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.  
  9499.  
  9500.  
  9501.  
  9502.  
  9503.  
  9504.  
  9505.  
  9506.  
  9507.  
  9508.                                                                 wcol
  9509.         Summary:
  9510.  
  9511.         int wcol(wind);
  9512.         int wind;                /* Pointer to Window to Use */
  9513.  
  9514.         Created: 03/03/86        Last Updated: 03/09/86
  9515.  
  9516.         Author: Bob Pritchett         Source (C/A): C
  9517.  
  9518.         Located in: COUTPUT.OBJ
  9519.  
  9520.         Requires: Nothing.
  9521.  
  9522.         Description:
  9523.  
  9524.         This  function returns the number of the highest col in a window.  
  9525.         If a window has siz columns,  numbered zero to five,  wcol() will 
  9526.         return a five.  Mostly an internal routine.
  9527.  
  9528.         Compiler Specifics:
  9529.  
  9530.         Compiled with MSC.  See window notes.
  9531.  
  9532.         Return Value:
  9533.  
  9534.         Nothing.
  9535.  
  9536.         See Also:
  9537.  
  9538.         wrow()
  9539.  
  9540.         Example:
  9541.  
  9542.         x = wcol(w3);            /* Returns the number of highest row */
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.  
  9558.  
  9559.  
  9560.  
  9561.  
  9562.  
  9563.  
  9564.  
  9565.  
  9566.  
  9567.  
  9568.  
  9569.  
  9570.  
  9571.  
  9572.  
  9573.  
  9574.                                                               wcolor
  9575.         Summary:
  9576.  
  9577.         int wcolor(insd,bord);
  9578.         int insd;                /* Color For Window Interior */
  9579.         int bord;                /* Color For Window Border */
  9580.  
  9581.         Created: 03/03/86        Last Updated: 03/09/86
  9582.  
  9583.         Author: Bob Pritchett         Source (C/A): C
  9584.  
  9585.         Located in: COUTPUT.OBJ
  9586.  
  9587.         Requires: Nothing.
  9588.  
  9589.         Description:
  9590.  
  9591.         This  routine sets the current colors for the inside and  outside 
  9592.         of  windows.   These  are  the  defaults used when  a  window  is 
  9593.         created.   The difference between color() and wcolor()  primarily 
  9594.         is that color has two arguments,  the fore and background colors, 
  9595.         and  wcolor  makes you add the fore and back into one number  for 
  9596.         both the inside and border colors.   Also,  the color()  function 
  9597.         sets  both  border and inside attributes to be  the  same,  while 
  9598.         wcolor() allows them to be set to different values.
  9599.  
  9600.         Compiler Specifics:
  9601.  
  9602.         Compiled with MSC.  See window notes.
  9603.  
  9604.         Return Value:
  9605.  
  9606.         Nothing.
  9607.  
  9608.         See Also:
  9609.  
  9610.         color()
  9611.  
  9612.         Example:
  9613.  
  9614.         wcolor(WHT_F+BLU_B,BLU_F+WHT_F); 
  9615.              /* Inside is white on blue, border is blue on white. */
  9616.  
  9617.  
  9618.  
  9619.  
  9620.  
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.  
  9633.  
  9634.  
  9635.  
  9636.  
  9637.  
  9638.  
  9639.  
  9640.                                                              wdelete
  9641.         Summary:
  9642.  
  9643.         int wdelete(num,row,tms)
  9644.         int num;                 /* Pointer to Window to Use */
  9645.         int row;                 /* Row to Delete Line Before */
  9646.         int tms;                 /* Number of Lines to Delete */
  9647.  
  9648.         Created: 04/30/86        Last Updated: 04/30/86
  9649.  
  9650.         Author: Bob Pritchett         Source (C/A): C
  9651.  
  9652.         Located in: COUTPUT.OBJ
  9653.  
  9654.         Requires: Nothing.
  9655.  
  9656.         Description:
  9657.  
  9658.         This  routine deletes tms lines starting with the line number  in 
  9659.         row, and moves all lower lines up, making blanks at the bottom of 
  9660.         the window.
  9661.  
  9662.         Compiler Specifics:
  9663.  
  9664.         Compiled with MSC.  See window notes.
  9665.  
  9666.         Return Value:
  9667.  
  9668.         Nothing.
  9669.  
  9670.         See Also:
  9671.  
  9672.         winsert() wblank()
  9673.  
  9674.         Example:
  9675.  
  9676.         wdelete(win,2,4);   /* Delete 4 line starting with line 2,
  9677.                                so line 6 becomes line 2 etc. */
  9678.  
  9679.  
  9680.  
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.  
  9695.  
  9696.  
  9697.  
  9698.  
  9699.  
  9700.  
  9701.  
  9702.  
  9703.  
  9704.  
  9705.  
  9706.                                                               wfchar
  9707.         Summary:
  9708.  
  9709.         int wfchar(chr);
  9710.         int chr;                 /* Character to Use in Fields */
  9711.  
  9712.         Created: 10/19/86        Last Updated: 10/19/86
  9713.  
  9714.         Author: Bob Pritchett         Source (C/A): C
  9715.  
  9716.         Located in: WFINPUT.OBJ
  9717.  
  9718.         Requires: Nothing.
  9719.  
  9720.         Description:
  9721.  
  9722.         Behaving  in a manner almost identical to that of  fchar(),  this 
  9723.         function  will  set  the background character  for  window  field 
  9724.         input,  or,  given an argument of -1, return the current value in 
  9725.         use.   Note  that  this value is independant of the one  used  by 
  9726.         fchar(),  although  they both use the same default of  the  space 
  9727.         character.
  9728.  
  9729.         Compiler Specifics:
  9730.  
  9731.         None.
  9732.  
  9733.         Return Value:
  9734.  
  9735.         Returns  the argument,  or in the case of the argument being  -1, 
  9736.         the current value of the window field background character.
  9737.  
  9738.         See Also:
  9739.  
  9740.         fchar() wfcolor() wffill() finptint() finptstr()
  9741.  
  9742.         Example:
  9743.  
  9744.         int w;
  9745.  
  9746.         wfchar('*');              /* Set background to *'s. */
  9747.  
  9748.         w = wopen(10,0,20,79,3);
  9749.  
  9750.         wprintf(w,"The current background character is: %c.\n"
  9751.                 ,wfchar(-1));
  9752.  
  9753.  
  9754.  
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.  
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.                                                              wfcolor
  9773.         Summary:
  9774.  
  9775.         #include <color.h>       /* For Color Defintions Only */
  9776.  
  9777.         int wfcolor(clr);
  9778.         int clr;                 /* Color to Use in Window Fields */
  9779.  
  9780.         Created: 10/19/86        Last Updated: 10/19/86
  9781.  
  9782.         Author: Bob Pritchett         Source (C/A): C
  9783.  
  9784.         Located in: WFINPUT.OBJ
  9785.  
  9786.         Requires: Nothing.
  9787.  
  9788.         Description:
  9789.  
  9790.         Behaving as does fcolor(), wfcolor() will set the field color for 
  9791.         window  field input routines.   This value is independant of  the 
  9792.         one used by normal field routines,  and the current value will be 
  9793.         returned if the argument is -1.
  9794.  
  9795.         Compiler Specifics:
  9796.  
  9797.         None.
  9798.  
  9799.         Return Value:
  9800.  
  9801.         Returns  the argument,  or in the case of the argument being  -1, 
  9802.         the current value of the window field color.
  9803.  
  9804.         See Also:
  9805.  
  9806.         fcolor() wfchar() wffill() wfinptint() wfinptstr()
  9807.  
  9808.         Example:
  9809.  
  9810.         #include <color.h>
  9811.  
  9812.         wfcolor(BLU_F+WHT_B);               /* Blue on white. */
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.                                                               wffill
  9839.         Summary:
  9840.  
  9841.         int wffill(w,rw,cl,mx);
  9842.         int w;                   /* Window in Which to Draw Field */
  9843.         int rw;                  /* Row of Field (Within Window) */
  9844.         int cl;                  /* Column of Field (Within Window) */
  9845.         int mx;                  /* Length of Field */
  9846.  
  9847.         Created: 12/05/86        Last Updated: 12/05/86
  9848.  
  9849.         Author: Bob Pritchett         Source (C/A): C
  9850.  
  9851.         Located in: WFINPUT.OBJ
  9852.  
  9853.         Requires: wgotoxy() cfield()
  9854.  
  9855.         Description:
  9856.  
  9857.         This function behaves similarly to ffill(),  under whose  heading 
  9858.         more  information  on  the  purpose of  wffill()  can  be  found.  
  9859.         Simply,  the function uses the current window character and color 
  9860.         values  to  draw  an input field in the specified window  at  the 
  9861.         coordinates  given.   (The row and column values are  within  the 
  9862.         window, not global.)
  9863.  
  9864.         Compiler Specifics:
  9865.  
  9866.         None.
  9867.  
  9868.         Return Value:
  9869.  
  9870.         Nothing is returned.
  9871.  
  9872.         See Also:
  9873.  
  9874.         ffill() wfchar() wfcolor() wfinptint() wfinptstr()
  9875.  
  9876.         Example:
  9877.  
  9878.         int w;
  9879.  
  9880.         w = wopen(5,10,10,70,1);
  9881.  
  9882.         wffill(w,10,20,10);         /* At 10,20 a 10 character field. */
  9883.  
  9884.         wputat(w,5,9,"Chrs: ");     /* A prompt for the next field. */
  9885.         wffill(w,5,15,6);           /* At 5,15 a 6 character field. */
  9886.         wgotoxy(w,5,15);            /* Not needed, as wffill() leaves */
  9887.                                     /* the cursor at the coordinates. */
  9888.         ccputs("abc",fcolor(-1));   /* Put a default value on the */
  9889.                                     /* screen with the field color. */
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.                                                            wfinptint
  9905.         Summary:
  9906.  
  9907.         int wfinptint(w,rw,cl,mx,x);
  9908.         int w;                   /* Window to Use */
  9909.         int rw;                  /* Row of Field */
  9910.         int cl;                  /* Column of Field */
  9911.         int mx;                  /* Length of Field */
  9912.         int *x;                  /* Where to Put Result */
  9913.  
  9914.         Created: 10/19/86        Last Updated: 10/19/86
  9915.  
  9916.         Author: Bob Pritchett         Source (C/A): C
  9917.  
  9918.         Located in: WFINPUT.OBJ
  9919.  
  9920.         Requires: wgotoxy() cfield()
  9921.  
  9922.         Description:
  9923.  
  9924.         This  function  displays the specified field and then  waits  for 
  9925.         input of an integer just as does finptint(),  under whose heading 
  9926.         a complete description can be found.
  9927.  
  9928.         Compiler Specifics:
  9929.  
  9930.         None.
  9931.  
  9932.         Return Value:
  9933.  
  9934.         The integer inputted is returned.
  9935.  
  9936.         See Also:
  9937.  
  9938.         inptint() wfinptintd() finptint() wffill() wfinptstr()
  9939.  
  9940.         Example:
  9941.  
  9942.         int x;
  9943.         int w;
  9944.  
  9945.         w = wopen(2,2,20,78,3);
  9946.  
  9947.         wputat(w,5,10,"Num: ");     /* A prompt for the next field. */
  9948.         wfinptint(w,5,15,6,&x);     /* At 5,15 a 6 character input. */
  9949.  
  9950.         wprintf(w,"\n\n%d was the input.\n",x);
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.                                                           wfinptintd
  9971.         Summary:
  9972.  
  9973.         int wfinptintd(w,rw,cl,mx,x,d);
  9974.         int w;                   /* Window to Use */
  9975.         int rw;                  /* Row of Field */
  9976.         int cl;                  /* Column of Field */
  9977.         int mx;                  /* Length of Field */
  9978.         int *x;                  /* Where to Put Result */
  9979.         int d;                   /* Default Integer */
  9980.  
  9981.         Created: 10/19/86        Last Updated: 10/19/86
  9982.  
  9983.         Author: Bob Pritchett         Source (C/A): C
  9984.  
  9985.         Located in: WFINPUT.OBJ
  9986.  
  9987.         Requires: wgotoxy() cfield()
  9988.  
  9989.         Description:
  9990.  
  9991.         This  function,  which  waits for input in a window  field  after 
  9992.         displaying a default value,  behaves like finptintd(), where more 
  9993.         information can be found on its operation.
  9994.  
  9995.         Compiler Specifics:
  9996.  
  9997.         None.
  9998.  
  9999.         Return Value:
  10000.  
  10001.         The integer inputted is returned,  or,  in the case of a carriage 
  10002.         return, the default.
  10003.  
  10004.         See Also:
  10005.  
  10006.         inptintd() wfinptint() finptintd() wffill() wfinptstr()
  10007.  
  10008.         Example:
  10009.  
  10010.         int x;
  10011.         int w;
  10012.  
  10013.         w = wopen(3,3,22,77,'*');
  10014.  
  10015.         wputat(w,5,10,"Num: ");     /* A prompt for the next field. */
  10016.         wfinptintd(w,5,15,4,&x,37); /* At 5,15 a 4 character input. */
  10017.  
  10018.         if ( x == 37 )
  10019.            wprintf(w,"\n\nThe default, 37, was returned.\n");
  10020.         else 
  10021.            wprintf(w,"\n\n%d was the input.\n",x);
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.  
  10035.  
  10036.                                                           wfinptintr
  10037.         Summary:
  10038.  
  10039.         int wfinptintr(w,rw,cl,mx,x,lw,hg);
  10040.         int w;                   /* Window to Use */
  10041.         int rw;                  /* Row of Field */
  10042.         int cl;                  /* Column of Field */
  10043.         int mx;                  /* Length of Field */
  10044.         int *x;                  /* Where to Put Result */
  10045.         int lw;                  /* Minimum Acceptable Value */
  10046.         int hg;                  /* Maximum Acceptable Value */
  10047.  
  10048.         Created: 10/19/86        Last Updated: 10/19/86
  10049.  
  10050.         Author: Bob Pritchett         Source (C/A): C
  10051.  
  10052.         Located in: WFINPUT.OBJ
  10053.  
  10054.         Requires: wfinptint()
  10055.  
  10056.         Description:
  10057.  
  10058.         This  function,  with the exception that it works within windows, 
  10059.         will  act  like finptintr(),  waiting for an integer  within  its 
  10060.         specified range.  All other input will cause the function to beep 
  10061.         and wait.
  10062.  
  10063.         Compiler Specifics:
  10064.  
  10065.         None.
  10066.  
  10067.         Return Value:
  10068.  
  10069.         The inputted integer, within the range, is returned.
  10070.  
  10071.         See Also:
  10072.  
  10073.         inptintr() wfinptint() finptintr() wffill() wfinptstr()
  10074.         wfinptintrd()
  10075.  
  10076.         Example:
  10077.  
  10078.         int x;
  10079.         int w;
  10080.  
  10081.         w = wopen(1,1,23,78,'#');
  10082.  
  10083.         wputat(w,5,10,"Num: ");      /* A prompt for the next field. */
  10084.         wfinptintr(w,5,15,4,&x,3,10);/* At 5,15 a 4 character input */
  10085.                                      /* greater than 2 and less than */
  10086.                                      /* ten. */
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.  
  10093.  
  10094.  
  10095.  
  10096.  
  10097.  
  10098.  
  10099.  
  10100.  
  10101.  
  10102.                                                          wfinptintrd
  10103.         Summary:
  10104.  
  10105.         int wfinptintrd(w,rw,cl,mx,x,lw,hg,d);
  10106.         int w;                   /* Window to Use */
  10107.         int rw;                  /* Row of Field */
  10108.         int cl;                  /* Column of Field */
  10109.         int mx;                  /* Length of Field */
  10110.         int *x;                  /* Where to Put Result */
  10111.         int lw;                  /* Minimum Acceptable Value */
  10112.         int hg;                  /* Maximum Acceptable Value */
  10113.         int d;                   /* Default Value */
  10114.  
  10115.         Created: 10/19/86        Last Updated: 10/19/86
  10116.  
  10117.         Author: Bob Pritchett         Source (C/A): C
  10118.  
  10119.         Located in: WFINPUT.OBJ
  10120.  
  10121.         Requires: wfinptintd()
  10122.  
  10123.         Description:
  10124.  
  10125.         This  function  behaves as does  finptintrd(),  only  within  the 
  10126.         specified  window.   Remember that the function makes no check to 
  10127.         see  if the default is within the specified range,  and if it  is 
  10128.         not it will not be returnable.
  10129.  
  10130.         Compiler Specifics:
  10131.  
  10132.         None.
  10133.  
  10134.         Return Value:
  10135.  
  10136.         The inputted integer,  within the range,  is returned, or, in the 
  10137.         case  of a carriage return as the first inputted  character,  the 
  10138.         default value.
  10139.  
  10140.         See Also:
  10141.  
  10142.         inptintr() wfinptintr() finptintrd() wffill() wfinptstr() 
  10143.         finptintr()
  10144.  
  10145.         Example:
  10146.  
  10147.         int x;
  10148.         int w;
  10149.  
  10150.         w = wopen(2,2,20,78,2);
  10151.  
  10152.         wputat(w,5,10,"Num: ");       /* A prompt for the next field. */
  10153.         wfinptintrd(w,5,15,4,&x,3,10,5);  /* At 5,15 a 4 character */
  10154.                                      /* input greater than 2 and less */
  10155.                                      /* than ten, or 5. */
  10156.  
  10157.  
  10158.  
  10159.  
  10160.  
  10161.  
  10162.  
  10163.  
  10164.  
  10165.  
  10166.  
  10167.  
  10168.                                                            wfinptstr
  10169.         Summary:
  10170.  
  10171.         int wfinptstr(w,rw,cl,mx,str);
  10172.         int w;                   /* Window to Use */
  10173.         int rw;                  /* Row of Field */
  10174.         int cl;                  /* Column of Field */
  10175.         int mx;                  /* Length of Field */
  10176.         char *str;               /* Where to Place Input */
  10177.  
  10178.         Created: 10/19/86        Last Updated: 10/19/86
  10179.  
  10180.         Author: Bob Pritchett         Source (C/A): C
  10181.  
  10182.         Located in: WFINPUT.OBJ
  10183.  
  10184.         Requires: wgotoxy() cfield()
  10185.  
  10186.         Description:
  10187.  
  10188.         This  function  is  the windowing equivalent  of  finptstr()  and 
  10189.         performs  just  like it.   See the description of finptstr()  for 
  10190.         more information on this routine.
  10191.  
  10192.         Compiler Specifics:
  10193.  
  10194.         None.
  10195.  
  10196.         Return Value:
  10197.  
  10198.         A pointer to a duplicate of the inputted string is returned,  via 
  10199.         strdup().
  10200.  
  10201.         See Also:
  10202.  
  10203.         inptstr() finptstr() wfinptint() wffill() wfinptstr()
  10204.         wfinptstrd()
  10205.  
  10206.         Example:
  10207.  
  10208.         char temp[80];
  10209.         int w;
  10210.  
  10211.         w = wopen(1,1,20,78,1);
  10212.  
  10213.         wfinptstr(w,10,10,25,temp);
  10214.  
  10215.  
  10216.  
  10217.  
  10218.  
  10219.  
  10220.  
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.  
  10228.  
  10229.  
  10230.  
  10231.  
  10232.  
  10233.  
  10234.                                                           wfinptstrd
  10235.         Summary:
  10236.  
  10237.         int wfinptstrd(w,rw,cl,mx,str,def);
  10238.         int w;                   /* Window to Use */
  10239.         int rw;                  /* Row of Field */
  10240.         int cl;                  /* Column of Field */
  10241.         int mx;                  /* Length of Field */
  10242.         char *str;               /* Where to Place Input */
  10243.         char *def;               /* Default String */
  10244.  
  10245.         Created: 10/19/86        Last Updated: 10/19/86
  10246.  
  10247.         Author: Bob Pritchett         Source (C/A): C
  10248.  
  10249.         Located in: WFINPUT.OBJ
  10250.  
  10251.         Requires: wgotoxy() cfield()
  10252.  
  10253.         Description:
  10254.  
  10255.         This  function displays the specified field in the  window  along 
  10256.         with the default string.  A string may be inputted or the default 
  10257.         returned in the same manner as with finptstrd().
  10258.  
  10259.         Compiler Specifics:
  10260.  
  10261.         None.
  10262.  
  10263.         Return Value:
  10264.  
  10265.         A pointer to a duplicate of the inputted string,  or the default, 
  10266.         is returned, via strdup().
  10267.  
  10268.         See Also:
  10269.  
  10270.         inptstrd() wfinptint() wfinptstred() ffill() finptstrd() 
  10271.         wfinptstre()
  10272.  
  10273.         Example:
  10274.  
  10275.         char temp[80];
  10276.         int w;
  10277.  
  10278.         w = wopen(10,10,20,70,4);
  10279.  
  10280.         wfinptstrd(w,5,5,25,temp,"C Spot Run");
  10281.  
  10282.  
  10283.  
  10284.  
  10285.  
  10286.  
  10287.  
  10288.  
  10289.  
  10290.  
  10291.  
  10292.  
  10293.  
  10294.  
  10295.  
  10296.  
  10297.  
  10298.  
  10299.  
  10300.                                                           wfinptstre
  10301.         Summary:
  10302.  
  10303.         int wfinptstre(w,rw,cl,mx,str);
  10304.         int w;                   /* Window to Use */
  10305.         int rw;                  /* Row of Field */
  10306.         int cl;                  /* Column of Field */
  10307.         int mx;                  /* Length of Field */
  10308.         char *str;               /* Where to Place Input */
  10309.  
  10310.         Created: 10/19/86        Last Updated: 10/19/86
  10311.  
  10312.         Author: Bob Pritchett         Source (C/A): C
  10313.  
  10314.         Located in: WFINPUT.OBJ
  10315.  
  10316.         Requires: wfinptstred()
  10317.  
  10318.         Description:
  10319.  
  10320.         This  function  calls  wfinptstred() with a null  string  as  the 
  10321.         default  argument.   It will continue to do so until an input  is 
  10322.         made.
  10323.  
  10324.         Compiler Specifics:
  10325.  
  10326.         None.
  10327.  
  10328.         Return Value:
  10329.  
  10330.         Nothing is returned.
  10331.  
  10332.         See Also:
  10333.  
  10334.         inptstr() finptstr() wfinptint() wffill() wfinptstr() 
  10335.         wfinptstred() finptstre()
  10336.  
  10337.         Example:
  10338.  
  10339.         char temp[80];
  10340.         int w;
  10341.  
  10342.         w = wopen(2,2,20,78,5);
  10343.  
  10344.         wfinptstre(w,10,10,25,temp);
  10345.  
  10346.         wprintf(w,"temp contains: >%s<\n");
  10347.  
  10348.  
  10349.  
  10350.  
  10351.  
  10352.  
  10353.  
  10354.  
  10355.  
  10356.  
  10357.  
  10358.  
  10359.  
  10360.  
  10361.  
  10362.  
  10363.  
  10364.  
  10365.  
  10366.                                                          wfinptstred
  10367.         Summary:
  10368.  
  10369.         int wfinptstred(w,rw,cl,mx,str,def);
  10370.         int w;                   /* Window to Use */
  10371.         int rw;                  /* Row of Field */
  10372.         int cl;                  /* Column of Field */
  10373.         int mx;                  /* Length of Field */
  10374.         char *str;               /* Where to Place Input */
  10375.         char *def;               /* Default String */
  10376.  
  10377.         Created: 10/19/86        Last Updated: 10/19/86
  10378.  
  10379.         Author: Bob Pritchett         Source (C/A): C
  10380.  
  10381.         Located in: WFINPUT.OBJ
  10382.  
  10383.         Requires: wgotoxy() cfield()
  10384.  
  10385.         Description:
  10386.  
  10387.         This  function  behaves as does finptstred() with  the  exception 
  10388.         that  it  works within a window.   Due to the complexity of  this 
  10389.         routine  and  the  fact  that it  is  functionally  identical  to 
  10390.         finptstred() the complete description is not repeated here.
  10391.  
  10392.         Compiler Specifics:
  10393.  
  10394.         None.
  10395.  
  10396.         Return Value:
  10397.  
  10398.         A  one is returned unless input was terminated by a special  key, 
  10399.         in which case its value will be returned.  (Special keys return a 
  10400.         null followed by an integer.  The integer is returned here.)
  10401.  
  10402.         See Also:
  10403.  
  10404.         inptstr() wfinptint() wfinptstred() wffill() wfinptstr() 
  10405.         finptstred()
  10406.  
  10407.         Example:
  10408.  
  10409.         char temp[80];
  10410.         int x;
  10411.         int w;
  10412.  
  10413.         w = wopen(4,4,20,70,5);
  10414.  
  10415.         x = wfinptstred(w,10,10,25,temp,"C Spot Run");
  10416.  
  10417.         if ( x != 1 )                 /* Special Value */
  10418.            proccess(x);                /* Proccess Key */
  10419.  
  10420.  
  10421.  
  10422.  
  10423.  
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.                                                             wfinptyn
  10433.         Summary:
  10434.  
  10435.         int wfinptyn(w,rw,cl);
  10436.         int w;                   /* Window to Use */
  10437.         int rw;                  /* Row of Field */
  10438.         int cl;                  /* Column of Field */
  10439.  
  10440.         Created: 10/19/86        Last Updated: 10/19/86
  10441.  
  10442.         Author: Bob Pritchett         Source (C/A): C
  10443.  
  10444.         Located in: WFINPUT.OBJ
  10445.  
  10446.         Requires: wgotoxy() cfield()
  10447.  
  10448.         Description:
  10449.  
  10450.         This function behaves as does finptyn(), only within a window.  A 
  10451.         description of how it functions is available under the  finptyn() 
  10452.         heading.
  10453.  
  10454.         Compiler Specifics:
  10455.  
  10456.         None.
  10457.  
  10458.         Return Value:
  10459.  
  10460.         A one or a zero for a 'Y' or an 'N'.
  10461.  
  10462.         See Also:
  10463.  
  10464.         inptyn() finptyn() wfinptint() wffill() wfinptstr() wfinptynd()
  10465.  
  10466.         Example:
  10467.  
  10468.         char temp[80];
  10469.         int w;
  10470.  
  10471.         w = wopen(1,1,23,78,' ');
  10472.  
  10473.         wfinptyn(w,10,10);
  10474.  
  10475.  
  10476.  
  10477.  
  10478.  
  10479.  
  10480.  
  10481.  
  10482.  
  10483.  
  10484.  
  10485.  
  10486.  
  10487.  
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.                                                            wfinptynd
  10499.         Summary:
  10500.  
  10501.         int wfinptynd(w,rw,cl,def);
  10502.         int w;                   /* Window to Use */
  10503.         int rw;                  /* Row of Field */
  10504.         int cl;                  /* Column of Field */
  10505.         int def;                 /* Default Input */
  10506.  
  10507.         Created: 10/19/86        Last Updated: 10/19/86
  10508.  
  10509.         Author: Bob Pritchett         Source (C/A): C
  10510.  
  10511.         Located in: WFINPUT.OBJ
  10512.  
  10513.         Requires: wgotoxy() cfield()
  10514.  
  10515.         Description:
  10516.  
  10517.         This function behaves within a window in a manner similar to that 
  10518.         of finptynd(), where a complete description of the both functions 
  10519.         can be found.
  10520.  
  10521.         Compiler Specifics:
  10522.  
  10523.         None.
  10524.  
  10525.         Return Value:
  10526.  
  10527.         A one or a zero for a 'Y' or an 'N', or whatever the default was.
  10528.  
  10529.         See Also:
  10530.  
  10531.         inptynd() finptynd() wfinptint() wffill() wfinptstr() wfinptyn()
  10532.  
  10533.         Example:
  10534.  
  10535.         char temp[80];
  10536.         int w;
  10537.  
  10538.         w = wopen(12,12,20,70,'+');
  10539.  
  10540.         wfinptynd(w,10,10,1);                   /* Default to Yes */
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.  
  10559.  
  10560.  
  10561.  
  10562.  
  10563.  
  10564.                                                              wfreeze
  10565.         Summary:
  10566.  
  10567.         int wfreeze(num,top,bot);
  10568.         int num;                 /* Pointer to Window to Use */
  10569.         int top;                 /* First Scrollable Line */
  10570.         int bot;                 /* Last Scrollable Line */
  10571.  
  10572.         Created: 04/16/86        Last Updated: 04/16/86
  10573.  
  10574.         Author: Bob Pritchett         Source (C/A): C
  10575.  
  10576.         Located in: COUTPUT.OBJ
  10577.  
  10578.         Requires: Nothing.
  10579.  
  10580.         Description:
  10581.  
  10582.         This  routine  allows  you to set the scrollable lines  within  a 
  10583.         window.  When text a newline is printed on the last line inside a 
  10584.         window, the text scrolls up.  This routine allows you to 'freeze' 
  10585.         a  number  of lines at the top and bottom  of  the  window.   The 
  10586.         numbers  specified are the first and last scrollable  lines,  and 
  10587.         the default, full window, values are 0 and wrow(num).
  10588.  
  10589.         No error checking is performed on the values.
  10590.  
  10591.         The wcls() routine will only clear scrollable lines,  and whome() 
  10592.         will  home  the  cursor  to  the first  character  on  the  first 
  10593.         scrollable line.   Reset the wfreeze() values to 0 and  wrow(num) 
  10594.         to clear an entire window.
  10595.  
  10596.         Compiler Specifics:
  10597.  
  10598.         Compiled with MSC.  See window notes.
  10599.  
  10600.         Return Value:
  10601.  
  10602.         Nothing.
  10603.  
  10604.         See Also:
  10605.  
  10606.  
  10607.  
  10608.         Example:
  10609.  
  10610.         wfreeze(w2,2,wrow(w2)-3);     /* Freeze lines 0-1 at top, and the
  10611.                                          bottom three lines. */
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.  
  10620.  
  10621.  
  10622.  
  10623.  
  10624.  
  10625.  
  10626.  
  10627.  
  10628.  
  10629.  
  10630.                                                              wgotoxy
  10631.         Summary:
  10632.  
  10633.         int wgotoxy(num,row,col);
  10634.         int num;                 /* Pointer to Window to Use */
  10635.         int row;                 /* Row In Window to Go To */
  10636.         int col;                 /* Col In Window to Go To */
  10637.  
  10638.         Created: 03/03/86        Last Updated: 04/16/86
  10639.  
  10640.         Author: Bob Pritchett         Source (C/A): C
  10641.  
  10642.         Located in: COUTPUT.OBJ
  10643.  
  10644.         Requires: Nothing.
  10645.  
  10646.         Description:
  10647.  
  10648.         This routine perfomrs the same function as gotoxy() within window 
  10649.         coordinates.   Remember that as on the screen, window coordinates 
  10650.         start numbering at 0,0.
  10651.  
  10652.         Compiler Specifics:
  10653.  
  10654.         Compiled with MSC.  See window notes.
  10655.  
  10656.         Return Value:
  10657.  
  10658.         Nothing.
  10659.  
  10660.         See Also:
  10661.  
  10662.         gotoxy() whome()
  10663.  
  10664.         Example:
  10665.  
  10666.         wgotoxy(w1,2,4);        /* Put cursor at 2,4 in window 1. */
  10667.  
  10668.  
  10669.  
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.  
  10677.  
  10678.  
  10679.  
  10680.  
  10681.  
  10682.  
  10683.  
  10684.  
  10685.  
  10686.  
  10687.  
  10688.  
  10689.  
  10690.  
  10691.  
  10692.  
  10693.  
  10694.  
  10695.  
  10696.                                                               whline
  10697.         Summary:
  10698.  
  10699.         int whline(wind,row);
  10700.         int wind;                /* Window to Draw in */
  10701.         int row;                 /* Row to Draw Line on */
  10702.  
  10703.         Created: 03/03/86        Last Updated: 03/03/86
  10704.  
  10705.         Author: Bob Pritchett         Source (C/A): C
  10706.  
  10707.         Located in: COUTPUT.OBJ
  10708.  
  10709.         Requires: chline()
  10710.  
  10711.         Description:
  10712.  
  10713.         This  function calls chline() with the correct parameters to draw 
  10714.         a  horizontal line in the specified window.   The correct  colors 
  10715.         and border styles are used.
  10716.  
  10717.         Compiler Specifics:
  10718.  
  10719.         None.
  10720.  
  10721.         Return Value:
  10722.  
  10723.         Nothing.
  10724.  
  10725.         See Also:
  10726.  
  10727.         chline() wvline()
  10728.  
  10729.         Example:
  10730.  
  10731.         #include <color.h>       /* Just for the colors... */
  10732.  
  10733.         int w;
  10734.  
  10735.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  10736.  
  10737.         whline(w,7);        /* Draws a line across the box */
  10738.  
  10739.  
  10740.  
  10741.  
  10742.  
  10743.  
  10744.  
  10745.  
  10746.  
  10747.  
  10748.  
  10749.  
  10750.  
  10751.  
  10752.  
  10753.  
  10754.  
  10755.  
  10756.  
  10757.  
  10758.  
  10759.  
  10760.  
  10761.  
  10762.                                                                whome
  10763.         Summary:
  10764.  
  10765.         int whome(num);
  10766.         int num;                 /* Pointer to Window to Use */
  10767.  
  10768.         Created: 04/20/86        Last Updated: 04/20/86
  10769.  
  10770.         Author: Bob Pritchett         Source (C/A): C
  10771.  
  10772.         Located in: COUTPUT.OBJ
  10773.  
  10774.         Requires: Nothing.
  10775.  
  10776.         Description:
  10777.  
  10778.         This routine homes the cursor to the same coordinates as would be 
  10779.         used  in a window clear with wcls(),  the upper  left  scrollable 
  10780.         character in the specified window.
  10781.  
  10782.         Compiler Specifics:
  10783.  
  10784.         Compiled with MSC.  See window notes.
  10785.  
  10786.         Return Value:
  10787.  
  10788.         Nothing.
  10789.  
  10790.         See Also:
  10791.  
  10792.         gotoxy() wgotoxy()
  10793.  
  10794.         Example:
  10795.  
  10796.         wfreeze(w,3,wrow(num));  /* First three lines frozen. (0-2) */
  10797.         whome(w);                /* Cursor goes to 3,0. */
  10798.  
  10799.  
  10800.  
  10801.  
  10802.  
  10803.  
  10804.  
  10805.  
  10806.  
  10807.  
  10808.  
  10809.  
  10810.  
  10811.  
  10812.  
  10813.  
  10814.  
  10815.  
  10816.  
  10817.  
  10818.  
  10819.  
  10820.  
  10821.  
  10822.  
  10823.  
  10824.  
  10825.  
  10826.  
  10827.  
  10828.                                                             winptint
  10829.         Summary:
  10830.  
  10831.         int winptint(w,prompt);
  10832.         int w;                   /* Window to Input Within */
  10833.         char *prompt;            /* Prompt for Input */
  10834.  
  10835.         Created: 08/16/86        Last Updated: 08/16/86
  10836.  
  10837.         Author: Bob Pritchett         Source (C/A): C
  10838.  
  10839.         Located in: WINPUT.OBJ
  10840.  
  10841.         Requires: Nothing.
  10842.  
  10843.         Description:
  10844.  
  10845.         This function performs the same function as inptint() only within 
  10846.         the specified window.
  10847.  
  10848.         Compiler Specifics:
  10849.  
  10850.         None.
  10851.  
  10852.         Return Value:
  10853.  
  10854.         The integer inputted.
  10855.  
  10856.         See Also:
  10857.  
  10858.         inptint() winptintd() winptintr() winptintrd()
  10859.  
  10860.         Example:
  10861.  
  10862.         int w;
  10863.  
  10864.         w = wopen(2,5,10,76,3);
  10865.  
  10866.         wprintf(w,"winptint() returns: %d.\n"
  10867.                ,winptint(w,"Enter Integer:"));
  10868.  
  10869.              /* The above function prompts "Enter Integer: " and then */
  10870.              /* executes the wprintf statement. */
  10871.  
  10872.  
  10873.  
  10874.  
  10875.  
  10876.  
  10877.  
  10878.  
  10879.  
  10880.  
  10881.  
  10882.  
  10883.  
  10884.  
  10885.  
  10886.  
  10887.  
  10888.  
  10889.  
  10890.  
  10891.  
  10892.  
  10893.  
  10894.                                                            winptintd
  10895.         Summary:
  10896.  
  10897.         int winptintd(w,prompt,def);
  10898.         int w;                   /* Window to Input Within */
  10899.         char *prompt;            /* Prompt for Input */
  10900.         int def;                 /* Default Integer */
  10901.  
  10902.         Created: 08/16/86        Last Updated: 08/16/86
  10903.  
  10904.         Author: Bob Pritchett         Source (C/A): C
  10905.  
  10906.         Located in: WINPUT.OBJ
  10907.  
  10908.         Requires: Nothing.
  10909.  
  10910.         Description:
  10911.  
  10912.         This  functions prompts and waits for an integer,  or a  carriage 
  10913.         return,  in which case it returns the default integer.   Refer to 
  10914.         inptintd() for details.
  10915.  
  10916.         Compiler Specifics:
  10917.  
  10918.         None.
  10919.  
  10920.         Return Value:
  10921.  
  10922.         The integer inputted, or the default.
  10923.  
  10924.         See Also:
  10925.  
  10926.         inptintd() winptint() winptintr() winptintrd()
  10927.  
  10928.         Example:
  10929.  
  10930.         int w;
  10931.  
  10932.         w = wopen(4,1,8,78,2);
  10933.  
  10934.         wprintf(w,"winptintd() returns: %d.\n"
  10935.                ,winptintd(w,"Enter Integer:",7));
  10936.  
  10937.              /* The above function prompts "Enter Integer: " and then */
  10938.              /* executes the wprintf statement. */
  10939.  
  10940.  
  10941.  
  10942.  
  10943.  
  10944.  
  10945.  
  10946.  
  10947.  
  10948.  
  10949.  
  10950.  
  10951.  
  10952.  
  10953.  
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960.                                                            winptintr
  10961.         Summary:
  10962.  
  10963.         int winptintr(w,prompt,low,high);
  10964.         int w;                   /* Window to Input Within */
  10965.         char *prompt;            /* Prompt for Input */
  10966.         int low;                 /* Lowest Acceptable Input */
  10967.         int high;                /* Highest Acceptable Input */
  10968.  
  10969.         Created: 08/16/86        Last Updated: 08/16/86
  10970.  
  10971.         Author: Bob Pritchett         Source (C/A): C
  10972.  
  10973.         Located in: WINPUT.OBJ
  10974.  
  10975.         Requires: Nothing.
  10976.  
  10977.         Description:
  10978.  
  10979.         Performing in the same manner as inptintr() this function prompts 
  10980.         for  an  integer  within a range and waits until a valid  one  is 
  10981.         received.  For details refer to inptintr().
  10982.  
  10983.         Compiler Specifics:
  10984.  
  10985.         None.
  10986.  
  10987.         Return Value:
  10988.  
  10989.         The integer inputted, within the specified range.
  10990.  
  10991.         See Also:
  10992.  
  10993.         inptintr() winptint() winptintd() winptintrd()
  10994.  
  10995.         Example:
  10996.  
  10997.         int w;
  10998.  
  10999.         w = wopen(1,1,20,78,1);
  11000.  
  11001.         wprintf(w,"winptintr() returns: %d.\n",winptintr(w
  11002.                ,"Enter Integer:",5,62));
  11003.  
  11004.              /* The above function prompts "Enter Integer: " and then */
  11005.              /* executes the wprintf statement.  The returned value */
  11006.              /* will be greater than 4 and less than 63. */ 
  11007.  
  11008.  
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.                                                           winptintrd
  11027.         Summary:
  11028.  
  11029.         int winptintrd(w,prompt,low,high,def);
  11030.         int w;                   /* Window to Input Within */
  11031.         char *prompt;            /* Prompt for Input */
  11032.         int low;                 /* Lowest Acceptable Input */
  11033.         int high;                /* Highest Acceptable Input */
  11034.         int def;                 /* Default Value */
  11035.  
  11036.         Created: 08/16/86        Last Updated: 08/16/86
  11037.  
  11038.         Author: Bob Pritchett         Source (C/A): C
  11039.  
  11040.         Located in: WINPUT.OBJ
  11041.  
  11042.         Requires: Nothing.
  11043.  
  11044.         Description:
  11045.  
  11046.         Behaving  as  does inptintrd() this function prompts  within  the 
  11047.         specified  window  with  the default integer and  waits  until  a 
  11048.         carriage return is hit, in which case the default is returned, or 
  11049.         an integer within the specified range is entered.
  11050.  
  11051.         Compiler Specifics:
  11052.  
  11053.         None.
  11054.  
  11055.         Return Value:
  11056.  
  11057.         The integer inputted, or the default, within the specified range.
  11058.  
  11059.         See Also:
  11060.  
  11061.         inptintrd() winptint() winptintd() winptintr()
  11062.  
  11063.         Example:
  11064.  
  11065.         int w;
  11066.  
  11067.         w = wopen(2,2,10,70,5);
  11068.  
  11069.         wprintf(w,"winptintrd() returns: %d.\n"
  11070.                ,winptintrd(w,"Enter Integer:",8,50,30));
  11071.  
  11072.              /* The above function prompts "Enter Integer: 30" and */
  11073.              /* then executes the wprintf statement.  The returned */
  11074.              /* value will be greater than 7 and less than 51. */ 
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.  
  11092.                                                             winptstr
  11093.         Summary:
  11094.  
  11095.         char *winptstr(prompt);
  11096.         int w;                   /* Window to Input Within */
  11097.         char *prompt;            /* Prompt for Input */
  11098.  
  11099.         Created: 08/25/86        Last Updated: 08/25/86
  11100.  
  11101.         Author: Bob Pritchett         Source (C/A): C
  11102.  
  11103.         Located in: WINPUT.OBJ
  11104.  
  11105.         Requires: Nothing.
  11106.  
  11107.         Description:
  11108.  
  11109.         This  function  is  the  window  equivalent  of  inptstr().    It 
  11110.         functions  in  an  identical manner with the exception  that  the 
  11111.         prompt and input are within the window.
  11112.  
  11113.         Compiler Specifics:
  11114.  
  11115.         None.
  11116.  
  11117.         Return Value:
  11118.  
  11119.         The character string inputted.
  11120.  
  11121.         See Also:
  11122.  
  11123.         inptstr() winptstrd() wfinptstr() wfinptstrd() wfinptstre()
  11124.         wfinptstred()
  11125.  
  11126.         Example:
  11127.  
  11128.         int w;
  11129.  
  11130.         w = wopen(2,2,20,78,'*');               /* Border of *'s. */
  11131.  
  11132.         wprintf(w,"Hello there, %s.\n",winptstr(w,"Your name?"));
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.  
  11153.  
  11154.  
  11155.  
  11156.  
  11157.  
  11158.                                                            winptstrd
  11159.         Summary:
  11160.  
  11161.         char *winptstrd(win,prompt,def);
  11162.         int win;                 /* Window to Input Within */
  11163.         char *prompt;            /* Prompt for Input */
  11164.         char *def;               /* Default String */
  11165.  
  11166.         Created: 08/25/86        Last Updated: 08/25/86
  11167.  
  11168.         Author: Bob Pritchett         Source (C/A): C
  11169.  
  11170.         Located in: WINPUT.OBJ
  11171.  
  11172.         Requires: Nothing.
  11173.  
  11174.         Description:
  11175.  
  11176.         This function performs like winptstr() with the exception that it 
  11177.         prompts  with  a default string that is returned  if  a  carriage 
  11178.         return  is entered as the first keystroke.   For more information 
  11179.         see inptstrd().
  11180.  
  11181.         Compiler Specifics:
  11182.  
  11183.         None.
  11184.  
  11185.         Return Value:
  11186.  
  11187.         The character string inputted, or the default string.
  11188.  
  11189.         See Also:
  11190.  
  11191.         inptstrd() winptstr() wfinptstr() wfinptstrd() wfinptstre()
  11192.         wfinptstred()
  11193.  
  11194.         Example:
  11195.  
  11196.         int w;
  11197.  
  11198.         w = wopen(4,2,10,76,2);
  11199.  
  11200.         wprintf(w,"Hello there, %s.\n"
  11201.                ,winptstrd(w,"Your name?","Robert"));
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.  
  11211.  
  11212.  
  11213.  
  11214.  
  11215.  
  11216.  
  11217.  
  11218.  
  11219.  
  11220.  
  11221.  
  11222.  
  11223.  
  11224.                                                              winptyn
  11225.         Summary:
  11226.  
  11227.         char *winptyn(win,prompt);
  11228.         int win;                 /* Window to Prompt Within */
  11229.         char *prompt;            /* Prompt for Input */
  11230.  
  11231.         Created: 08/16/86        Last Updated: 08/16/86
  11232.  
  11233.         Author: Bob Pritchett         Source (C/A): C
  11234.  
  11235.         Located in: WINPUT.OBJ
  11236.  
  11237.         Requires: Nothing.
  11238.  
  11239.         Description:
  11240.  
  11241.         This function behaves in the same manner as  inptyn(),  prompting 
  11242.         and waiting for a yes or no response.
  11243.  
  11244.         Compiler Specifics:
  11245.  
  11246.         None.
  11247.  
  11248.         Return Value:
  11249.  
  11250.         A one or zero, dependent on the inputted character.
  11251.  
  11252.         See Also:
  11253.  
  11254.         inptyn() winptynd() wfinptyn() wfinptynd()
  11255.  
  11256.         Example:
  11257.  
  11258.         if ( winptyn(w,"Do you program microcomputers?") )
  11259.            wprintf(w,"Oh, you do.");
  11260.  
  11261.              /* Prompts 'Do you program microcomputers? (Y/N) ' */
  11262.  
  11263.  
  11264.  
  11265.  
  11266.  
  11267.  
  11268.  
  11269.  
  11270.  
  11271.  
  11272.  
  11273.  
  11274.  
  11275.  
  11276.  
  11277.  
  11278.  
  11279.  
  11280.  
  11281.  
  11282.  
  11283.  
  11284.  
  11285.  
  11286.  
  11287.  
  11288.  
  11289.  
  11290.                                                            winptynd
  11291.         Summary:
  11292.  
  11293.         char *winptynd(win,prompt,x);
  11294.         int win;                 /* Window to Input Within */
  11295.         char *prompt;            /* Prompt for Input */
  11296.         int x;                   /* Default Answer */
  11297.  
  11298.         Created: 08/16/86        Last Updated: 08/16/86
  11299.  
  11300.         Author: Bob Pritchett         Source (C/A): C
  11301.  
  11302.         Located in: WINPUT.OBJ
  11303.  
  11304.         Requires: Nothing.
  11305.  
  11306.         Description:
  11307.  
  11308.         This  function performs identically to winptyn() except that  the 
  11309.         default  response  is the capital letter,  and is returned  if  a 
  11310.         carriage return is entered.
  11311.  
  11312.         Compiler Specifics:
  11313.  
  11314.         None.
  11315.  
  11316.         Return Value:
  11317.  
  11318.         A  one  or  zero,  dependent on the inputted  character,  or  the 
  11319.         default.
  11320.  
  11321.         See Also:
  11322.  
  11323.         inptynd() winptyn() wfinptyn() wfinptynd()
  11324.  
  11325.         Example:
  11326.  
  11327.         if ( winptyn(w,"Do you program microcomputers?",1) )
  11328.            wprintf(w,"Oh, you do.");
  11329.  
  11330.              /* Prompts 'Do you program microcomputers? (Y/n) ' */
  11331.  
  11332.  
  11333.  
  11334.  
  11335.  
  11336.  
  11337.  
  11338.  
  11339.  
  11340.  
  11341.  
  11342.  
  11343.  
  11344.  
  11345.  
  11346.  
  11347.  
  11348.  
  11349.  
  11350.  
  11351.  
  11352.  
  11353.  
  11354.  
  11355.  
  11356.                                                              winsert
  11357.         Summary:
  11358.  
  11359.         int winsert(num,row,tms)
  11360.         int num;                 /* Pointer to Window to Use */
  11361.         int row;                 /* Row to Insert Line Before */
  11362.         int tms;                 /* Number of Lines to Insert */
  11363.  
  11364.         Created: 04/30/86        Last Updated: 04/30/86
  11365.  
  11366.         Author: Bob Pritchett         Source (C/A): C
  11367.  
  11368.         Located in: COUTPUT.OBJ
  11369.  
  11370.         Requires: Nothing.
  11371.  
  11372.         Description:
  11373.  
  11374.         This  routine inserts tms lines before the specified line in  the 
  11375.         specified window, scrolling all lines below down tms.  The cursor 
  11376.         goes to the first column in the first new line.
  11377.  
  11378.         Compiler Specifics:
  11379.  
  11380.         Compiled with MSC.  See window notes.
  11381.  
  11382.         Return Value:
  11383.  
  11384.         Nothing.
  11385.  
  11386.         See Also:
  11387.  
  11388.         wdelete() wblank()
  11389.  
  11390.         Example:
  11391.  
  11392.         winsert(win,3,2);   /* Insert two lines before line 3,
  11393.                                new lines become 3 and 4, 3 becomes
  11394.                                line 5. */
  11395.  
  11396.  
  11397.  
  11398.  
  11399.  
  11400.  
  11401.  
  11402.  
  11403.  
  11404.  
  11405.  
  11406.  
  11407.  
  11408.  
  11409.  
  11410.  
  11411.  
  11412.  
  11413.  
  11414.  
  11415.  
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.                                                                wjump    
  11423.         Summary:
  11424.  
  11425.         int wjump(wind,x,y);
  11426.         int wind;                /* Pointer to Window to Jump */
  11427.         int x;                   /* Upper Right Row */
  11428.         int y;                   /* Upper Right Col */
  11429.  
  11430.         Created: 03/03/86        Last Updated: 03/09/86
  11431.  
  11432.         Author: Bob Pritchett         Source (C/A): C
  11433.  
  11434.         Located in: COUTPUT.OBJ
  11435.  
  11436.         Requires: Nothing.
  11437.  
  11438.         Description:
  11439.  
  11440.         This function activates and moves the specified window to the x,y 
  11441.         coordinates  given.   The window instantly 'jumps',  placing it's 
  11442.         upper right hand corner at x,y.
  11443.  
  11444.         Compiler Specifics:
  11445.  
  11446.         Compiled with MSC.  See window notes.
  11447.  
  11448.         Return Value:
  11449.  
  11450.         Nothing.
  11451.  
  11452.         See Also:
  11453.  
  11454.         wmove()
  11455.  
  11456.         Example:
  11457.  
  11458.         wjump(w2,10,10);         /* Jumps window w2 to 10,10 */
  11459.  
  11460.  
  11461.  
  11462.  
  11463.  
  11464.  
  11465.  
  11466.  
  11467.  
  11468.  
  11469.  
  11470.  
  11471.  
  11472.  
  11473.  
  11474.  
  11475.  
  11476.  
  11477.  
  11478.  
  11479.  
  11480.  
  11481.  
  11482.  
  11483.  
  11484.  
  11485.  
  11486.  
  11487.  
  11488.                                                             wmessage
  11489.         Summary:
  11490.  
  11491.         int wmessage(win,str,val);
  11492.         int win;                 /* Window to Use */
  11493.         char *str;               /* Message to Use */
  11494.         int val;                 /* Message Location */
  11495.  
  11496.         Created: 03/03/86        Last Updated: 03/03/86
  11497.  
  11498.         Author: Bob Pritchett         Source (C/A): C
  11499.  
  11500.         Located in: COUTPUT.OBJ
  11501.  
  11502.         Requires: wprint()
  11503.  
  11504.         Description:
  11505.  
  11506.         Using  the  window's border attribute,  this  function  prints  a 
  11507.         message  to the user on the bottom border.   For more information 
  11508.         see the description of wtitle().
  11509.  
  11510.         Compiler Specifics:
  11511.  
  11512.         None.
  11513.  
  11514.         Return Value:
  11515.  
  11516.         Nothing.
  11517.  
  11518.         See Also:
  11519.  
  11520.         wtitle()
  11521.  
  11522.         Example:
  11523.  
  11524.         wmessage(w,"< Press a Key >",0);
  11525.  
  11526.  
  11527.  
  11528.  
  11529.  
  11530.  
  11531.  
  11532.  
  11533.  
  11534.  
  11535.  
  11536.  
  11537.  
  11538.  
  11539.  
  11540.  
  11541.  
  11542.  
  11543.  
  11544.  
  11545.  
  11546.  
  11547.  
  11548.  
  11549.  
  11550.  
  11551.  
  11552.  
  11553.  
  11554.                                                                wmove    
  11555.         Summary:
  11556.  
  11557.         int wmove(wind,dir);
  11558.         int wind;                /* Pointer to Window to Move */
  11559.         int dir;                 /* Direction to Move Window */
  11560.  
  11561.         Created: 03/03/86        Last Updated: 03/09/86
  11562.  
  11563.         Author: Bob Pritchett         Source (C/A): C
  11564.  
  11565.         Located in: COUTPUT.OBJ
  11566.  
  11567.         Requires: Nothing.
  11568.  
  11569.         Description:
  11570.  
  11571.         This  function  will activate and move the specified  window  one 
  11572.         space in the direction given in dir.   The dir value is a  number 
  11573.         from one to four, up, right, down, and left, respectively.
  11574.  
  11575.         Compiler Specifics:
  11576.  
  11577.         Compiled with MSC.  See window notes.
  11578.  
  11579.         Return Value:
  11580.  
  11581.         Nothing.
  11582.  
  11583.         See Also:
  11584.  
  11585.         wjump()
  11586.  
  11587.         Example:
  11588.  
  11589.         wmove(w2,10,10);         /* Jumps window w2 to 10,10 */
  11590.  
  11591.  
  11592.  
  11593.  
  11594.  
  11595.  
  11596.  
  11597.  
  11598.  
  11599.  
  11600.  
  11601.  
  11602.  
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.                                                                wopen
  11621.         Summary:
  11622.  
  11623.         int wopen(x,y,x2,y2,type);
  11624.         int x;                   /* Upper Left Row */
  11625.         int y;                   /* Upper Left Col */
  11626.         int x2;                  /* Lower Right Row */
  11627.         int y2;                  /* Lower Right Col */
  11628.         int type;                /* Type of Border */
  11629.  
  11630.         Created: 03/03/86        Last Updated: 03/09/86
  11631.  
  11632.         Author: Bob Pritchett         Source (C/A): C
  11633.  
  11634.         Located in: COUTPUT.OBJ
  11635.  
  11636.         Requires: cbox()
  11637.  
  11638.         Description:
  11639.  
  11640.         This function opens a video window.  The current video attributes 
  11641.         are  used,  the portion of the screen covered is saved,  and then 
  11642.         blanked with the interior color.  The argument type may be of any 
  11643.         one of the valid types used by box() and cbox().
  11644.  
  11645.         Compiler Specifics:
  11646.  
  11647.         Compiled with MSC.  See window notes.
  11648.  
  11649.         Return Value:
  11650.  
  11651.         Returns  a  type int value needed to reference the  window  at  a 
  11652.         later time.
  11653.  
  11654.         See Also:
  11655.  
  11656.         wclose() wactivate()
  11657.  
  11658.         Example:
  11659.  
  11660.         int w;
  11661.  
  11662.         w = wopen(10,10,20,70,2);     /* Open a large window */ 
  11663.  
  11664.  
  11665.  
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.  
  11680.  
  11681.  
  11682.  
  11683.  
  11684.  
  11685.  
  11686.                                                               wprint
  11687.         Summary:
  11688.  
  11689.         int wprint(win,str);
  11690.         int win;                 /* Window to Use */
  11691.         char *str;               /* String to Print */
  11692.  
  11693.         Created: 03/03/86        Last Updated: 03/03/86
  11694.  
  11695.         Author: Bob Pritchett         Source (C/A): C
  11696.  
  11697.         Located in: COUTPUT.OBJ
  11698.  
  11699.         Requires: putchci()
  11700.  
  11701.         Description:
  11702.  
  11703.         Using  the window's inside attributes,  the string is printed  at 
  11704.         the current cursor position within the specified window, which is 
  11705.         activated  if  it  is  not  already  so.   The  following  escape 
  11706.         characters may be used:
  11707.  
  11708.                   \n  Newline
  11709.                   \t  Tab
  11710.                   \r  Return
  11711.                   \f  Form-Feed, clear window
  11712.  
  11713.         Compiler Specifics:
  11714.  
  11715.         None.
  11716.  
  11717.         Return Value:
  11718.  
  11719.         Nothing.
  11720.  
  11721.         See Also:
  11722.  
  11723.         wprintf()
  11724.  
  11725.         Example:
  11726.  
  11727.         wprint(w3,"This line is outputted where the cursor is.\n");
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.  
  11739.  
  11740.  
  11741.  
  11742.  
  11743.  
  11744.  
  11745.  
  11746.  
  11747.  
  11748.  
  11749.  
  11750.  
  11751.  
  11752.                                                              wprintf
  11753.         Summary:
  11754.  
  11755.         int wprintf(win,str,args...);
  11756.         int win;                 /* Window to Use */
  11757.         char *str;               /* Formatted String to Print */
  11758.         args...                  /* Formatting Arguments */
  11759.  
  11760.         Created: 03/09/86        Last Updated: 08/17/86
  11761.  
  11762.         Author: Bob Pritchett         Source (C/A): C
  11763.  
  11764.         Located in: WPRINTF.OBJ
  11765.  
  11766.         Requires: wprint()
  11767.  
  11768.         Description:
  11769.  
  11770.         This  function  supports the full formatting capabilities of  the 
  11771.         regular  printf()  function,  only  it prints  to  the  specified 
  11772.         window.  A maximum of 15 formatting arguments may be included, it 
  11773.         is unlikely more should be needed.
  11774.  
  11775.         Compiler Specifics:
  11776.  
  11777.         None.
  11778.  
  11779.         Return Value:
  11780.  
  11781.         Nothing.
  11782.  
  11783.         See Also:
  11784.  
  11785.         wprint()
  11786.  
  11787.         Example:
  11788.  
  11789.         wprintf(w2,"This is formatting... %03d %s.\n",38,"times");
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.  
  11796.  
  11797.  
  11798.  
  11799.  
  11800.  
  11801.  
  11802.  
  11803.  
  11804.  
  11805.  
  11806.  
  11807.  
  11808.  
  11809.  
  11810.  
  11811.  
  11812.  
  11813.  
  11814.  
  11815.  
  11816.  
  11817.  
  11818.                                                               wputat
  11819.         Summary:
  11820.  
  11821.         int wputat(win,x,y,string);
  11822.         int win;                 /* Window to Use */
  11823.         int x;                   /* Row to Print on */
  11824.         int y;                   /* Column to Print at */
  11825.         char *string;            /* String to Print */
  11826.  
  11827.         Created: 03/09/86        Last Updated: 03/09/86
  11828.  
  11829.         Author: Bob Pritchett         Source (C/A): C
  11830.  
  11831.         Located in: WPUTAT.OBJ
  11832.  
  11833.         Requires: wgotoxy() wprint()
  11834.  
  11835.         Description:
  11836.  
  11837.         This routine will place the string in the window specified at the 
  11838.         coordinates  specified.   If not active the specified window will 
  11839.         be activated.
  11840.  
  11841.         Compiler Specifics:
  11842.  
  11843.         Compiled with MSC.  See window notes.
  11844.  
  11845.         Return Value:
  11846.  
  11847.         Nothing.
  11848.  
  11849.         See Also:
  11850.  
  11851.         putat()
  11852.  
  11853.         Example:
  11854.  
  11855.         wputat(win,4,5,"+ The plus sign is at 4,5 in window win.");
  11856.  
  11857.  
  11858.  
  11859.  
  11860.  
  11861.  
  11862.  
  11863.  
  11864.  
  11865.  
  11866.  
  11867.  
  11868.  
  11869.  
  11870.  
  11871.  
  11872.  
  11873.  
  11874.  
  11875.  
  11876.  
  11877.  
  11878.  
  11879.  
  11880.  
  11881.  
  11882.  
  11883.  
  11884.                                                              wputatf
  11885.         Summary:
  11886.  
  11887.         int wputatf(num,row,col,string,args...)
  11888.         int num;                 /* Pointer to Window to Use */
  11889.         int row;                 /* Row Coordinate */
  11890.         int col;                 /* Col Coordinate */
  11891.         char *string;            /* Format String */
  11892.         args...                  /* Formatting Arguments */
  11893.  
  11894.         Created: 05/01/86        Last Updated: 08/17/86
  11895.  
  11896.         Author: Bob Pritchett         Source (C/A): C
  11897.  
  11898.         Located in: WPUTATF.OBJ
  11899.  
  11900.         Requires: Nothing.
  11901.  
  11902.         Description:
  11903.  
  11904.         This  routine performs the same function as putatf() only  within 
  11905.         the specified window.
  11906.  
  11907.         Compiler Specifics:
  11908.  
  11909.         Compiled with MSC.  See window notes.
  11910.  
  11911.         Return Value:
  11912.  
  11913.         Nothing.
  11914.  
  11915.         See Also:
  11916.  
  11917.         putatf() wputat() putat()
  11918.  
  11919.         Example:
  11920.  
  11921.         wputatf(win,4,6,"This line at %d,%d.",4,6);
  11922.  
  11923.  
  11924.  
  11925.  
  11926.  
  11927.  
  11928.  
  11929.  
  11930.  
  11931.  
  11932.  
  11933.  
  11934.  
  11935.  
  11936.  
  11937.  
  11938.  
  11939.  
  11940.  
  11941.  
  11942.  
  11943.  
  11944.  
  11945.  
  11946.  
  11947.  
  11948.  
  11949.  
  11950.                                                             wputchar
  11951.         Summary:
  11952.  
  11953.         int wputchar(num,c);
  11954.         int num;                 /* Number of Window to Use */
  11955.         int c;                   /* Character to Output in Window */
  11956.  
  11957.         Created: 04/25/86        Last Updated: 04/25/86
  11958.  
  11959.         Author: Bob Pritchett         Source (C/A): C
  11960.  
  11961.         Located in: COUTPUT.OBJ
  11962.  
  11963.         Requires: Nothing.
  11964.  
  11965.         Description:
  11966.  
  11967.         This  function  simply  outputs  the  character  at  the  current 
  11968.         position of the specified window.
  11969.  
  11970.         Compiler Specifics:
  11971.  
  11972.         Compiled with MSC.  See window notes.
  11973.  
  11974.         Return Value:
  11975.  
  11976.         Nothing.
  11977.  
  11978.         See Also:
  11979.  
  11980.         wprint() wprintf()
  11981.  
  11982.         Example:
  11983.  
  11984.         wputchar(win,'\n');
  11985.  
  11986.  
  11987.  
  11988.  
  11989.  
  11990.  
  11991.  
  11992.  
  11993.  
  11994.  
  11995.  
  11996.  
  11997.  
  11998.  
  11999.  
  12000.  
  12001.  
  12002.  
  12003.  
  12004.  
  12005.  
  12006.  
  12007.  
  12008.  
  12009.  
  12010.  
  12011.  
  12012.  
  12013.  
  12014.  
  12015.  
  12016.                                                                 wrow    
  12017.         Summary:
  12018.  
  12019.         int wrow(wind);
  12020.         int wind;                /* Pointer to Window to Use */
  12021.  
  12022.         Created: 03/03/86        Last Updated: 03/09/86
  12023.  
  12024.         Author: Bob Pritchett         Source (C/A): C
  12025.  
  12026.         Located in: COUTPUT.OBJ
  12027.  
  12028.         Requires: Nothing.
  12029.  
  12030.         Description:
  12031.  
  12032.         This  function returns the number of the highest row in a window.  
  12033.         If a window has four lines,  numbered zero to three,  wrow() will 
  12034.         return a three.  Mostly an internal routine.
  12035.  
  12036.         Compiler Specifics:
  12037.  
  12038.         Compiled with MSC.  See window notes.
  12039.  
  12040.         Return Value:
  12041.  
  12042.         Nothing.
  12043.  
  12044.         See Also:
  12045.  
  12046.         wcol()
  12047.  
  12048.         Example:
  12049.  
  12050.         x = wrow(w3);            /* Returns the number of highest row */
  12051.  
  12052.  
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059.  
  12060.  
  12061.  
  12062.  
  12063.  
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.  
  12076.  
  12077.  
  12078.  
  12079.  
  12080.  
  12081.  
  12082.                                                              wscolor 
  12083.         Summary:
  12084.  
  12085.         #include <color.h>       /* For Color Defintitions Only */
  12086.  
  12087.         int wscolor(wind,insd,bord);
  12088.         int wind;                /* Pointer to Window to Use */
  12089.         int insd;                /* New Color For Window Insides */
  12090.         int bord;                /* New Color For Window Border */
  12091.  
  12092.         Created: 09/14/86        Last Updated: 09/14/86
  12093.  
  12094.         Author: Bob Pritchett         Source (C/A): C
  12095.  
  12096.         Located in: COUTPUT.OBJ
  12097.  
  12098.         Requires: Nothing.
  12099.  
  12100.         Description:
  12101.  
  12102.         This function is the equivalent of wcolor() except that it has an 
  12103.         affect  only  on the specified window.   It does not  change  the 
  12104.         current color of the windows, but rather all subsequent output in 
  12105.         that window.
  12106.  
  12107.         Compiler Specifics:
  12108.  
  12109.         Compiled with MSC.  See window notes.
  12110.  
  12111.         Return Value:
  12112.  
  12113.         Nothing.
  12114.  
  12115.         See Also:
  12116.  
  12117.         wcolor() wcolor()
  12118.  
  12119.         Example:
  12120.  
  12121.         #include <color.h>
  12122.  
  12123.         int w;
  12124.  
  12125.         wcolor(RED_F,BLU_F);
  12126.  
  12127.         w = wopen(10,10,20,20,1);
  12128.         wprint(w,"This is some output.\n");     /* In red. */
  12129.         wscolor(w,GRN_F,WHT_F);
  12130.         wprint(w,"This text is in green, and any border manipualtion\n");
  12131.         wprint(w,"will be in white from now on, in this window.\n");
  12132.  
  12133.  
  12134.  
  12135.  
  12136.  
  12137.  
  12138.  
  12139.  
  12140.  
  12141.  
  12142.  
  12143.  
  12144.  
  12145.  
  12146.  
  12147.  
  12148.                                                              wscroll
  12149.         Summary:
  12150.  
  12151.         int wscroll(num,dir,tms)
  12152.         int num;                 /* Number of Window to Use */
  12153.         int dir;                 /* Direction to Scroll in */
  12154.         int tms;                 /* Number of Lines to Scroll */
  12155.  
  12156.         Created: 03/03/86        Last Updated: 03/03/86
  12157.  
  12158.         Author: Bob Pritchett         Source (C/A): C
  12159.  
  12160.         Located in: COUTPUT.OBJ
  12161.  
  12162.         Requires: Nothing.
  12163.  
  12164.         Description:
  12165.  
  12166.         This  function will scroll the specified window tms lines in  the 
  12167.         specified  window.   The  direction is 0 for up,  or 1 for  down.  
  12168.         Specifying 0 lines will clear the window.
  12169.  
  12170.         Compiler Specifics:
  12171.  
  12172.         Compiled with MSC.  See window notes.
  12173.  
  12174.         Return Value:
  12175.  
  12176.         Nothing.
  12177.  
  12178.         See Also:
  12179.  
  12180.         scroll()
  12181.  
  12182.         Example:
  12183.  
  12184.         wscroll(win,0,1);
  12185.  
  12186.  
  12187.  
  12188.  
  12189.  
  12190.  
  12191.  
  12192.  
  12193.  
  12194.  
  12195.  
  12196.  
  12197.  
  12198.  
  12199.  
  12200.  
  12201.  
  12202.  
  12203.  
  12204.  
  12205.  
  12206.  
  12207.  
  12208.  
  12209.  
  12210.  
  12211.  
  12212.  
  12213.  
  12214.                                                               wtitle
  12215.         Summary:
  12216.  
  12217.         int wtitle(win,str,val);
  12218.         int win;                 /* Window to Use */
  12219.         char *str;               /* Title to Use */
  12220.         int val;                 /* Title Location */
  12221.  
  12222.         Created: 03/03/86        Last Updated: 03/03/86
  12223.  
  12224.         Author: Bob Pritchett         Source (C/A): C
  12225.  
  12226.         Located in: COUTPUT.OBJ
  12227.  
  12228.         Requires: wprint()
  12229.  
  12230.         Description:
  12231.  
  12232.         This  routine  will  place a string along the top border  of  the 
  12233.         specified  window in either the center,  on the left,  or on  the 
  12234.         right.  To specify the location, val is 0, center, 1, left, or 2, 
  12235.         right.  The window's border attribute is used.
  12236.  
  12237.         Compiler Specifics:
  12238.  
  12239.         None.
  12240.  
  12241.         Return Value:
  12242.  
  12243.         Nothing.
  12244.  
  12245.         See Also:
  12246.  
  12247.         wmessage()
  12248.  
  12249.         Example:
  12250.  
  12251.         wtitle(w,"[ Window 1 ]",1);
  12252.  
  12253.  
  12254.  
  12255.  
  12256.  
  12257.  
  12258.  
  12259.  
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.  
  12270.  
  12271.  
  12272.  
  12273.  
  12274.  
  12275.  
  12276.  
  12277.  
  12278.  
  12279.  
  12280.                                                               wvline
  12281.         Summary:
  12282.  
  12283.         int wvline(wind,col);
  12284.         int wind;                /* Window to Use */
  12285.         int col;                 /* Column for the Line */
  12286.  
  12287.         Created: 03/03/86        Last Updated: 03/03/86
  12288.  
  12289.         Author: Bob Pritchett         Source (C/A): C
  12290.  
  12291.         Located in: COUTPUT.OBJ
  12292.  
  12293.         Requires: cvline() putchci() gotoxy()
  12294.  
  12295.         Description:
  12296.  
  12297.         This  function calls cvline() with the correct parameters to draw 
  12298.         a vertical line in the specified window.   The correct colors and 
  12299.         border styles are used.
  12300.  
  12301.         Compiler Specifics:
  12302.  
  12303.         None.
  12304.  
  12305.         Return Value:
  12306.  
  12307.         Nothing.
  12308.  
  12309.         See Also:
  12310.  
  12311.         cvline() whline()
  12312.  
  12313.         Example:
  12314.  
  12315.         #include <color.h>       /* Just for the colors... */
  12316.  
  12317.         int w;
  12318.  
  12319.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  12320.  
  12321.         wvline(w,10);        /* Draws a line down the box */
  12322.  
  12323.  
  12324.  
  12325.  
  12326.  
  12327.  
  12328.  
  12329.  
  12330.  
  12331.  
  12332.  
  12333.  
  12334.  
  12335.  
  12336.  
  12337.  
  12338.  
  12339.  
  12340.  
  12341.  
  12342.  
  12343.  
  12344.  
  12345.  
  12346.                                                             zero_tmr
  12347.         Summary:
  12348.  
  12349.         void zero_tmr(x);
  12350.         int x;                   /* The Number of the Counter to Use */
  12351.  
  12352.         Created: 01/03/87        Last Updated: 01/03/87
  12353.  
  12354.         Author: Dave Perras           Source (C/A): C
  12355.  
  12356.         Located in: TIMERS.C TIMERS.OBJ
  12357.  
  12358.         Requires: get_timer()
  12359.  
  12360.         Description:
  12361.  
  12362.         This  function  sets the specified timer to the current value  of 
  12363.         the real time clock, effectively 'zeroing' the counter.
  12364.  
  12365.         Compiler Specifics:
  12366.  
  12367.         None.
  12368.  
  12369.         Return Value:
  12370.  
  12371.         Nothing is returned.
  12372.  
  12373.         See Also:
  12374.  
  12375.         get_timer() start_tmr() stop_tmr() read_tmr() reset_tmr() timer()
  12376.         init_tmr()
  12377.  
  12378.         Example:
  12379.  
  12380.         init_tmr();              /* Initialize Timers */
  12381.  
  12382.         start_tmr(5);            /* Start timer number 5. */
  12383.  
  12384.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  12385.                   /* The above statement does not stop the timer. */
  12386.  
  12387.         zero_tmr(5);             /* Zero the timer to the current */
  12388.                                  /* time. */
  12389.  
  12390.  
  12391.  
  12392.  
  12393.  
  12394.  
  12395.  
  12396.  
  12397.  
  12398.  
  12399.  
  12400.  
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406.  
  12407.  
  12408.  
  12409.  
  12410.  
  12411.  
  12412.                                                               CheckC   
  12413.         Summary:
  12414.  
  12415.         Created: 12/25/85        Last Updated: 09/16/86
  12416.  
  12417.         Author: Bob Pritchett         Source: C
  12418.  
  12419.         Syntax: CheckC [/A] <source> [<source>...]
  12420.  
  12421.         Documentation:
  12422.  
  12423.                                      CheckC
  12424.  
  12425.                              A Small C Code Checker.
  12426.  
  12427.                        Copyright 1985, 1986 Bob Pritchett
  12428.                              New Dimension Software
  12429.  
  12430.                            Version 2.1 - Documentation
  12431.  
  12432.              CheckC  has  come quite some distance since version 1.3  was 
  12433.         released with the first version of C Spot Run.   It now  supports 
  12434.         an  analysis  mode  with  full  error  recovery,  and  is  better 
  12435.         implemented over all.
  12436.              CheckC  started  as a simple bracket counter  type  program, 
  12437.         checking to make sure brackets,  quotes, etc, all were present in 
  12438.         even  numbers.   And  the present time it can analyze a file  and 
  12439.         report syntactical errors to,  on average,  within two lines, and 
  12440.         then recover in order to find any subsequent errors, assuming the 
  12441.         one just found was corrected.
  12442.              CheckC may be invoked with as many file names as DOS allows, 
  12443.         and  will  check  each one in order for  matching  pairs  of  all 
  12444.         relevant  characters,  quotes,  and comments.   The real power is 
  12445.         displayed  when  it is invoked with a /A as the  first  argument, 
  12446.         followed by the file names.   In this case a rather comprehensive 
  12447.         (for a character oriented program) syntax check will be executed, 
  12448.         with  errors  and problem spots reported in the  format  of  line 
  12449.         number followed by error description.
  12450.              CheckC  knows  when to and when not to be  checking  syntax.  
  12451.         While  in comments,  everything but an end of comment is ignored.  
  12452.         (NOTE!   CheckC does NOT allow for nested comments, in accordance 
  12453.         with  K&R.)  The same applies to quoted strings,  with the  added 
  12454.         contitions  that CheckC is aware of when to ignore quotes (as  in 
  12455.         escape sequences), and when they may be missing.  (When a newline 
  12456.         is  found  in a quoted string a warning is  generated  indicating 
  12457.         that  further  analysis  may be incorrect.)   Single  quotes  are 
  12458.         processed  under  the  rule that only one  character  is  allowed 
  12459.         between  them,  the maximum physical characters being two in  the 
  12460.         case of an escape sequence. 
  12461.              CheckC's analysis will sometimes refer to errors  concerning 
  12462.         functions or blocks.  CheckC refers to any code one bracket level 
  12463.         deep  as  a  function,  and any code several brackets deep  as  a 
  12464.         block.   Unfortunatly,  as  you  may open a  virtually  unlimited 
  12465.         number  of blocks,  a missing open bracket can only  be  detected 
  12466.         when the number of closing brackets exceeds the number of opening 
  12467.  
  12468.  
  12469.  
  12470.  
  12471.  
  12472.  
  12473.  
  12474.  
  12475.  
  12476.  
  12477.  
  12478.         ones.   In  such a case an error is noted,  the missing character 
  12479.         assumed,  and analysis continued.  By noting funtion vs. block in 
  12480.         the error,  and tracing structured code up from the line  number, 
  12481.         the missing (or extra) bracket can easily be found.
  12482.              Another  way  of  finding mismatched characters as  soon  as 
  12483.         possible  is  looking  for semicolons  within  them.   Anytime  a 
  12484.         semicolon  is  found  within  a  set  of  parenthesis  or  square 
  12485.         brackets,  chances are that there is a missing closing  character 
  12486.         within  a few lines of it.   (Semicolons within for()  statements 
  12487.         will not cause this error flag.)
  12488.              If a comment is left open,  causing the rest of the file  to 
  12489.         go un-analyzed,  a line number will be reported with the error at 
  12490.         when  end  of file is reached.   This is the line on  which  last 
  12491.         found  comment  was opened,  and from there the error  should  be 
  12492.         obvious.
  12493.              On the whole,  CheckC's errors are self explanatory,  and in 
  12494.         all  testing so far it has been perfectly accurate.   It is  much 
  12495.         more  likely  to report a few extra errors when recovery  is  not 
  12496.         complete  then  to  miss any.   Without the analysis mode  it  is 
  12497.         severly crippled,  and it is recommended that you use the /A flag 
  12498.         with everything unless your code varies from K&R enough to  cause 
  12499.         false errors.
  12500.              I'd   appreciate  it  if  you  could  report  any  bugs   or 
  12501.         suggestions, and let me know how you like it.  Good luck!
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515.  
  12516.  
  12517.  
  12518.  
  12519.  
  12520.  
  12521.  
  12522.  
  12523.  
  12524.  
  12525.  
  12526.  
  12527.  
  12528.  
  12529.  
  12530.  
  12531.  
  12532.  
  12533.  
  12534.  
  12535.  
  12536.  
  12537.  
  12538.  
  12539.  
  12540.  
  12541.  
  12542.  
  12543.  
  12544.                                                                FLine   
  12545.         Summary:
  12546.  
  12547.         Created: 03/02/86        Last Updated: 03/03/86
  12548.  
  12549.         Author: Bob Pritchett         Source: C
  12550.  
  12551.         Syntax: FLine <source> <dest>
  12552.  
  12553.         Documentation:
  12554.  
  12555.                                       FLine
  12556.  
  12557.                         A Structured Programming Utility
  12558.  
  12559.                           Copyright 1986 Bob Pritchett
  12560.                              New Dimension Software
  12561.  
  12562.                            Version 1.1 - Documentation
  12563.  
  12564.              FLine  is  a programming tool that goes through source  code 
  12565.         and  places  all lines beginning with a non-whitespace  character 
  12566.         into the specified output file.   This creates a useful reference 
  12567.         file  containing a list of all function  declarations,  including 
  12568.         arguments,   global   variables,   comments,   and  pre-processor 
  12569.         directives.   (This assumes, of course that you indent the actual 
  12570.         code within your source file.)
  12571.              FLine is called as:
  12572.  
  12573.         FLine <source> <dest>
  12574.  
  12575.              Where  <source> is the source code to process and <dest>  is 
  12576.         the name of the file to place the output in.   Note that whatever 
  12577.         is in <dest> is erased and replaced with FLine's output.
  12578.  
  12579.  
  12580.  
  12581.  
  12582.  
  12583.  
  12584.  
  12585.  
  12586.  
  12587.  
  12588.  
  12589.  
  12590.  
  12591.  
  12592.  
  12593.  
  12594.  
  12595.  
  12596.  
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602.  
  12603.  
  12604.  
  12605.  
  12606.  
  12607.  
  12608.  
  12609.  
  12610.                                                         CSRSHELL.ASM   
  12611.         Summary:
  12612.  
  12613.         Created: 09/10/86        Last Updated: 09/10/86
  12614.  
  12615.         Author: Various
  12616.  
  12617.         Documentation:
  12618.  
  12619.              CSRShell.ASM  is a small file that contains a complete shell 
  12620.         for writing assembly interfaces to Microsoft C.  (In the planning 
  12621.         stages   are  additions  for  contitional  assembly   for   other 
  12622.         compilers.)   Things  such  as large and  small  model  assembly, 
  12623.         argument   reading,   stack  setup  and  more  are  included  and 
  12624.         explained.
  12625.              To make use of the shell, copy it into another appropriately
  12626.         named  file,   insert  the  correct  function  name  over  _shell 
  12627.         (remember to preserve the underscore,  MSC needs it), replace the 
  12628.         two  dummy argument reads with your assembly  source,  and  place 
  12629.         your data in the appropriate place.
  12630.  
  12631.  
  12632.  
  12633.  
  12634.  
  12635.  
  12636.  
  12637.  
  12638.  
  12639.  
  12640.  
  12641.  
  12642.  
  12643.  
  12644.  
  12645.  
  12646.  
  12647.  
  12648.  
  12649.  
  12650.  
  12651.  
  12652.  
  12653.  
  12654.  
  12655.  
  12656.  
  12657.  
  12658.  
  12659.  
  12660.  
  12661.  
  12662.  
  12663.  
  12664.  
  12665.  
  12666.  
  12667.  
  12668.  
  12669.  
  12670.  
  12671.  
  12672.  
  12673.  
  12674.  
  12675.  
  12676.                                                              COLOR.H   
  12677.         Summary:
  12678.  
  12679.         Created: 04/14/86        Last Updated: 09/20/86
  12680.  
  12681.         Author: Bob Pritchett
  12682.  
  12683.         Description:
  12684.  
  12685.         This  include  file  contains the define statements for  all  the 
  12686.         color attributes possible in text.   The colors are listed with a 
  12687.         three  letter name followed by a _ and F or B signifying fore  or 
  12688.         background attribute.   To get a full attribute,  add a fore  and 
  12689.         background color.  (BLU_F+RED_B)
  12690.  
  12691.         Also  included  are definitions for BOLD (which is  added  to  an 
  12692.         attribute to intensify it),  NORMAL (white on black), and several 
  12693.         others.   (NOTE:   Some  of  the  attriutes  are  for  monochrome 
  12694.         displays  only,  for example,  UNDERLINE shows as blue on a color 
  12695.         screen, and REVERSE as black on white.)
  12696.  
  12697.         For a list of all the colors and their abbreviations look at  the 
  12698.         header file.
  12699.  
  12700.  
  12701.  
  12702.  
  12703.  
  12704.  
  12705.  
  12706.  
  12707.  
  12708.  
  12709.  
  12710.  
  12711.  
  12712.  
  12713.  
  12714.  
  12715.  
  12716.  
  12717.  
  12718.  
  12719.  
  12720.  
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.                                                             CSRDOS.H   
  12743.         Summary:
  12744.  
  12745.         Created: 04/04/86        Last Updated: 04/04/86
  12746.  
  12747.         Author: Bob Pritchett and Alan Losoff
  12748.  
  12749.         Description:
  12750.  
  12751.         This  header  file  contains structures  and  #define  statements 
  12752.         needed by functions accessing DOS 2.0 functions.
  12753.  
  12754.  
  12755.  
  12756.  
  12757.  
  12758.  
  12759.  
  12760.  
  12761.  
  12762.  
  12763.  
  12764.  
  12765.  
  12766.  
  12767.  
  12768.  
  12769.  
  12770.  
  12771.  
  12772.  
  12773.  
  12774.  
  12775.  
  12776.  
  12777.  
  12778.  
  12779.  
  12780.  
  12781.  
  12782.  
  12783.  
  12784.  
  12785.  
  12786.  
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.  
  12803.  
  12804.  
  12805.  
  12806.  
  12807.  
  12808.                                                            CSRMENU.H   
  12809.         Summary:
  12810.  
  12811.         Created: 08/08/86        Last Updated: 08/16/86
  12812.  
  12813.         Author: Bob Pritchett
  12814.  
  12815.         Description:
  12816.  
  12817.         This header file contains the typdef statement to create the MENU 
  12818.         data  type needed for the function pmenu().   The structure is as 
  12819.         follows:
  12820.  
  12821.         typedef struct _mnu
  12822.          {
  12823.           char title[23];               /* Title of the menu */
  12824.           int type;                     /* Style of the border */
  12825.           int border;                   /* Window's border color */
  12826.           int normal;                   /* Color for unhighlighted items */
  12827.           int bar;                      /* Color for the highlight bar */
  12828.           int row;                      /* Upper left window row */
  12829.           int col;                      /* Upper left window column */
  12830.           int num;                      /* Number of enteries */
  12831.           struct _ent
  12832.            {
  12833.             char text[25];              /* Item's name */
  12834.             int value;                  /* Return value for item / -1 Static */
  12835.            } entry[MAX_ENTRIES];
  12836.          } *MENU;
  12837.  
  12838.  
  12839.  
  12840.  
  12841.  
  12842.  
  12843.  
  12844.  
  12845.  
  12846.  
  12847.  
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.  
  12860.  
  12861.  
  12862.  
  12863.  
  12864.  
  12865.  
  12866.  
  12867.  
  12868.  
  12869.  
  12870.  
  12871.  
  12872.  
  12873.  
  12874.                                                            CSRMISC.H
  12875.         Summary:
  12876.  
  12877.         Created: 04/20/86        Last Updated: 12/05/86
  12878.  
  12879.         Author: Bob Pritchett
  12880.  
  12881.         Description:
  12882.  
  12883.         This header file contains dummy(),  iswild(),  and the defintions 
  12884.         for   the  min()  and  max()  macros  which  were  ommitted  from 
  12885.         Microsoft's standard library.
  12886.  
  12887.  
  12888.  
  12889.  
  12890.  
  12891.  
  12892.  
  12893.  
  12894.  
  12895.  
  12896.  
  12897.  
  12898.  
  12899.  
  12900.  
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.  
  12923.  
  12924.  
  12925.  
  12926.  
  12927.  
  12928.  
  12929.  
  12930.  
  12931.  
  12932.  
  12933.  
  12934.  
  12935.  
  12936.  
  12937.  
  12938.  
  12939.  
  12940.                                                           CSRMODES.H
  12941.         Summary:
  12942.  
  12943.         Created: 05/05/86        Last Updated: 05/05/86
  12944.  
  12945.         Author: Bob Pritchett
  12946.  
  12947.         Description:
  12948.  
  12949.         This  header  file contains define statements for  the  different 
  12950.         video modes.  It is intended to be used with set_mode().
  12951.  
  12952.  
  12953.  
  12954.  
  12955.  
  12956.  
  12957.  
  12958.  
  12959.  
  12960.  
  12961.  
  12962.  
  12963.  
  12964.  
  12965.  
  12966.  
  12967.  
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.  
  12978.  
  12979.  
  12980.  
  12981.  
  12982.  
  12983.  
  12984.  
  12985.  
  12986.  
  12987.  
  12988.  
  12989.  
  12990.  
  12991.  
  12992.  
  12993.  
  12994.  
  12995.  
  12996.  
  12997.  
  12998.  
  12999.  
  13000.  
  13001.  
  13002.  
  13003.  
  13004.  
  13005.  
  13006.                                                           CSRSOUND.H
  13007.         Summary:
  13008.  
  13009.         Created: 08/07/86        Last Updated: 08/07/86
  13010.  
  13011.         Author: Bob Pritchett (Data from Norton's Book.)
  13012.  
  13013.         This  header  file  contains note definitions for  use  with  the 
  13014.         sound()  routine in CSRSOUND.OBJ. 
  13015.  
  13016.  
  13017.  
  13018.  
  13019.  
  13020.  
  13021.  
  13022.  
  13023.  
  13024.  
  13025.  
  13026.  
  13027.  
  13028.  
  13029.  
  13030.  
  13031.  
  13032.  
  13033.  
  13034.  
  13035.  
  13036.  
  13037.  
  13038.  
  13039.  
  13040.  
  13041.  
  13042.  
  13043.  
  13044.  
  13045.  
  13046.  
  13047.  
  13048.  
  13049.  
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.  
  13059.  
  13060.  
  13061.  
  13062.  
  13063.  
  13064.  
  13065.  
  13066.  
  13067.  
  13068.  
  13069.  
  13070.  
  13071.  
  13072.                                                            CSRTIME.H
  13073.         Summary:
  13074.  
  13075.         Created: 05/05/86        Last Updated: 04/20/86
  13076.  
  13077.         Author: Bob Pritchett
  13078.  
  13079.         This  file contains two static char * arrays containing the names 
  13080.         of the days of the week and the days of the month.   The days  of 
  13081.         the week start with Sunday, the months start with a null and then 
  13082.         January as the second entry,  element one, to allow compatibility 
  13083.         with the way DOS returns the date.
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.  
  13096.  
  13097.  
  13098.  
  13099.  
  13100.  
  13101.  
  13102.  
  13103.  
  13104.  
  13105.  
  13106.  
  13107.  
  13108.  
  13109.  
  13110.  
  13111.  
  13112.  
  13113.  
  13114.  
  13115.  
  13116.  
  13117.  
  13118.  
  13119.  
  13120.  
  13121.  
  13122.  
  13123.  
  13124.  
  13125.  
  13126.  
  13127.  
  13128.  
  13129.  
  13130.  
  13131.  
  13132.  
  13133.  
  13134.  
  13135.  
  13136.  
  13137.  
  13138.                                                             ERRORS.H
  13139.         Summary:
  13140.  
  13141.         Created: 05/05/86        Last Updated: 05/05/86
  13142.  
  13143.         Author: Bob Pritchett (Data from Norton's Book.)
  13144.  
  13145.         This  file  contains  a static char * array  containing  the  DOS 
  13146.         errors  returned in AX after a DOS function call.   These  errors 
  13147.         are for DOS 2.X alone, and do not apply to DOS 3.X extended error 
  13148.         codes.  Error descriptions start with element one.
  13149.  
  13150.  
  13151.  
  13152.  
  13153.  
  13154.  
  13155.  
  13156.  
  13157.  
  13158.  
  13159.  
  13160.  
  13161.  
  13162.  
  13163.  
  13164.  
  13165.  
  13166.  
  13167.  
  13168.  
  13169.  
  13170.  
  13171.  
  13172.  
  13173.  
  13174.  
  13175.  
  13176.  
  13177.  
  13178.  
  13179.  
  13180.  
  13181.  
  13182.  
  13183.  
  13184.  
  13185.  
  13186.  
  13187.  
  13188.  
  13189.  
  13190.  
  13191.  
  13192.  
  13193.  
  13194.  
  13195.  
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.                                                               SKEY.H   
  13205.         Summary:
  13206.  
  13207.         Created: 02/22/86        Last Updated: 02/22/86
  13208.  
  13209.         Author: Bob Pritchett (Data from Norton's Book.)
  13210.  
  13211.         Description:
  13212.  
  13213.         This  header  file  contains #define statements for  all  of  the 
  13214.         special keys and combinations on the keyboard.   These values are 
  13215.         those returned as extened codes,  after a null is read.  They are 
  13216.         in the basic format of KEY1KEY2,  or simply Fx for function keys.  
  13217.         (Note:   Function  keys are numbered through 40,  1-10 are normal 
  13218.         keys,  11-20 are shift keys,  21-30 are ctrl keys,  and 31-40 are 
  13219.         alt keys.  As in Shift-F2 returns F12.)
  13220.  
  13221.  
  13222.  
  13223.  
  13224.  
  13225.  
  13226.  
  13227.  
  13228.  
  13229.  
  13230.  
  13231.  
  13232.  
  13233.  
  13234.  
  13235.  
  13236.  
  13237.  
  13238.  
  13239.  
  13240.  
  13241.  
  13242.  
  13243.  
  13244.  
  13245.  
  13246.  
  13247.  
  13248.  
  13249.  
  13250.  
  13251.  
  13252.  
  13253.  
  13254.  
  13255.  
  13256.  
  13257.  
  13258.  
  13259.  
  13260.  
  13261.  
  13262.  
  13263.  
  13264.  
  13265.  
  13266.  
  13267.                           C Spot Run - Documentation
  13268.  
  13269.  
  13270.                         Appendix A - Updating the Library
  13271.  
  13272.              The  C Spot Run routine library is constantly being added to 
  13273.         as  we receive contributions and write more  routines  ourselves.  
  13274.         In  the interest of saving time and space,  library updates  will 
  13275.         come in one of two forms.
  13276.              First,   small  collections  of  new  routines,   or  single 
  13277.         routines,  will be placed in archives along with a single page of 
  13278.         documentation  and  distributed via BBSs.  Registered users  will 
  13279.         receive information about new updates or a copy of those updates.  
  13280.         When  you  receive an update archive you simply place  the  files 
  13281.         into  your  library  or  linking  directory  and  print  out  the 
  13282.         documentation page,  which is then inserted in alphabetical order 
  13283.         into  the library description section of this manual.   (This  is 
  13284.         why  those pages are not numbered and we recommend  storing  your 
  13285.         manual in a three ring binder.)  
  13286.              Second,   major  updates  to  the  entire  library  will  be 
  13287.         distributed  in  archives  containing all  the  routines,  and  a 
  13288.         totally new version of the complete manual.   These updates  will 
  13289.         be on new version numbers.
  13290.              To  keep  on top of changes to the library it  is  suggested 
  13291.         that  you  read  issues of the C Spot Run  Newsletter  as  it  is 
  13292.         released,  and  make an occasional call to the support BBS  where 
  13293.         the  latest  version  of the library and  newsletter  are  always 
  13294.         available.
  13295.  
  13296.  
  13297.  
  13298.  
  13299.  
  13300.  
  13301.  
  13302.  
  13303.  
  13304.  
  13305.  
  13306.  
  13307.  
  13308.  
  13309.  
  13310.  
  13311.  
  13312.  
  13313.  
  13314.  
  13315.  
  13316.  
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.  
  13331.  
  13332.  
  13333.                           C Spot Run - Documentation
  13334.  
  13335.  
  13336.                          Appendix B - Contacting Authors
  13337.  
  13338.              Each  description  page mentions the name of the  author  of 
  13339.         that routine, utility, or aid.  If for some reason you would like 
  13340.         to contact that author you may check the following directory  for 
  13341.         addresses  and  possibly  phone  numbers.   (NOTE:   All  of  the 
  13342.         following   authors   voluntarily  placed  their  addresses   and 
  13343.         sometimes  their  phone numbers in  this  directory.   They  have 
  13344.         indicated a willingness to answer questions by doing this, but we 
  13345.         ask you to be considerate with you calling hours and keep in mind 
  13346.         differences in time zones.)
  13347.  
  13348.              Mongelluzzo, Philip A.   (203) 574-2326 - Voice
  13349.                273 Windy Drive        (203) 271-1579 - Data (300/1200B)
  13350.                Waterbury, CT  06705
  13351.  
  13352.              Pritchett, Bob           (609) 424-2595 - Voice
  13353.                23 Pawtucket Drive     (609) 354-9259 - Data (300-2400B)
  13354.                Cherry Hill, NJ  08003       FidoNet: 107/414
  13355.  
  13356.              Roukas, George
  13357.                C/O Pinelands BBS      (609) 354-9259 - Data (300-2400B)
  13358.  
  13359.  
  13360.  
  13361.  
  13362.  
  13363.  
  13364.  
  13365.  
  13366.  
  13367.  
  13368.  
  13369.  
  13370.  
  13371.  
  13372.  
  13373.  
  13374.  
  13375.  
  13376.  
  13377.  
  13378.  
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.  
  13391.  
  13392.  
  13393.  
  13394.  
  13395.  
  13396.  
  13397.  
  13398.  
  13399.                           C Spot Run - Documentation
  13400.  
  13401.  
  13402.                   Appendix C - Submitting Routines or Utilities
  13403.  
  13404.              All submissions to the routine library or utility collection 
  13405.         should  be  made using the Routine/Utility Submission  Form,  and 
  13406.         should be sent to the address on that form.   Please do not  make 
  13407.         additions to the library or utility collection on your own,  this 
  13408.         creates a problem and complicates the distribution.   
  13409.              In   addition  to  the  following  form  please  enclose   a 
  13410.         description  of the routine or utility,  preferably on an IBM  PC 
  13411.         disk  (360K  or  1.2Meg).   Please make this description  in  the 
  13412.         appropriate  format as specified in sections 4.1 and 4.2 of  this 
  13413.         manual.
  13414.  
  13415.  
  13416.  
  13417.  
  13418.  
  13419.  
  13420.  
  13421.  
  13422.  
  13423.  
  13424.  
  13425.  
  13426.  
  13427.  
  13428.  
  13429.  
  13430.  
  13431.  
  13432.  
  13433.  
  13434.  
  13435.  
  13436.  
  13437.  
  13438.  
  13439.  
  13440.  
  13441.  
  13442.  
  13443.  
  13444.  
  13445.  
  13446.  
  13447.  
  13448.  
  13449.  
  13450.  
  13451.  
  13452.  
  13453.  
  13454.  
  13455.  
  13456.  
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.                           C Spot Run - Documentation
  13466.  
  13467.  
  13468.                   Appendix D - History of Versions and Changes
  13469.  
  13470.              01/10/87  - Version  2.0  of the library released  with  new 
  13471.         features and a new newsletter.
  13472.  
  13473.              10/13/86  - Limited release of version 1.1 of the library to 
  13474.         some  registered users.   Most bugs fixed,  manual  updated,  new 
  13475.         routines.
  13476.  
  13477.              06/27/86 - First issue of the newsletter released.
  13478.  
  13479.              05/05/86 - Version 1.0 of the library released.
  13480.  
  13481.  
  13482.  
  13483.  
  13484.  
  13485.  
  13486.  
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.  
  13496.  
  13497.  
  13498.  
  13499.  
  13500.  
  13501.  
  13502.  
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.  
  13509.  
  13510.  
  13511.  
  13512.  
  13513.  
  13514.  
  13515.  
  13516.  
  13517.  
  13518.  
  13519.  
  13520.  
  13521.  
  13522.  
  13523.  
  13524.  
  13525.  
  13526.  
  13527.  
  13528.  
  13529.  
  13530.  
  13531.                           C Spot Run - Documentation
  13532.  
  13533.  
  13534.                             Appendix E - ASCII Table
  13535.  
  13536.                  Dec  Hex  Chr    Dec  Hex  Chr    Dec  Hex  Chr
  13537.                  ---  ---  ---    ---  ---  ---    ---  ---  ---
  13538.                    0   00  NUL     43   2B   +      86   56   V
  13539.                    1   01  SOH     44   2C   ,      87   57   W
  13540.                    2   02  STX     45   2D   -      88   58   X
  13541.                    3   03  ETX     46   2E   .      89   59   Y
  13542.                    4   04  EOT     47   2F   /      90   5A   Z
  13543.                    5   05  ENQ     48   30   0      91   5B   [
  13544.                    6   06  ACK     49   31   1      92   5C   \
  13545.                    7   07  BEL     50   32   2      93   5D   ]
  13546.                    8   08  BS      51   33   3      94   5E   ^
  13547.                    9   09  HT      52   34   4      95   5F   _
  13548.                   10   0A  LF      53   35   5      96   60   `
  13549.                   11   0B  VT      54   36   6      97   61   a
  13550.                   12   0C  FF      55   37   7      98   62   b
  13551.                   13   0D  CR      56   38   8      99   63   c
  13552.                   14   0E  SO      57   39   9     100   64   d
  13553.                   15   0F  SI      58   3A   :     101   65   e
  13554.                   16   10  DLE     59   3B   ;     102   66   f
  13555.                   17   11  DC1     60   3C   <     103   67   g
  13556.                   18   12  DC2     61   3D   =     104   68   h
  13557.                   19   13  DC3     62   3E   >     105   69   i
  13558.                   20   14  DC4     63   3F   ?     106   6A   j
  13559.                   21   15  NAK     64   40   @     107   6B   k
  13560.                   22   16  SYN     65   41   A     108   6C   l
  13561.                   23   17  ETB     66   42   B     109   6D   m
  13562.                   24   18  CAN     67   43   C     110   6E   n
  13563.                   25   19  EM      68   44   D     111   6F   o
  13564.                   26   1A  SUB     69   45   E     112   70   p
  13565.                   27   1B  ESC     70   46   F     113   71   q
  13566.                   28   1C  FS      71   47   G     114   72   r
  13567.                   29   1D  GS      72   48   H     115   73   s
  13568.                   30   1E  RS      73   49   I     116   74   t
  13569.                   31   1F  US      74   4A   J     117   75   u
  13570.                   32   20          75   4B   K     118   76   v
  13571.                   33   21   !      76   4C   L     119   77   w
  13572.                   34   22   "      77   4D   M     120   78   x
  13573.                   35   23   #      78   4E   N     121   79   y
  13574.                   36   24   $      79   4F   O     122   7A   z
  13575.                   37   25   %      80   50   P     123   7B   {
  13576.                   38   26   &      81   51   Q     124   7C   |
  13577.                   39   27   '      82   52   R     125   7D   }
  13578.                   40   28   (      83   53   S     126   7E   ~
  13579.                   41   29   )      84   54   T     127   7F  DEL
  13580.                   42   2A   *      85   55   U
  13581.  
  13582.  
  13583.  
  13584.  
  13585.  
  13586.  
  13587.  
  13588.  
  13589.  
  13590.  
  13591.  
  13592.  
  13593.  
  13594.  
  13595.  
  13596.  
  13597.                           C Spot Run - Documentation
  13598.  
  13599.  
  13600.                         Appendix F - Window Border Styles
  13601.  
  13602.  
  13603.                           Type 1                Type 2
  13604.  
  13605.                         +--------+            +========+  
  13606.                         |        |            |        |  
  13607.                         +--------+            :========:  
  13608.                         |        |            |        |  
  13609.                         +--------+            +========+  
  13610.  
  13611.  
  13612.                           Type 3                Type 4
  13613.  
  13614.                         ++======++            ++------++  
  13615.                         ||      ||            ||      ||  
  13616.                         |:======:|            |+------+|  
  13617.                         ||      ||            ||      ||  
  13618.                         ++======++            ++------++  
  13619.  
  13620.  
  13621.                                      Type 5
  13622.  
  13623.                     The actual plus and minus characters will
  13624.                   be used, resulting in a display identical to
  13625.                 the non graphic representation of type number 1.
  13626.  
  13627.  
  13628.                                Any Other Character
  13629.  
  13630.                    If any other character is used as the type
  13631.               argument, that character will be used for the border.
  13632.  
  13633.  
  13634.  
  13635.  
  13636.  
  13637.  
  13638.  
  13639.  
  13640.  
  13641.  
  13642.  
  13643.  
  13644.  
  13645.  
  13646.  
  13647.  
  13648.  
  13649.  
  13650.  
  13651.  
  13652.  
  13653.  
  13654.  
  13655.  
  13656.  
  13657.  
  13658.  
  13659.  
  13660.  
  13661.  
  13662.  
  13663.                           C Spot Run - Documentation
  13664.  
  13665.  
  13666.                               Quick Reference Chart
  13667.  
  13668.         Control-Break Routines
  13669.         ----------------------------------------
  13670.         cbcapt()       cbrest()
  13671.  
  13672.         Cursor Control Routines
  13673.         ----------------------------------------
  13674.         current_page() cursor_off()   cursor_on()    cursor_read()
  13675.         cursor_size()  gotoxy()       restore_cursor()
  13676.         save_cursor()
  13677.  
  13678.         Date Manipulation Routines
  13679.         ----------------------------------------
  13680.         chk_date()     date_sn()      day_of_year()  dt_diff()
  13681.         isleap()       month_day()    sn_date()      valid_date()
  13682.  
  13683.         Disk Drive Routines
  13684.         ----------------------------------------
  13685.         dirwin()       ffirst()       fnext()        get_drive()
  13686.         num_drives()   set_drive()
  13687.  
  13688.         Field Input Routines
  13689.         ----------------------------------------
  13690.         cfield()       fchar()        fcolor()       ffill()
  13691.         finptint()     finptintd()    finptintr()    finptintrd()
  13692.         finptstr()     finptstrd()    finptstre()    finptstred()
  13693.         finptyn()      finptynd()
  13694.  
  13695.         Graphics Routines
  13696.         ----------------------------------------
  13697.         gback()        gbox()         gcircle()      gdot()
  13698.         gfbox()        ginit()        gline()        gpal()
  13699.  
  13700.         Input Routines
  13701.         ----------------------------------------
  13702.         inptint()      inptintd()     inptintr()     inptintrd()
  13703.         inptstr()      inptstrd()     inptyn()       inptynd()
  13704.  
  13705.         Miscellaneous Routines
  13706.         ----------------------------------------
  13707.         dosver()       getpw()        istemplate()   itofa()
  13708.         ltofa()        mcolor()       sound()        soundex()
  13709.  
  13710.         Printer Routines
  13711.         ----------------------------------------
  13712.         lprint()       lprintf()      lputchar()     print_screen()
  13713.         prtrns()
  13714.  
  13715.         Screen Control and Output Routines
  13716.         ----------------------------------------
  13717.         border()       box()          cbox()         ccenter()
  13718.         ccls()         ccputs()       center()       centerf()
  13719.         cfield()       chline()       cls()          cvline()
  13720.         message()      mscroll()      pmenu()        pop_menu()
  13721.  
  13722.  
  13723.  
  13724.  
  13725.  
  13726.  
  13727.  
  13728.  
  13729.                           C Spot Run - Documentation
  13730.  
  13731.  
  13732.         putat()        putatf()       putchc()       putchci()
  13733.         restore()      restore_screen()              save()
  13734.         save_screen()  scroll()       set_mode()     vidblt()
  13735.  
  13736.         String Routines
  13737.         ----------------------------------------
  13738.         match()        soundex()      strcen()       strght()
  13739.         strlft()       strtrm()
  13740.  
  13741.         System Clock Routines
  13742.         ----------------------------------------
  13743.         get_date()     get_dow()      get_time()     set_date()
  13744.         set_time()
  13745.  
  13746.         Timer Routines
  13747.         ----------------------------------------
  13748.         get_timer()    init_tmr()     read_tmr()     reset_tmr()
  13749.         start_tmr()    stop_tmr()     timer()        zero_tmr()
  13750.  
  13751.         Window Routines
  13752.         ----------------------------------------
  13753.         cmenu()        color()        dma()          fixcolor()
  13754.         retrace()      wactivate()    wblank()       wborder()
  13755.         wcenter()      wcenterf()     wclose()       wcloseall()
  13756.         wcls()         wcol()         wcolor()       wdelete()
  13757.         wfreeze()      wgotoxy()      whline()       whome()
  13758.         winsert()      wjump()        wmessage()     wmove()
  13759.         wopen()        wprint()       wprintf()      wputat()
  13760.         wputatf()      wputchar()     wrow()         wscolor()
  13761.         wscroll()      wtitle()       wvline()
  13762.  
  13763.         Window Field Input Routines
  13764.         ----------------------------------------
  13765.         wcfield()      wfchar()       wfcolor()      wffill()
  13766.         wfinptint()    wfinptintd()   wfinptintr()   wfinptintrd()
  13767.         wfinptstr()    wfinptstrd()   wfinptstre()   wfinptstred()
  13768.         wfinptyn()     wfinptynd()
  13769.  
  13770.         Window Input Routines
  13771.         ----------------------------------------
  13772.         winptint()     winptintd()    winptintr()    winptintrd()
  13773.         winptstr()     winptstrd()    winptyn()      winptynd()
  13774.  
  13775.  
  13776.  
  13777.  
  13778.  
  13779.  
  13780.  
  13781.  
  13782.  
  13783.  
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.                          Routine/Utility Submission Form
  13799.  
  13800.  
  13801.         Name of Routine/Utility: ___________________________________
  13802.  
  13803.         Form(s) of Submission (C/ASM/OBJ/LIB/EXE/COM): _____________
  13804.  
  13805.  
  13806.         Are you releasing this  routine/utility to the Pubic  Domain 
  13807.  
  13808.         or under another program? (PD/Program):  ___________________
  13809.  
  13810.  
  13811.         If this  release is under a voluntary contribution  program, 
  13812.  
  13813.         what is the suggested contribution? ($): ___________________
  13814.  
  13815.  
  13816.         May we put your address in the author directory? (Y/N): ____
  13817.  
  13818.                                       Your phone number? (Y/N): ____
  13819.  
  13820.                                       Your data address? (Y/N): ____
  13821.  
  13822.  
  13823.              Name: _________________________________
  13824.  
  13825.           Address: _________________________________
  13826.  
  13827.              City: _____________________ State: ____  ZIP: _________
  13828.  
  13829.             Phone: (    )     -          Hours: ____________________
  13830.  
  13831.         Source ID: _______________  CompuServe ID: _________________
  13832.  
  13833.            Data #: (    )     -          Hours: ____________________
  13834.  
  13835.          Fido Net: ____ /_____            Baud: ____________________
  13836.  
  13837.         In  submitting  this form you place  your routine or utility 
  13838.         into the C Spot Run  C Add-on and Utility Library,  and give 
  13839.         permission  for it's  use as  specified  in  Appendix  C and
  13840.         sections one  and two of this manual.
  13841.  
  13842.         Please send this form via US Mail to the following  address,
  13843.         or via modem to the accompanying FidoNet address.
  13844.  
  13845.         Don't forget the description sheets, and of course the files
  13846.         you are submitting!
  13847.  
  13848.              C Spot Run
  13849.              New Dimension Software   FidoNet 107/414
  13850.                23 Pawtucket Drive      Data: (609) 354-9259
  13851.                Cherry Hill, NJ 08003
  13852.  
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.  
  13863.  
  13864.                                User Response Form
  13865.  
  13866.  
  13867.              We  would  like to hear from you,  and would appreciate  any 
  13868.         comments,  suggestions,  and/or donations.   Even if you are  not 
  13869.         making  a  donation  or contributing to  the  library,  we  would 
  13870.         appreciate some input,  and it helps us to know if the library is 
  13871.         serving  it's intended purpose,  and gives us some information on 
  13872.         our  users.   Of course this is voluntary,  but we hope you  will 
  13873.         take the time to fill out and mail this form.
  13874.  
  13875.         How did you obtain your copy of C Spot Run? ________________
  13876.  
  13877.         ____________________________________________________________
  13878.  
  13879.  
  13880.         What,  in your  opinion, are  the most  useful  routines and 
  13881.  
  13882.         utilities? _________________________________________________
  13883.  
  13884.  
  13885.         What do you think of the documentation? ____________________
  13886.  
  13887.         ____________________________________________________________
  13888.  
  13889.  
  13890.         Are  you enclosing  a contribution, and  if so, how much and
  13891.  
  13892.         why? _______________________________________________________
  13893.  
  13894.  
  13895.         Do you have any comments and/or suggestions? _______________
  13896.  
  13897.         ____________________________________________________________
  13898.  
  13899.         ____________________________________________________________
  13900.  
  13901.  
  13902.         Would you  like to be on a possible mailing list? (Y/N) ____
  13903.  
  13904.  
  13905.              Name: _________________________________
  13906.  
  13907.           Address: _________________________________
  13908.  
  13909.              City: _____________________ State: ____  ZIP: _________
  13910.  
  13911.             Phone: (    )     -          Hours: ____________________
  13912.  
  13913.         Source ID: _______________  CompuServe ID: _________________
  13914.  
  13915.            Data #: (    )     -          Hours: ____________________
  13916.  
  13917.          Fido Net: ____ /_____            Baud: ____________________
  13918.  
  13919.  
  13920.  
  13921.  
  13922.  
  13923.  
  13924.  
  13925.  
  13926.  
  13927.  
  13928.  
  13929.  
  13930.  
  13931.            Thank you, we hope you find the C Spot Run library of use.
  13932.  
  13933.         Please send this form via US Mail to the following  address,
  13934.         or via modem to the accompanying FidoNet address.
  13935.  
  13936.  
  13937.              C Spot Run
  13938.              New Dimension Software   FidoNet 107/414
  13939.                23 Pawtucket Drive      Data: (609) 354-9259
  13940.                Cherry Hill, NJ 08003
  13941.  
  13942.  
  13943.  
  13944.  
  13945.  
  13946.  
  13947.  
  13948.  
  13949.  
  13950.  
  13951.  
  13952.  
  13953.  
  13954.  
  13955.  
  13956.  
  13957.  
  13958.  
  13959.  
  13960.  
  13961.  
  13962.  
  13963.  
  13964.  
  13965.  
  13966.  
  13967.  
  13968.  
  13969.  
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.  
  13981.  
  13982.  
  13983.  
  13984.  
  13985.  
  13986.  
  13987.  
  13988.  
  13989.  
  13990.  
  13991.  
  13992.  
  13993.  
  13994.  
  13995.  
  13996.                                    Order Form
  13997.  
  13998.              NOTE:   Users  who receive source code may not  redistribute 
  13999.         it.  The code is for your use only, and the right to redistribute 
  14000.         is  not included in the purchase.   If two or more people will be 
  14001.         using  the  source,  rather  then ordering just one  copy  please 
  14002.         contact the author about a discount on several copies.
  14003.  
  14004.  
  14005.              (  )  I would like to register as a C Spot Run User, receive 
  14006.  
  14007.         complete source code on disk, update notifications, and be placed 
  14008.  
  14009.         on  whatever mailing list may be formed.   I am enclosing  a  $50 
  14010.  
  14011.         donation.
  14012.  
  14013.  
  14014.              (   )   I would like to register as a C Spot  Run  User  and 
  14015.  
  14016.         receive  all the benfits of such status with the exception of the 
  14017.  
  14018.         source code.  I am enclosing a $10 donation.
  14019.  
  14020.  
  14021.              Name: _________________________________
  14022.  
  14023.           Address: _________________________________
  14024.  
  14025.              City: _____________________ State: ____  ZIP: _________
  14026.  
  14027.             Phone: (    )     -          Hours: ____________________
  14028.  
  14029.         Source ID: _______________  CompuServe ID: _________________
  14030.  
  14031.            Data #: (    )     -          Hours: ____________________
  14032.  
  14033.          Fido Net: ____ /_____            Baud: ____________________
  14034.  
  14035.  
  14036.              C Spot Run
  14037.              New Dimension Software   FidoNet 107/414
  14038.                23 Pawtucket Drive      Data: (609) 354-9259
  14039.                Cherry Hill, NJ 08003
  14040.  
  14041.  
  14042.  
  14043.            +--------------------  NDS USE ONLY  --------------------+
  14044.            |                                                        |
  14045.            |  Recieved:  ____ /____ /____   Sent: ____ /____ /____  |
  14046.            |                                                        |
  14047.            |             Serial Number: ________________            |
  14048.            |                                                        |
  14049.            +--------------------------------------------------------+
  14050.  
  14051.  
  14052.  
  14053.  
  14054.  
  14055.  
  14056.  
  14057.  
  14058.  
  14059.