Less sloppy handling of IoErr().
[AROS.git] / rom / intuition / removeclass.c
blobd2961fcd87d78a8c589f5e70f19ee93b8ac90860
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/exec.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <intuition/classes.h>
14 #include <proto/intuition.h>
16 AROS_LH1(void, RemoveClass,
18 /* SYNOPSIS */
19 AROS_LHA(struct IClass *, classPtr, A0),
21 /* LOCATION */
22 struct IntuitionBase *, IntuitionBase, 118, Intuition)
24 /* FUNCTION
25 Makes a public class inaccessible. This function may be called
26 several times on the same class and even if the class never was
27 in the public list.
29 INPUTS
30 classPtr - Pointer to the result of MakeClass(). May be NULL.
32 RESULT
33 None.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 MakeClass(), FreeClass(), AddClass(), "Basic Object-Oriented
43 Programming System for Intuition" and "Boopsi Class Reference"
44 Document.
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 ObtainSemaphore( &GetPrivIBase(IntuitionBase)->ClassListLock );
54 /* Class there and still/already in the list ? */
55 if (classPtr && (classPtr->cl_Flags & CLF_INLIST))
57 Remove ((struct Node *)classPtr);
58 classPtr->cl_Flags &= ~CLF_INLIST;
61 ReleaseSemaphore( &GetPrivIBase(IntuitionBase)->ClassListLock );
63 AROS_LIBFUNC_EXIT
64 } /* RemoveClass() */