/[pengfork]/pengfork/src/modem/script.c
ViewVC logotype

Diff of /pengfork/src/modem/script.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by chupa, Thu Dec 5 00:12:16 2002 UTC revision 1.7 by chupa, Thu Dec 5 23:46:45 2002 UTC
# Line 82  compare_elem (buffer, elem, result) Line 82  compare_elem (buffer, elem, result)
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);
# Line 100  compare_elem (buffer, elem, result) Line 97  compare_elem (buffer, elem, result)
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);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26