whitespace
[AROS.git] / rom / dos / unlockrecords.c
blob3baca76ca92cf11362d90643a9767eb6f1eee974
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include "dos_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <dos/record.h>
14 #include <proto/dos.h>
16 AROS_LH1(BOOL, UnLockRecords,
18 /* SYNOPSIS */
19 AROS_LHA(struct RecordLock *, recArray, D1),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 48, Dos)
24 /* FUNCTION
25 Release an array of record locks obtained with LockRecords().
27 INPUTS
28 recArray - array of record locks (previously locked with LockRecords())
30 RESULT
31 success - Boolean success indicator.
33 NOTES
34 An array of records may not be modified when records are locked.
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 LockRecords()
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 while (NULL != BADDR(recArray->rec_FH))
51 LONG success = UnLockRecord(recArray->rec_FH, recArray->rec_Offset,
52 recArray->rec_Length);
54 if (success != DOSTRUE)
56 return success;
59 /* everything OK -> advance to the next entry */
60 recArray++;
63 return DOSTRUE;
65 AROS_LIBFUNC_EXIT
66 } /* UnLockRecords */