Fix for the (stupid) case of app (always) passing
[tangerine.git] / rom / dos / exallend.c
blob1624d982fe31d756d0788de5617255bf50b8b25a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <exec/memory.h>
9 #include <proto/exec.h>
10 #include <dos/filesystem.h>
11 #include <dos/dosextens.h>
12 #include <dos/exall.h>
13 #include "dos_intern.h"
15 /*****************************************************************************
17 NAME */
18 #include <proto/dos.h>
20 AROS_LH5(void, ExAllEnd,
22 /* SYNOPSIS */
23 AROS_LHA(BPTR, lock, D1),
24 AROS_LHA(struct ExAllData *, buffer, D2),
25 AROS_LHA(LONG, size, D3),
26 AROS_LHA(LONG, data, D4),
27 AROS_LHA(struct ExAllControl *, control, D5),
29 /* LOCATION */
30 struct DosLibrary *, DOSBase, 165, Dos)
32 /* FUNCTION
34 Stop an ExAll() operation before returning ERROR_NO_MORE_ENTRIES.
36 INPUTS
38 The inputs should correspond to the inputs for the ExAll() function.
40 lock -- lock on the directory that is being examined
41 buffer -- buffer for data returned
42 size -- size of 'buffer' in bytes
43 type -- type of data to be returned
44 control -- control data structure
46 RESULT
48 NOTES
50 The control data structure must have been allocated with AllocDosObject().
52 EXAMPLE
54 BUGS
56 SEE ALSO
58 ExAll(), AllocDosObject()
60 INTERNALS
62 *****************************************************************************/
64 AROS_LIBFUNC_INIT
65 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
67 if (((struct InternalExAllControl *)control)->fib == NULL)
69 /* Get pointer to filehandle */
70 struct FileHandle *fh = (struct FileHandle *)BADDR(lock);
72 /* Get pointer to I/O request. Use stackspace for now. */
73 struct IOFileSys iofs;
75 /* Prepare I/O request. */
76 InitIOFS(&iofs, FSA_EXAMINE_ALL_END, DOSBase);
78 iofs.IOFS.io_Device = fh->fh_Device;
79 iofs.IOFS.io_Unit = fh->fh_Unit;
81 /* Send the request. May not fail. */
82 DosDoIO(&iofs.IOFS);
84 else
86 control->eac_LastKey = 0;
90 AROS_LIBFUNC_EXIT
91 } /* ExAllEnd */