home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CLIPB52.ZIP / SCHINKEL.ZIP / DBFHAND.CH < prev    next >
Encoding:
Text File  |  1990-05-16  |  1.5 KB  |  41 lines

  1. /* DBFHAND.CH - Clipper Header for use when using DBFHAND.PRG
  2.  
  3.    This file contains remaped USE, CLOSE, and CLEAR ALL commands
  4.    in order to support the DBFHAND() function. It MUST be
  5.    included in every file of a program that uses DBFHAND() (even
  6.    if DBFHAND() is not called in the file).
  7.  
  8.    SUPPORTS: DBFHAND.PRG
  9.  
  10.    Copyright (c) 1990; The DSW Group, Ltd.
  11. */
  12.  
  13. #command USE <db> [<new: NEW>] [ALIAS <a>] [INDEX <index,...>] ;
  14.                   [<ex: EXCLUSIVE>] [<sh: SHARED>] ;
  15. => ;
  16.          if (<.new.>) ; __dbSelect(0) ; end ;;
  17.          __DbfHandGrab();;
  18.          __dbUse( <(db)>, <(a)>, <.sh.> .or. !(<.ex.> .or. M->__Exclusive) ) ;;
  19.          if (!Used()); __DbfHandLetGo(); end ;;
  20.          if (<.index.>) ; __dbSetIndex( { <(index)> } ) ; end
  21.  
  22. #command USE  =>  __dbClose(); __DbfHandLetGo()
  23.  
  24. #command CLOSE <alias>           => <alias>->( __dbClose(), __DbfHandLetGo() )
  25. #command CLOSE                   => __dbClose(); __DbfHandLetGo()
  26. #command CLOSE DATABASES         => __dbCloseAll(); __DbfHandAllGone()
  27. #command CLOSE ALL               => __dbCloseAll(); __DbfHandAllGone() ; M->__Format := {|| NIL }
  28.  
  29. /* the command that knew too much */
  30. #command CLEAR ALL ;
  31. => ;
  32.          __dbCloseAll() ; __DbfHandAllGone();;
  33.          M->__Format := {|| NIL } ;;
  34.          __MClear() ;;
  35.          SetAlternate("") ; M->__Alternate := .f. ;;
  36.          __KillRead() ; M->__GetList := {}
  37.  
  38.  
  39. //...........................................................
  40. // EOF: DBFHAND.CH
  41.