*** empty log message ***

This commit is contained in:
hyung-hwan 2006-03-28 11:32:58 +00:00
parent e4e7d1a366
commit 87c8b40064
2 changed files with 19 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: run.c,v 1.24 2006-03-27 14:59:57 bacon Exp $ * $Id: run.c,v 1.25 2006-03-28 11:32:58 bacon Exp $
*/ */
#include <xp/awk/awk.h> #include <xp/awk/awk.h>
@ -52,9 +52,23 @@ int __printval (xp_awk_pair_t* pair)
int xp_awk_run (xp_awk_t* awk) int xp_awk_run (xp_awk_t* awk)
{ {
xp_size_t nglobals;
// TODO: clear run stack/exit_level // TODO: clear run stack/exit_level
awk->run.exit_level = EXIT_NONE; awk->run.exit_level = EXIT_NONE;
nglobals = awk->tree.nglobals;
while (nglobals > 0)
{
--nglobals;
if (__raw_push(awk,xp_awk_val_nil) == -1)
{
// TODO: error handling
return -1;
}
}
if (awk->tree.begin != XP_NULL) if (awk->tree.begin != XP_NULL)
{ {
xp_assert (awk->tree.begin->type == XP_AWK_NDE_BLK); xp_assert (awk->tree.begin->type == XP_AWK_NDE_BLK);
@ -447,8 +461,8 @@ static xp_awk_val_t* __eval_expression (xp_awk_t* awk, xp_awk_nde_t* nde)
case XP_AWK_NDE_GLOBAL: case XP_AWK_NDE_GLOBAL:
{ {
xp_awk_nde_var_t* tgt = (xp_awk_nde_var_t*)nde; //xp_awk_nde_var_t* tgt = (xp_awk_nde_var_t*)nde;
val = STACK_GLOBAL(awk,tgt->id.idxa); //val = STACK_GLOBAL(awk,tgt->id.idxa);
} }
break; break;

View File

@ -1,5 +1,5 @@
/* /*
* $Id: val.h,v 1.10 2006-03-27 15:44:38 bacon Exp $ * $Id: val.h,v 1.11 2006-03-28 11:32:58 bacon Exp $
*/ */
#ifndef _XP_AWK_VAL_H_ #ifndef _XP_AWK_VAL_H_
@ -66,7 +66,7 @@ struct xp_awk_val_str_t
struct xp_awk_val_map_t struct xp_awk_val_map_t
{ {
XP_AWK_VAL_HDR; XP_AWK_VAL_HDR;
xp_awk_vap_t vap; //xp_awk_vap_t vap;
}; };
#ifdef __cplusplus #ifdef __cplusplus