*** empty log message ***

This commit is contained in:
hyung-hwan 2007-03-10 15:32:54 +00:00
parent 90e512f8dd
commit b35788b2a9
3 changed files with 17 additions and 42 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: awk.h,v 1.209 2007-03-10 15:29:54 bacon Exp $ * $Id: awk.h,v 1.210 2007-03-10 15:32:54 bacon Exp $
* *
* {License} * {License}
*/ */
@ -469,10 +469,6 @@ void ase_awk_setrunerror (
ase_awk_run_t* run, int errnum, ase_size_t errlin, ase_awk_run_t* run, int errnum, ase_size_t errlin,
const ase_cstr_t* errarg, ase_size_t argcnt); const ase_cstr_t* errarg, ase_size_t argcnt);
void ase_awk_setrunerror_old (
ase_awk_run_t* run, int errnum,
ase_size_t errlin, const ase_char_t* msg);
/* functions to manipulate built-in functions */ /* functions to manipulate built-in functions */
void* ase_awk_addbfn ( void* ase_awk_addbfn (
ase_awk_t* awk, const ase_char_t* name, ase_size_t name_len, ase_awk_t* awk, const ase_char_t* name, ase_size_t name_len,

View File

@ -1,5 +1,5 @@
/* /*
* $Id: err.c,v 1.93 2007-03-10 15:29:54 bacon Exp $ * $Id: err.c,v 1.94 2007-03-10 15:32:54 bacon Exp $
* *
* {License} * {License}
*/ */
@ -469,17 +469,3 @@ void ase_awk_setrunerror (
return; return;
} }
} }
void ase_awk_setrunerror_old (
ase_awk_run_t* run, int errnum,
ase_size_t errlin, const ase_char_t* errmsg)
{
run->errnum = errnum;
run->errlin = errlin;
if (errmsg == ASE_NULL) run->errmsg[0] = ASE_T('\0');
else if (errmsg != run->errmsg)
{
ase_strxcpy (run->errmsg, ASE_COUNTOF(run->errmsg), errmsg);
}
}

View File

@ -1,5 +1,5 @@
/* /*
* $Id: jni.c,v 1.72 2007-03-06 14:51:52 bacon Exp $ * $Id: jni.c,v 1.73 2007-03-10 15:32:54 bacon Exp $
* *
* {License} * {License}
*/ */
@ -1354,7 +1354,6 @@ static int __handle_bfn (
jobjectArray args; jobjectArray args;
jobject arg, ret; jobject arg, ret;
ase_awk_val_t* v; ase_awk_val_t* v;
ase_char_t msg_nomem[MSG_SIZE];
ase_awk_t* awk; ase_awk_t* awk;
run_data = ase_awk_getruncustomdata (run); run_data = ase_awk_getruncustomdata (run);
@ -1364,19 +1363,13 @@ static int __handle_bfn (
env = run_data->env; env = run_data->env;
obj = run_data->obj; obj = run_data->obj;
ase_sprintf (
msg_nomem, ASE_COUNTOF(msg_nomem),
ASE_T("out of memory in handling %.*s"),
fnl, fnm);
if (fnl > 0 && ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t)) if (fnl > 0 && ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t))
{ {
ase_size_t i; ase_size_t i;
jchar* tmp = (jchar*) malloc (ASE_SIZEOF(jchar)*fnl); jchar* tmp = (jchar*) malloc (ASE_SIZEOF(jchar)*fnl);
if (tmp == NULL) if (tmp == NULL)
{ {
ase_awk_setrunerror_old ( ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
run, ASE_AWK_ENOMEM, 0, msg_nomem);
return -1; return -1;
} }
@ -1393,14 +1386,14 @@ static int __handle_bfn (
{ {
if (is_debug(awk)) (*env)->ExceptionDescribe (env); if (is_debug(awk)) (*env)->ExceptionDescribe (env);
(*env)->ExceptionClear (env); (*env)->ExceptionClear (env);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
name_utf = (*env)->GetStringUTFChars (env, name, JNI_FALSE); name_utf = (*env)->GetStringUTFChars (env, name, JNI_FALSE);
if (name_utf == NULL) if (name_utf == NULL)
{ {
(*env)->DeleteLocalRef (env, name); (*env)->DeleteLocalRef (env, name);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1427,7 +1420,7 @@ static int __handle_bfn (
{ {
if (is_debug(awk)) (*env)->ExceptionDescribe (env); if (is_debug(awk)) (*env)->ExceptionDescribe (env);
(*env)->ExceptionClear (env); (*env)->ExceptionClear (env);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1467,7 +1460,7 @@ static int __handle_bfn (
if (tmp == NULL) if (tmp == NULL)
{ {
(*env)->DeleteLocalRef (env, args); (*env)->DeleteLocalRef (env, args);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1494,7 +1487,7 @@ static int __handle_bfn (
(*env)->ExceptionClear (env); (*env)->ExceptionClear (env);
} }
(*env)->DeleteLocalRef (env, args); (*env)->DeleteLocalRef (env, args);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1529,7 +1522,7 @@ static int __handle_bfn (
if (v == NULL) if (v == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1545,7 +1538,7 @@ static int __handle_bfn (
if (v == NULL) if (v == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1561,7 +1554,7 @@ static int __handle_bfn (
if (v == NULL) if (v == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1576,7 +1569,7 @@ static int __handle_bfn (
if (v == NULL) if (v == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1591,7 +1584,7 @@ static int __handle_bfn (
if (v == NULL) if (v == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1608,7 +1601,7 @@ static int __handle_bfn (
if (ptr == NULL) if (ptr == NULL)
{ {
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1621,7 +1614,7 @@ static int __handle_bfn (
{ {
(*env)->ReleaseStringChars (env, ret, ptr); (*env)->ReleaseStringChars (env, ret, ptr);
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }
@ -1638,7 +1631,7 @@ static int __handle_bfn (
{ {
(*env)->ReleaseStringChars (env, ret, ptr); (*env)->ReleaseStringChars (env, ret, ptr);
(*env)->DeleteLocalRef (env, ret); (*env)->DeleteLocalRef (env, ret);
ase_awk_setrunerror_old (run, ASE_AWK_ENOMEM, 0, msg_nomem); ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1; return -1;
} }