Changeset 1409 for trunk/src/kmk/function.c
- Timestamp:
- Mar 17, 2008, 11:31:35 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r1408 r1409 1505 1505 1506 1506 1507 #ifdef CONFIG_WITH_EVALCTX 1508 /* Same as func_eval except that we push and pop the local variable 1509 context before evaluating the buffer. */ 1510 static char * 1511 func_evalctx (char *o, char **argv, const char *funcname UNUSED) 1512 { 1513 char *buf; 1514 unsigned int len; 1515 1516 /* Eval the buffer. Pop the current variable buffer setting so that the 1517 eval'd code can use its own without conflicting. */ 1518 1519 install_variable_buffer (&buf, &len); 1520 1521 push_new_variable_scope (); 1522 1523 eval_buffer (argv[0]); 1524 1525 pop_variable_scope (); 1526 1527 restore_variable_buffer (buf, len); 1528 1529 return o; 1530 } 1531 #endif /* CONFIG_WITH_EVALCTX */ 1532 1507 1533 static char * 1508 1534 func_value (char *o, char **argv, const char *funcname UNUSED) … … 3490 3516 { STRING_SIZE_TUPLE("value"), 0, 1, 1, func_value}, 3491 3517 { STRING_SIZE_TUPLE("eval"), 0, 1, 1, func_eval}, 3518 #ifdef CONFIG_WITH_EVALCTX 3519 { STRING_SIZE_TUPLE("evalctx"), 0, 1, 1, func_evalctx}, 3520 #endif 3492 3521 #ifdef EXPERIMENTAL 3493 3522 { STRING_SIZE_TUPLE("eq"), 2, 2, 1, func_eq},
Note:
See TracChangeset
for help on using the changeset viewer.