*** empty log message ***
This commit is contained in:
parent
866ff735fc
commit
d67859e12d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: awk.h,v 1.194 2007-03-02 11:14:33 bacon Exp $
|
* $Id: awk.h,v 1.195 2007-03-02 11:47:52 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -200,7 +200,7 @@ enum
|
|||||||
ASE_AWK_ENOMEM, /* out of memory */
|
ASE_AWK_ENOMEM, /* out of memory */
|
||||||
ASE_AWK_ENOSUP, /* not supported */
|
ASE_AWK_ENOSUP, /* not supported */
|
||||||
ASE_AWK_ENOPER, /* operation not allowed */
|
ASE_AWK_ENOPER, /* operation not allowed */
|
||||||
ASE_AWK_ENODEV, /* no such device */
|
ASE_AWK_ENODEV, /* function '%.*s' not found */
|
||||||
ASE_AWK_ENOSPC, /* no space left on device */
|
ASE_AWK_ENOSPC, /* no space left on device */
|
||||||
ASE_AWK_ENOENT, /* no such file, directory, or data */
|
ASE_AWK_ENOENT, /* no such file, directory, or data */
|
||||||
ASE_AWK_EMFILE, /* too many open files */
|
ASE_AWK_EMFILE, /* too many open files */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: err.c,v 1.76 2007-03-02 11:41:55 bacon Exp $
|
* $Id: err.c,v 1.77 2007-03-02 11:47:52 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -101,7 +101,7 @@ static const ase_char_t* __geterrstr (int errnum)
|
|||||||
ASE_T("wrong position index"),
|
ASE_T("wrong position index"),
|
||||||
ASE_T("too few arguments"),
|
ASE_T("too few arguments"),
|
||||||
ASE_T("too many arguments"),
|
ASE_T("too many arguments"),
|
||||||
ASE_T("no such function"),
|
ASE_T("function '%.*s' not found"),
|
||||||
ASE_T("variable not indexable"),
|
ASE_T("variable not indexable"),
|
||||||
ASE_T("variable '%.*s' not deletable"),
|
ASE_T("variable '%.*s' not deletable"),
|
||||||
ASE_T("value not a map"),
|
ASE_T("value not a map"),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: run.c,v 1.334 2007-03-02 11:14:34 bacon Exp $
|
* $Id: run.c,v 1.335 2007-03-02 11:47:52 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -5133,35 +5133,13 @@ static ase_awk_val_t* __eval_afn (ase_awk_run_t* run, ase_awk_nde_t* nde)
|
|||||||
call->what.afn.name.ptr, call->what.afn.name.len);
|
call->what.afn.name.ptr, call->what.afn.name.len);
|
||||||
if (pair == ASE_NULL)
|
if (pair == ASE_NULL)
|
||||||
{
|
{
|
||||||
ase_char_t* fmt = ASE_T("function '%.*s' not found");
|
ase_cstr_t errarg;
|
||||||
ase_char_t* fmt2 = ASE_T("function '%.*s..' not found");
|
|
||||||
ase_size_t len = ase_strlen(fmt);
|
|
||||||
ase_size_t len2 = ase_strlen(fmt2);
|
|
||||||
|
|
||||||
if (len2 < ASE_COUNTOF(run->errmsg) &&
|
errarg.ptr = call->what.afn.name.ptr;
|
||||||
call->what.afn.name.len > ASE_COUNTOF(run->errmsg)-len2)
|
errarg.len = call->what.afn.name.len,
|
||||||
{
|
|
||||||
run->awk->prmfns.misc.sprintf (
|
|
||||||
run->awk->prmfns.misc.custom_data,
|
|
||||||
run->errmsg,
|
|
||||||
ASE_COUNTOF(run->errmsg),
|
|
||||||
fmt2,
|
|
||||||
ASE_COUNTOF(run->errmsg)-len2,
|
|
||||||
call->what.afn.name.ptr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
run->awk->prmfns.misc.sprintf (
|
|
||||||
run->awk->prmfns.misc.custom_data,
|
|
||||||
run->errmsg,
|
|
||||||
ASE_COUNTOF(run->errmsg),
|
|
||||||
fmt,
|
|
||||||
call->what.afn.name.len,
|
|
||||||
call->what.afn.name.ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
ase_awk_setrunerror_old (
|
ase_awk_setrunerror (run,
|
||||||
run, ASE_AWK_EFNNONE, nde->line, run->errmsg);
|
ASE_AWK_EFNNONE, nde->line, &errarg, 1);
|
||||||
return ASE_NULL;
|
return ASE_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
ase/test/awk/err-006.awk
Normal file
3
ase/test/awk/err-006.awk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
BEGIN {
|
||||||
|
helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhelphelp ();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user