2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
14 #include <dos/dosasl.h>
15 #include <proto/dos.h>
17 AROS_LH1(void, MatchEnd
,
20 AROS_LHA(struct AnchorPath
*, AP
, D1
),
23 struct DosLibrary
*, DOSBase
, 139, Dos
)
26 Free the memory and file locks that were allocated by calls to
27 MatchFirst() and MatchNext().
30 AP - pointer to Anchor Path structure which had been passed to
46 *****************************************************************************/
50 struct AChain
*ac
= AP
->ap_Base
, *acnext
;
54 #if MATCHFUNCS_NO_DUPLOCK
56 ** CurrentDir to a valid lock, ie. one that will not be
57 ** killed further below
60 CurrentDir(ac
->an_Lock
);
65 acnext
= ac
->an_Child
;
68 ** Dont unlock lock in first AChain because it is the same
69 ** as the current directory when MatchFirst was called. And
70 ** this lock was not DupLock()ed (except MATCHFUNCS_NO_DUPLOCK == 0)!!!
74 #if MATCHFUNCS_NO_DUPLOCK
75 && (ac
!= AP
->ap_Base
)
81 Match_FreeAChain(ac
, DOSBase
);
87 AP
->ap_Current
= NULL
;