Detabbed
[AROS.git] / rom / dos / unlockrecord.c
blob096e9f3c5d1caabb5ef4329ff97abe3c891a40f3
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include "dos_intern.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
14 NAME */
15 #include <proto/dos.h>
17 AROS_LH3(BOOL, UnLockRecord,
19 /* SYNOPSIS */
20 AROS_LHA(BPTR , fh, D1),
21 AROS_LHA(ULONG, offset, D2),
22 AROS_LHA(ULONG, length, D3),
24 /* LOCATION */
25 struct DosLibrary *, DOSBase, 47, Dos)
27 /* FUNCTION
29 Release a lock made with LockRecord().
31 INPUTS
33 fh -- filehandle the lock was made on
34 offset -- starting position of the lock
35 length -- length of the record in bytes
37 RESULT
39 NOTES
41 The length and offset must match the corresponding LockRecord()
42 call.
44 EXAMPLE
46 BUGS
48 SEE ALSO
50 LockRecord(), UnLockRecords()
52 INTERNALS
54 *****************************************************************************/
56 AROS_LIBFUNC_INIT
58 LONG status;
59 struct FileHandle *fileH = BADDR(fh);
61 if (fh == BNULL)
63 return DOSFALSE;
66 status = dopacket3(DOSBase, NULL, fileH->fh_Type, ACTION_FREE_RECORD, fileH->fh_Arg1, offset, length);
68 return status;
70 AROS_LIBFUNC_EXIT
71 } /* UnLockRecord */