foo "kyle", 15;
foo "soren", 7;
bah "blef","bummy";
+meh {
+ foo "marius", 24;
+ foo "blef", 542;
+ bah "hi";
+}
CLProc *p = cl_proc_new();
cl_proc_add_handler_func(p, "foo", process_foo);
cl_proc_add_handler_func(p, "bah", process_bah);
+ cl_proc_add_handler_proc(p,"meh",p);
cl_process(lst, p);
CLProcHandler *handler);
void cl_proc_add_handler_func(CLProc *proc, gchar *str,
CLProcFunc func);
+void cl_proc_add_handler_proc(CLProc *proc, gchar *str,
+ CLProc *hproc);
void cl_proc_set_default(CLProc *proc, CLProcHandler *pf);
void cl_proc_register_keywords(CLProc *proc, ...);
void cl_process(GList *tree, CLProc *proc);
cl_proc_add_handler(proc, str, ph);
}
+void cl_proc_add_handler_proc(CLProc *proc, gchar *str,
+ CLProc *hproc)
+{
+ CLProcHandler *ph;
+
+ g_assert(proc != NULL);
+ ph = cl_proc_handler_new_proc(hproc);
+ cl_proc_add_handler(proc, str, ph);
+}
+
void cl_proc_set_default(CLProc *proc, CLProcHandler *ph)
{
g_assert(proc != NULL);