*** empty log message ***

This commit is contained in:
hyung-hwan 2006-04-30 15:50:38 +00:00
parent a516f54313
commit 49b3853fd6
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: awk.h,v 1.58 2006-04-26 15:49:33 bacon Exp $ * $Id: awk.h,v 1.59 2006-04-30 15:50:38 bacon Exp $
*/ */
#ifndef _XP_AWK_AWK_H_ #ifndef _XP_AWK_AWK_H_
@ -51,6 +51,7 @@ enum
XP_AWK_ENOERR, /* no error */ XP_AWK_ENOERR, /* no error */
XP_AWK_ENOMEM, /* out of memory */ XP_AWK_ENOMEM, /* out of memory */
XP_AWK_ENOSRCIO, /* no source io handler set */
XP_AWK_ESRCINOPEN, XP_AWK_ESRCINOPEN,
XP_AWK_ESRCINCLOSE, XP_AWK_ESRCINCLOSE,
XP_AWK_ESRCINNEXT, XP_AWK_ESRCINNEXT,

View File

@ -1,5 +1,5 @@
/* /*
* $Id: err.c,v 1.16 2006-04-26 15:49:33 bacon Exp $ * $Id: err.c,v 1.17 2006-04-30 15:50:38 bacon Exp $
*/ */
#include <xp/awk/awk_i.h> #include <xp/awk/awk_i.h>
@ -16,6 +16,7 @@ const xp_char_t* xp_awk_geterrstr (xp_awk_t* awk)
XP_TEXT("no error"), XP_TEXT("no error"),
XP_TEXT("out of memory"), XP_TEXT("out of memory"),
XP_TEXT("no source io handler set"),
XP_TEXT("cannot open source input"), XP_TEXT("cannot open source input"),
XP_TEXT("cannot close source input"), XP_TEXT("cannot close source input"),
XP_TEXT("cannot switch to next source input"), XP_TEXT("cannot switch to next source input"),

View File

@ -1,5 +1,5 @@
/* /*
* $Id: parse.c,v 1.96 2006-04-29 12:41:47 bacon Exp $ * $Id: parse.c,v 1.97 2006-04-30 15:50:38 bacon Exp $
*/ */
#include <xp/awk/awk_i.h> #include <xp/awk/awk_i.h>
@ -330,6 +330,13 @@ static void __dump (xp_awk_t* awk)
int xp_awk_parse (xp_awk_t* awk) int xp_awk_parse (xp_awk_t* awk)
{ {
if (awk->srcio == XP_NULL)
{
awk->errnum = XP_AWK_ENOSRCIO;
return -1;
}
/* if you want to parse anew, call xp_awk_clear first. /* if you want to parse anew, call xp_awk_clear first.
* otherwise, the result is appened to the accumulated result */ * otherwise, the result is appened to the accumulated result */