New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / dos / matchend.c
blob85afb36a529207f6391a53a5a693d180fb54a980
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <dos/dosasl.h>
15 #include <proto/dos.h>
17 AROS_LH1(void, MatchEnd,
19 /* SYNOPSIS */
20 AROS_LHA(struct AnchorPath *, AP, D1),
22 /* LOCATION */
23 struct DosLibrary *, DOSBase, 139, Dos)
25 /* FUNCTION
26 Free the memory that was allocated by calls to MatchFirst() and
27 MatchNext()
29 INPUTS
30 AP - pointer to Anchor Path structure which had been passed to
31 MatchFirst() before.
33 RESULT
34 Allocated memory is returned and filelocks are freed.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
49 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
51 struct AChain *ac = AP->ap_Base, *acnext;
53 if (ac)
55 #if MATCHFUNCS_NO_DUPLOCK
57 ** CurrentDir to a valid lock, ie. one that will not be
58 ** killed further below
61 CurrentDir(ac->an_Lock);
62 #endif
64 while(ac)
66 acnext = ac->an_Child;
69 ** Dont unlock lock in first AChain because it is the same
70 ** as the current directory when MatchFirst was called. And
71 ** this lock was not DupLock()ed (except MATCHFUNCS_NO_DUPLOCK == 0)!!!
74 if (ac->an_Lock
75 #if MATCHFUNCS_NO_DUPLOCK
76 && (ac != AP->ap_Base)
77 #endif
80 UnLock(ac->an_Lock);
82 Match_FreeAChain(ac, DOSBase);
84 ac = acnext;
88 AP->ap_Current = NULL;
89 AP->ap_Base = NULL;
91 AROS_LIBFUNC_EXIT
93 } /* MatchEnd */