82 |
SCM elem; |
SCM elem; |
83 |
SCM *result; |
SCM *result; |
84 |
{ |
{ |
|
SCM eval; |
|
85 |
int match = 0; |
int match = 0; |
86 |
char *text, *textmin, *bufmin; |
char *text, *textmin, *bufmin; |
87 |
int len; |
int len; |
88 |
|
|
|
eval = gh_lookup ("eval"); |
|
|
|
|
89 |
text = gh_scm2newstr (gh_car (elem), &len); |
text = gh_scm2newstr (gh_car (elem), &len); |
90 |
/* duplicate and lowerize all strings to become case insensitive */ |
/* duplicate and lowerize all strings to become case insensitive */ |
91 |
bufmin = strdup (buffer); |
bufmin = strdup (buffer); |
97 |
{ |
{ |
98 |
log (LOG_NOTICE, gettext ("Script: String '%s' matched\n"), text); |
log (LOG_NOTICE, gettext ("Script: String '%s' matched\n"), text); |
99 |
/* evaluate next elem */ |
/* evaluate next elem */ |
100 |
*result = gh_call1 (eval, gh_car (gh_cdr (elem))); |
#if HAVE_R5RS_EVAL |
101 |
|
*result = scm_eval (gh_car (gh_cdr (elem)), scm_current_module()); |
102 |
|
#else |
103 |
|
*result = scm_eval (gh_car (gh_cdr (elem))); |
104 |
|
#endif |
105 |
match = 1; |
match = 1; |
106 |
} |
} |
107 |
free (bufmin); |
free (bufmin); |