tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / dos / nextdosentry.c
blob9bdc04e87acfe7ac7011b4261b6b0881aa3aaef9
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <dos/dosextens.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/dos.h>
16 AROS_LH2I(struct DosList *, NextDosEntry,
18 /* SYNOPSIS */
19 AROS_LHA(struct DosList *, dlist, D1),
20 AROS_LHA(ULONG , flags, D2),
22 /* LOCATION */
23 struct DosLibrary *, DOSBase, 115, Dos)
25 /* FUNCTION
26 Looks for the next dos list entry with the right type. The list
27 must be locked for this.
29 INPUTS
30 dlist - the value given by LockDosList() or the last call to
31 FindDosEntry().
32 flags - the same flags as given to LockDosList() or a subset
33 of them.
35 RESULT
36 Pointer to dos list entry found or NULL if the are no more entries.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 static const ULONG flagarray[]=
53 { 0, LDF_DEVICES, LDF_ASSIGNS, LDF_VOLUMES, LDF_ASSIGNS, LDF_ASSIGNS };
55 /* Follow the list */
56 for(;;)
58 /* Get next entry. Return NULL if there is none. */
59 dlist = BADDR(dlist->dol_Next);
60 if(dlist==NULL)
61 return NULL;
63 /* Check type */
64 if(flags&flagarray[dlist->dol_Type+1])
65 return dlist;
67 AROS_LIBFUNC_EXIT
68 } /* NextDosEntry */