src/stdlib/listener.c
/*===============================================
 * add_listener -- add new listener to collection (no dup check)
 *=============================================*/
- add new listener to collection (no dup check)
- add new listener to collection ( no dup check )
void
add_listener (LIST * notifiees, CALLBACK_FNC fncptr, VPTR uparm)
{
	struct callback_info * info = 
		(struct callback_info *)stdalloc(sizeof(*info));
	memset(info, 0, sizeof(*info));
	info->fnc = fncptr;
	info->uparm = uparm;
	if (!*notifiees)
		*notifiees = create_list2(LISTDOFREE);
	enqueue_list(*notifiees, (VPTR)info);
}
void add_listener ( LIST * notifiees , CALLBACK_FNC fncptr , VPTR uparm ) { struct callback_info * info = ( struct callback_info * ) stdalloc ( sizeof ( * info ) ) ; memset ( info , 0 , sizeof ( * info ) ) ; info -> fnc = fncptr ; info -> uparm = uparm ; if ( ! * notifiees ) * notifiees = create_list2 ( LISTDOFREE ) ; enqueue_list ( * notifiees , ( VPTR ) info ) ; }
add_listener -- add new listener to collection (no dup check)
add_listener -- add new listener to collection ( no dup check )