*** empty log message ***

This commit is contained in:
2006-08-04 17:54:52 +00:00
parent e144c0ac29
commit ef1059528f
4 changed files with 28 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.h,v 1.89 2006-08-04 17:36:40 bacon Exp $
* $Id: awk.h,v 1.90 2006-08-04 17:54:52 bacon Exp $
*/
#ifndef _XP_AWK_AWK_H_
@ -12,6 +12,7 @@ typedef struct xp_awk_t xp_awk_t;
typedef struct xp_awk_val_t xp_awk_val_t;
typedef struct xp_awk_extio_t xp_awk_extio_t;
typedef struct xp_awk_srcios_t xp_awk_srcios_t;
typedef struct xp_awk_runios_t xp_awk_runios_t;
typedef struct xp_awk_runcbs_t xp_awk_runcbs_t;
@ -39,6 +40,13 @@ struct xp_awk_extio_t
xp_awk_extio_t* next;
};
struct xp_awk_srcios_t
{
xp_awk_io_t in;
xp_awk_io_t out;
void* custom_data;
};
struct xp_awk_runios_t
{
xp_awk_io_t pipe;
@ -233,10 +241,10 @@ xp_size_t xp_awk_getsrcline (xp_awk_t* awk);
int xp_awk_setextio (xp_awk_t* awk, int id, xp_awk_io_t handler, void* arg);
int xp_awk_parse (xp_awk_t* awk);
int xp_awk_parse (xp_awk_t* awk, xp_awk_srcios_t* srcios);
int xp_awk_run (xp_awk_t* awk,
xp_awk_runcbs_t* runcbs, xp_awk_runios_t* runios);
xp_awk_runios_t* runios, xp_awk_runcbs_t* runcbs);
int xp_awk_stop (xp_awk_t* awk, void* run);

View File

@ -1,5 +1,5 @@
/*
* $Id: parse.c,v 1.158 2006-08-04 17:36:40 bacon Exp $
* $Id: parse.c,v 1.159 2006-08-04 17:54:52 bacon Exp $
*/
#include <xp/awk/awk_i.h>
@ -408,8 +408,9 @@ static void __dump (xp_awk_t* awk)
}
}
int xp_awk_parse (xp_awk_t* awk)
int xp_awk_parse (xp_awk_t* awk, xp_awk_srcios_t* srcios)
{
/* TODO: switch to srcios */
if (awk->srcio == XP_NULL)
{
/* the source code io handler is not set */

View File

@ -1,5 +1,5 @@
/*
* $Id: run.c,v 1.162 2006-08-04 17:36:40 bacon Exp $
* $Id: run.c,v 1.163 2006-08-04 17:54:52 bacon Exp $
*/
#include <xp/awk/awk_i.h>
@ -222,7 +222,7 @@ void xp_awk_seterrnum (void* run, int errnum)
r->errnum = errnum;
}
int xp_awk_run (xp_awk_t* awk, xp_awk_runcbs_t* runcbs, xp_awk_runios_t* runios)
int xp_awk_run (xp_awk_t* awk, xp_awk_runios_t* runios, xp_awk_runcbs_t* runcbs)
{
xp_awk_run_t* run;
int n;