some fixes to accented characters
[tangerine.git] / rom / dos / unlockrecord.c
blobfd4570d64536536ea623707061d371c4317c906c
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 <dos/filesystem.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/dos.h>
18 AROS_LH3(BOOL, UnLockRecord,
20 /* SYNOPSIS */
21 AROS_LHA(BPTR , fh, D1),
22 AROS_LHA(ULONG, offset, D2),
23 AROS_LHA(ULONG, length, D3),
25 /* LOCATION */
26 struct DosLibrary *, DOSBase, 47, Dos)
28 /* FUNCTION
30 Release a lock made with LockRecord().
32 INPUTS
34 fh -- filehandle the lock was made on
35 offset -- starting position of the lock
36 length -- length of the record in bytes
38 RESULT
40 NOTES
42 The length and offset must match the corresponding LockRecord()
43 call.
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 LockRecord(), UnLockRecords()
53 INTERNALS
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct IOFileSys iofs;
60 struct FileHandle *fileH = fh;
62 if (fh == NULL)
64 return DOSFALSE;
67 InitIOFS(&iofs, FSA_UNLOCK_RECORD, DOSBase);
69 iofs.IOFS.io_Device = fileH->fh_Device;
70 iofs.IOFS.io_Unit = fileH->fh_Unit;
72 iofs.io_Union.io_RECORD.io_Offset = offset;
73 iofs.io_Union.io_RECORD.io_Size = length;
75 DosDoIO(&iofs.IOFS);
77 SetIoErr(iofs.io_DosError);
79 if (iofs.io_DosError != 0)
81 return DOSFALSE;
84 return DOSTRUE;
86 AROS_LIBFUNC_EXIT
87 } /* UnLockRecord */