home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / lankey2.zip / LANKEY.DOC < prev    next >
Text File  |  1993-06-09  |  4KB  |  109 lines

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