2 * ion/ioncore/reginfo.c
4 * Copyright (c) Tuomo Valkonen 1999-2007.
6 * See the included file LICENSE for details.
14 #include <libtu/objp.h>
19 static WRegClassInfo *reg_class_infos;
25 bool ioncore_register_regclass(ClassDescr *descr, WRegionLoadCreateFn *lc_fn)
32 info=ALLOC(WRegClassInfo);
38 LINK_ITEM(reg_class_infos, info, next, prev);
44 void ioncore_unregister_regclass(ClassDescr *descr)
48 for(info=reg_class_infos; info!=NULL; info=info->next){
49 if(descr==info->descr){
50 UNLINK_ITEM(reg_class_infos, info, next, prev);
64 WRegClassInfo *ioncore_lookup_regclass(const char *name, bool inheriting_ok)
72 for(info=reg_class_infos; info!=NULL; info=info->next){
73 for(descr=info->descr;
75 descr=(inheriting_ok ? descr->ancestor : NULL)){
77 if(strcmp(descr->name, name)==0){