enhanced and fixed a few functions.
- qse_awk_rtx_call() - qse_awk_parsesimple() - qse_awk_parsesimple_in_t - qse_awk_parsesimple_out_t
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: func.c 499 2008-12-16 09:42:48Z baconevi $
|
||||
* $Id: fnc.c 75 2009-02-22 14:10:34Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
@ -250,7 +250,7 @@ static int fnc_close (
|
||||
else
|
||||
{
|
||||
name = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
if (name == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ static int fnc_fflush (
|
||||
else
|
||||
{
|
||||
str0 = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
if (str0 == QSE_NULL) return -1;
|
||||
|
||||
}
|
||||
@ -437,7 +437,7 @@ static int fnc_index (
|
||||
else
|
||||
{
|
||||
str0 = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
if (str0 == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ static int fnc_index (
|
||||
else
|
||||
{
|
||||
str1 = qse_awk_rtx_valtostr (
|
||||
run, a1, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len1);
|
||||
run, a1, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len1);
|
||||
if (str1 == QSE_NULL)
|
||||
{
|
||||
if (a0->type != QSE_AWK_VAL_STR)
|
||||
@ -494,7 +494,7 @@ static int fnc_length (
|
||||
else
|
||||
{
|
||||
str = qse_awk_rtx_valtostr (
|
||||
run, v, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
run, v, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
if (str == QSE_NULL) return -1;
|
||||
QSE_AWK_FREE (run->awk, str);
|
||||
}
|
||||
@ -536,7 +536,7 @@ static int fnc_substr (
|
||||
else
|
||||
{
|
||||
str = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
if (str == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -642,7 +642,7 @@ static int fnc_split (
|
||||
else
|
||||
{
|
||||
str = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &str_len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &str_len);
|
||||
if (str == QSE_NULL) return -1;
|
||||
str_free = str;
|
||||
}
|
||||
@ -666,7 +666,7 @@ static int fnc_split (
|
||||
else
|
||||
{
|
||||
fs_ptr = qse_awk_rtx_valtostr (
|
||||
run, t1, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &fs_len);
|
||||
run, t1, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &fs_len);
|
||||
if (fs_ptr == QSE_NULL)
|
||||
{
|
||||
if (str_free != QSE_NULL)
|
||||
@ -693,7 +693,7 @@ static int fnc_split (
|
||||
else
|
||||
{
|
||||
fs_ptr = qse_awk_rtx_valtostr (
|
||||
run, a2, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &fs_len);
|
||||
run, a2, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &fs_len);
|
||||
if (fs_ptr == QSE_NULL)
|
||||
{
|
||||
if (str_free != QSE_NULL)
|
||||
@ -861,7 +861,7 @@ static int fnc_tolower (
|
||||
else
|
||||
{
|
||||
str = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
if (str == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -901,7 +901,7 @@ static int fnc_toupper (
|
||||
else
|
||||
{
|
||||
str = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len);
|
||||
if (str == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -968,7 +968,7 @@ static int __substitute (qse_awk_rtx_t* run, qse_long_t max_count)
|
||||
else
|
||||
{
|
||||
a0_ptr = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &a0_len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &a0_len);
|
||||
if (a0_ptr == QSE_NULL)
|
||||
{
|
||||
FREE_A_PTRS (run->awk);
|
||||
@ -985,7 +985,7 @@ static int __substitute (qse_awk_rtx_t* run, qse_long_t max_count)
|
||||
else
|
||||
{
|
||||
a1_ptr = qse_awk_rtx_valtostr (
|
||||
run, a1, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &a1_len);
|
||||
run, a1, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &a1_len);
|
||||
if (a1_ptr == QSE_NULL)
|
||||
{
|
||||
FREE_A_PTRS (run->awk);
|
||||
@ -1041,7 +1041,7 @@ static int __substitute (qse_awk_rtx_t* run, qse_long_t max_count)
|
||||
else
|
||||
{
|
||||
a2_ptr = qse_awk_rtx_valtostr (
|
||||
run, *a2_ref, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &a2_len);
|
||||
run, *a2_ref, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &a2_len);
|
||||
if (a2_ptr == QSE_NULL)
|
||||
{
|
||||
FREE_A_PTRS (run->awk);
|
||||
@ -1250,7 +1250,7 @@ static int fnc_match (
|
||||
else
|
||||
{
|
||||
str0 = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len0);
|
||||
if (str0 == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
@ -1268,7 +1268,7 @@ static int fnc_match (
|
||||
else
|
||||
{
|
||||
str1 = qse_awk_rtx_valtostr (
|
||||
run, a1, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &len1);
|
||||
run, a1, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &len1);
|
||||
if (str1 == QSE_NULL)
|
||||
{
|
||||
if (a0->type != QSE_AWK_VAL_STR)
|
||||
@ -1374,7 +1374,7 @@ static int fnc_sprintf (
|
||||
else
|
||||
{
|
||||
cs0.ptr = qse_awk_rtx_valtostr (
|
||||
run, a0, QSE_AWK_VALTOSTR_CLEAR, QSE_NULL, &cs0.len);
|
||||
run, a0, QSE_AWK_RTX_VALTOSTR_CLEAR, QSE_NULL, &cs0.len);
|
||||
if (cs0.ptr == QSE_NULL)
|
||||
{
|
||||
qse_str_fini (&fbu);
|
||||
|
Reference in New Issue
Block a user