Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / muimaster / classes / mccprefs.c
blob79c4088ca4d6ac99630642cd3706eca3814680fa
1 /*
2 Copyright © 2003-2006, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <clib/alib_protos.h>
8 #include <proto/exec.h>
9 #include <proto/utility.h>
10 #include <proto/intuition.h>
11 #include <proto/muimaster.h>
13 /* #define MYDEBUG 1 */
14 #include "debug.h"
15 #include "mui.h"
16 #include "muimaster_intern.h"
17 #include "support.h"
19 extern struct Library *MUIMasterBase;
21 struct MUI_MccprefsData
23 LONG dummy;
26 /**************************************************************************
27 OM_NEW
28 **************************************************************************/
29 IPTR Mccprefs__OM_NEW(struct IClass *cl, Object *obj, struct opSet *msg)
31 struct MUI_MccprefsData *data;
32 struct TagItem *tag, *tags;
34 obj = (Object *)DoSuperMethodA(cl, obj, (Msg)msg);
36 if (!obj)
37 return FALSE;
39 data = INST_DATA(cl, obj);
41 /* parse initial taglist */
42 for (tags = msg->ops_AttrList; (tag = NextTagItem((const struct TagItem**)&tags)); )
44 switch (tag->ti_Tag)
49 return (IPTR)obj;
53 BOOPSI_DISPATCHER(IPTR, Mccprefs_Dispatcher, cl, obj, msg)
55 switch (msg->MethodID)
57 case OM_NEW: return Mccprefs__OM_NEW(cl, obj, (struct opSet *)msg);
60 return DoSuperMethodA(cl, obj, msg);
62 BOOPSI_DISPATCHER_END
65 * Class descriptor.
67 const struct __MUIBuiltinClass _MUI_Mccprefs_desc = {
68 MUIC_Mccprefs,
69 MUIC_Group,
70 sizeof(struct MUI_MccprefsData),
71 (void*)Mccprefs_Dispatcher