home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR19 / LANKEY1.ZIP / LANKEY.DOC < prev    next >
Text File  |  1993-05-07  |  4KB  |  99 lines

  1. LANKEY.ZIP contains a group of functions designed to workaround the printing
  2. slowdown on non-dedicated network servers.  Since Clipper is never really
  3. "idle," the operating system never gets much time to print a spooled print
  4. job.  LANKEY forces Clipper to share time with a C function (in up to half-
  5. second time slices) when waiting for a keystroke.  During the C function, the
  6. operating system gets enough time to print at full speed.  There is no
  7. performance penalty, since both functions (Clipper and C) are interrupted by
  8. the next keystroke.  There is no need to have a special version of the
  9. program for non-dedicated network servers, since there is no performance
  10. penalty for letting the time slicing occur even on single-user machines.
  11.  
  12.  
  13. Files contained in LANKEY.ZIP:
  14.  
  15. LANKEYC.C   : C code, C_INKEY() and C_PEEK() functions
  16. LANKEYC.OBJ : result of compiling LANKEYC.C
  17. LANKEY.PRG  : Clipper code, P_INKEY() function
  18. LANKEY.DOC  : this file
  19.  
  20.  
  21. The C functions are support functions for the Clipper function P_INKEY(). 
  22. You should use P_INKEY() wherever you have calls to INKEY() now.  Note that
  23. P_INKEY() is a wait state, which means your SETKEYs will work.  It is easy to
  24. take this feature out of it if you don't like it.  You will also probably
  25. want to modify GETSYS.PRG to use P_INKEY() instead of INKEY().  If you leave
  26. the wait state feature in P_INKEY(), then in GETSYS.PRG, in the procedure
  27. GetReader(), find the line that says
  28.  
  29.                 GetApplyKey( oGet, inkey( 0 ) )
  30.  
  31. and change it to
  32.  
  33.                 GetApplyKey(oGet,P_INKEY(0,.F.))
  34.  
  35. This is so that P_INKEY() will not try to check for the SETKEYs, because
  36. GetApplyKey does that automatically.
  37.  
  38. If you use ACHOICE() or MENU TO..., you may want to write your own menu
  39. function which handles waiting for a keystroke using P_INKEY(0).
  40.  
  41. If you have any questions about the code, feel free to email them to me
  42. (Shawn B. Lipscomb, CIS ID 76247,772).
  43.  
  44.  
  45. C_INKEY() watches the keyboard buffer's tail to sense when a key has been
  46. hit.  There are other ways to sense a keystroke, but a bug in DOS 3.3
  47. prevents functions like kbhit() from sensing enhanced-keyboard-only key
  48. combinations (like <CTRL><UP>) under certain circumstances.  kbhit() is still
  49. necessary though, because that's where the network gets most of its time.
  50.  
  51. These functions should work on all non-dedicated servers, but have only been
  52. tested on Novell Netware and Lantastic.  They work with all versions of
  53. Clipper from 5.01 to 5.2a.
  54.  
  55.  
  56. You may distribute LANKEY.ZIP freely, as long as the original files stay
  57. intact.  You may, however, add your own files to the ZIP.
  58.  
  59.  
  60. To incorporate LANKEY into your application:
  61.  
  62.     1. Compile LANKEY.PRG with the command:
  63.  
  64.                CLIPPER LANKEY /N
  65.  
  66.     2. Change all your calls to INKEY() to call P_INKEY() instead.  The
  67.        syntax is exactly the same.  You may want to use the following
  68.        #xtranslate preprocessor command to automatically make this change at
  69.        compile time:
  70.  
  71.                #xtranslate INKEY([<v1>]) => P_INKEY([<v1>])
  72.  
  73.        Do NOT include this preprocessor command when compiling LANKEY.PRG
  74.        since P_INKEY() does actually call INKEY().
  75.     
  76.     3. Recompile GETSYS.PRG after making the changes described earlier.
  77.  
  78.     4. Link the following files into your application:
  79.  
  80.                LANKEY.OBJ
  81.                LANKEYC.OBJ 
  82.                GETSYS.OBJ
  83.                LLIBCA.LIB
  84.  
  85.        LLIBCA.LIB is Microsoft's large library and is available in the
  86.        Clipper forum libraries if you don't have Microsoft C.
  87.  
  88.        If you are using a link script, the additional lines would be
  89.  
  90.                FILE LANKEY, LANKEYC       # Put these lines after your
  91.                FILE GETSYS                # other FILE commands.  All three
  92.                                           # can be overlaid.
  93.  
  94.                LIB LLIBCA                 # This should be the LAST line in
  95.                                           # the link script (make sure it's
  96.                                           # after CLIPPER.LIB).
  97.  
  98.     5. Run your application and smile.
  99.