#include "surf/surfxml_parse.h"
#include <stdio.h>
+// #define DEBUG
+
static void r_init()
{
static void application_handler_on_start_document(void)
{
+
r_init();
//current One
current = rb_funcall3(rb_const_get(rb_cObject, rb_intern("ApplicationHandler")), rb_intern("new"), 0, 0);
rb_funcall(current,rb_intern("onStartDocument"),0);
-
+ #ifdef DEBUG
+ printf ("application_handler_on_start_document ...Done\n" );
+ #endif
}
static void application_handler_on_begin_process(void)
{
-
-
//r_init();
-
VALUE hostName = rb_str_new2(A_surfxml_process_host);
VALUE function = rb_str_new2(A_surfxml_process_function);
-
+#ifdef DEBUG
+ printf ("On_Begin_Process: %s : %s \n",RSTRING(hostName)->ptr,RSTRING(function)->ptr);
+#endif
rb_funcall(current,rb_intern("onBeginProcess"),2,hostName,function);
-
-
}
static void application_handler_on_process_arg(void)
{
-
//r_init();
-
VALUE arg = rb_str_new2(A_surfxml_argument_value);
-
- rb_funcall(current,rb_intern("onProcessArg"),1,arg);
-
-
+#ifdef DEBUG
+ printf ("On_Process_Args >> Sufxml argument value : %s\n",RSTRING(arg)->ptr);
+#endif
+ rb_funcall(current,rb_intern("onProcessArg"),1,arg);
}
static void application_handler_on_property(void)