/*
 * $Id$
 */

/*  $DOC$
 *  $TEMPLATE$
 *      Function
 *  $NAME$
 *      HB_FLOCK()
 *  $CATEGORY$
 *      API
 *  $SUBCATEGORY$
 *      FileSys
 *  $ONELINER$
 *      Locks part or all of any file
 *  $SYNTAX$
 *      HB_FLOCK( <nHandle>, <nOffset>, <nBytes> [, <nType ] )
 *                --> <lSuccess>
 *  $ARGUMENTS$
 *      <nHandle>  Dos file handle

 *	<nOffset>  Offset of the first byte of the region to be locked.

 *      <nBytes>   Number of bytes to be locked.

 *	<nType>    The type (read or write) of lock requested.
 *  $RETURNS$
 *      <lSuccess> .T. if the lock was obtained, else .F.
 *  $DESCRIPTION$
 *      This function attempts to lock a region of the file whose file handle
 *      is <nHandle>. This is a low level file function.  To lock Harbour
 *      data files use either the FLOCK() or RLOCK() function.

 *      The value of <nHandle> is obtained from either a call to the FOPEN()
 *      or the FCREATE() function.

 *      <nOffset> is the offset (from the beginning of the file) to the first
 *	byte of the region to be locked.  (Offsets from the current position
 *	and end of file are not currently supported.)

 *      <nBytes> is the length of the region to be locked in bytes.

 *	<nType> is the type of lock requested.  There are two types of locks:
 *	exclusive write locks ( <nType> = 0x0000 ) - the default, and shared
 *	read locks( <nType> = 0x0100 ).  Additionally you can specify a
 *	blocking version of this function (that is it won't return until
 *	either  an error has occurred or the lock has been obtained) by
 *	adding Ox0200 to the above values.
 *  $EXAMPLES$
 *      refer to tfl.prg
 *  $STATUS$
 *     R
 *  $COMPLIANCE$
 *     H
 *  $PLATFORMS$
 *     All(64K)
 *  $FILES$
 *      Library is rtl
 *  $SEEALSO$
 *     HB_FUNLOCK(),FOPEN(),FCREATE(),FERROR(),FCLOSE()
 *  $END$
 */

/*  $DOC$
 *  $TEMPLATE$
 *      Function
 *  $NAME$
 *      HB_FUNLOCK()
 *  $CATEGORY$
 *      API
 *  $SUBCATEGORY$
 *      FileSys
 *  $ONELINER$
 *      Unlocks part or all of any file
 *  $SYNTAX$
 *      HB_FUNLOCK( <nHandle>, <nOffset>, <nBytes> )  --> <lSuccess>

 *  $ARGUMENTS$
 *      <nHandle>  Dos file handle

 *	<nOffset>  Offset of the first byte of the region to be locked.

 *      <nBytes>   Number of bytes to be locked.
 *  $RETURNS$
 *      <lSuccess> .T. if the lock was removed, else .F.
 *  $DESCRIPTION$
 *      This function attempts to unlock a region of the file whose file
 *      handle is <nHandle>. This is a low level file function.  To
 *      unlock Harbour data files use the DBUNLOCK() function.

 *      The value of <nHandle> is obtained from either a call to the FOPEN()
 *      or the FCREATE() function.

 *      <nOffset> is the offset (from the beginning of the file) to the first
 *	byte of the region to be unlocked.  (Offsets from the current position
 *	and end of file are not currently supported.)

 *      <nBytes> is the length of the region to be unlocked in bytes.
 *  $EXAMPLES$
 *      refer to tfl.prg
 *  $STATUS$
 *     R
 *  $COMPLIANCE$
 *     H
 *  $PLATFORMS$
 *     All(64K)
 *  $FILES$
 *      Library is rtl
 *  $SEEALSO$
 *     HB_FLOCK(),FOPEN(),FCREATE(),FERROR(),FCLOSE()
 *  $END$
 */
