*** empty log message ***
This commit is contained in:
parent
57e05aabee
commit
78c9110985
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: jni.c,v 1.74 2007-03-10 15:42:00 bacon Exp $
|
* $Id: jni.c,v 1.75 2007-03-19 03:33:53 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -1569,6 +1569,7 @@ static int __handle_bfn (
|
|||||||
|
|
||||||
(*env)->ExceptionClear (env);
|
(*env)->ExceptionClear (env);
|
||||||
(*env)->DeleteLocalRef (env, args);
|
(*env)->DeleteLocalRef (env, args);
|
||||||
|
|
||||||
ase_awk_setrunerrnum (run, ASE_AWK_EBFNIMPL);
|
ase_awk_setrunerrnum (run, ASE_AWK_EBFNIMPL);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||||
# ADD LINK32 aseawk.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../release/win32/vs60/aseawk_jni.dll" /implib:"release/win32/vs60/aseawk_jni.lib" /libpath:"$(OutDir)"
|
# ADD LINK32 asecmn.lib aseawk.lib aseutl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../release/win32/vs60/aseawk_jni.dll" /implib:"release/win32/vs60/aseawk_jni.lib" /libpath:"$(OutDir)"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "awk.jni - Win32 Debug"
|
!ELSEIF "$(CFG)" == "awk.jni - Win32 Debug"
|
||||||
|
|
||||||
@ -81,30 +81,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 aseawk.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../debug/win32/vs60/aseawk_jni.dll" /implib:"debug/win32/vs60/aseawk_jni.lib" /pdbtype:sept /libpath:"$(OutDir)"
|
# ADD LINK32 asecmn.lib aseawk.lib aseutl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../debug/win32/vs60/aseawk_jni.dll" /implib:"debug/win32/vs60/aseawk_jni.lib" /pdbtype:sept /libpath:"$(OutDir)"
|
||||||
# Begin Custom Build
|
|
||||||
InputPath=\projects\ase\debug\win32\vs60\aseawk_jni.dll
|
|
||||||
SOURCE="$(InputPath)"
|
|
||||||
|
|
||||||
BuildCmds= \
|
|
||||||
/progra~1/java/jdk1.5.0_09/bin/javac -classpath ../.. Awk.java \
|
|
||||||
/progra~1/java/jdk1.5.0_09/bin/javac -classpath ../.. StdAwk.java \
|
|
||||||
/progra~1/java/jdk1.5.0_09/bin/javac -classpath ../.. Extio.java \
|
|
||||||
/progra~1/java/jdk1.5.0_09/bin/javac -classpath ../.. Exception.java \
|
|
||||||
|
|
||||||
|
|
||||||
"Awk.class" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
$(BuildCmds)
|
|
||||||
|
|
||||||
"StdAwk.class" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
$(BuildCmds)
|
|
||||||
|
|
||||||
"Extio.class" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
$(BuildCmds)
|
|
||||||
|
|
||||||
"Exception.class" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
$(BuildCmds)
|
|
||||||
# End Custom Build
|
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
@ -132,21 +109,5 @@ SOURCE=.\jni.h
|
|||||||
|
|
||||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\Awk.java
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\Exception.java
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\Extio.java
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\StdAwk.java
|
|
||||||
# End Source File
|
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: run.c,v 1.344 2007-03-10 15:22:54 bacon Exp $
|
* $Id: run.c,v 1.345 2007-03-19 03:33:53 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -5354,10 +5354,6 @@ static ase_awk_val_t* __eval_call (
|
|||||||
return ASE_NULL;
|
return ASE_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
nargs = 0; p = call->args;
|
|
||||||
while (p != ASE_NULL)
|
|
||||||
*/
|
|
||||||
for (p = call->args, nargs = 0; p != ASE_NULL; p = p->next, nargs++)
|
for (p = call->args, nargs = 0; p != ASE_NULL; p = p->next, nargs++)
|
||||||
{
|
{
|
||||||
ASE_ASSERT (
|
ASE_ASSERT (
|
||||||
@ -5464,10 +5460,32 @@ static ase_awk_val_t* __eval_call (
|
|||||||
|
|
||||||
if (call->what.bfn.handler != ASE_NULL)
|
if (call->what.bfn.handler != ASE_NULL)
|
||||||
{
|
{
|
||||||
|
run->errnum = ASE_AWK_ENOERR;
|
||||||
|
|
||||||
n = call->what.bfn.handler (
|
n = call->what.bfn.handler (
|
||||||
run,
|
run,
|
||||||
call->what.bfn.name.ptr,
|
call->what.bfn.name.ptr,
|
||||||
call->what.bfn.name.len);
|
call->what.bfn.name.len);
|
||||||
|
|
||||||
|
if (n <= -1)
|
||||||
|
{
|
||||||
|
if (run->errnum == ASE_AWK_ENOERR)
|
||||||
|
{
|
||||||
|
/* the handler has not set the error.
|
||||||
|
* fix it */
|
||||||
|
ase_awk_setrunerror (
|
||||||
|
run, ASE_AWK_EBFNIMPL,
|
||||||
|
nde->line, ASE_NULL, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* adjust the error line */
|
||||||
|
run->errlin = nde->line;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* correct the return code just in case */
|
||||||
|
if (n < -1) n = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: misc.c,v 1.2 2007-03-06 15:01:50 bacon Exp $
|
* $Id: misc.c,v 1.3 2007-03-19 03:33:54 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -8,7 +8,6 @@
|
|||||||
#include <ase/cmn/macros.h>
|
#include <ase/cmn/macros.h>
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
||||||
int ase_assert_failed (
|
int ase_assert_failed (
|
||||||
const ase_char_t* expr, const ase_char_t* desc,
|
const ase_char_t* expr, const ase_char_t* desc,
|
||||||
const ase_char_t* file, ase_size_t line)
|
const ase_char_t* file, ase_size_t line)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Awk.cpp,v 1.27 2007-03-06 14:54:49 bacon Exp $
|
* $Id: Awk.cpp,v 1.28 2007-03-19 03:33:54 bacon Exp $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -351,7 +351,7 @@ static int __handle_bfn (
|
|||||||
{
|
{
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("out of memory in creating argument array for '%.*s'\n"),
|
_T("out of memory in creating argument array for '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -396,7 +396,7 @@ static int __handle_bfn (
|
|||||||
|
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("out of memory in handling '%.*s'\n"),
|
_T("out of memory in handling '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -418,7 +418,7 @@ static int __handle_bfn (
|
|||||||
|
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("out of memory in handling '%.*s'\n"),
|
_T("out of memory in handling '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -434,7 +434,7 @@ static int __handle_bfn (
|
|||||||
|
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("out of memory in handling '%.*s'\n"),
|
_T("out of memory in handling '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ static int __handle_bfn (
|
|||||||
{
|
{
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("out of memory in handling '%.*s'\n"),
|
_T("out of memory in handling '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -456,7 +456,7 @@ static int __handle_bfn (
|
|||||||
{
|
{
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("no handler for '%.*s'\n"),
|
_T("no handler for '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -465,7 +465,7 @@ static int __handle_bfn (
|
|||||||
{
|
{
|
||||||
ase_char_t buf[128];
|
ase_char_t buf[128];
|
||||||
_sntprintf (buf, ASE_COUNTOF(buf),
|
_sntprintf (buf, ASE_COUNTOF(buf),
|
||||||
_T("return value not supported for '%.*s'\n"),
|
_T("return value not supported for '%.*s'"),
|
||||||
fnl, fnm);
|
fnl, fnm);
|
||||||
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
ase_awk_setrunerror (run, ASE_AWK_ENOMEM, 0, buf);
|
||||||
return -1;
|
return -1;
|
||||||
@ -507,17 +507,15 @@ HRESULT CAwk::Parse (int* ret)
|
|||||||
|
|
||||||
prmfns.misc.pow = custom_awk_pow;
|
prmfns.misc.pow = custom_awk_pow;
|
||||||
prmfns.misc.sprintf = custom_awk_sprintf;
|
prmfns.misc.sprintf = custom_awk_sprintf;
|
||||||
prmfns.misc.aprintf = custom_awk_aprintf;
|
|
||||||
prmfns.misc.dprintf = custom_awk_dprintf;
|
prmfns.misc.dprintf = custom_awk_dprintf;
|
||||||
prmfns.misc.abort = custom_awk_abort;
|
|
||||||
|
|
||||||
handle = ase_awk_open (&prmfns, NULL, &errnum);
|
handle = ase_awk_open (&prmfns, NULL);
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
errlin = 0;
|
errlin = 0;
|
||||||
ase_strxcpy (
|
ase_strxcpy (
|
||||||
errmsg, ASE_COUNTOF(errmsg),
|
errmsg, ASE_COUNTOF(errmsg),
|
||||||
ase_awk_geterrstr(errnum));
|
ase_awk_geterrstr(NULL, ASE_AWK_ENOMEM));
|
||||||
|
|
||||||
*ret = -1;
|
*ret = -1;
|
||||||
|
|
||||||
@ -806,7 +804,7 @@ STDMETHODIMP CAwk::AddBuiltinFunction (
|
|||||||
errlin = 0;
|
errlin = 0;
|
||||||
_sntprintf (
|
_sntprintf (
|
||||||
errmsg, ASE_COUNTOF(errmsg),
|
errmsg, ASE_COUNTOF(errmsg),
|
||||||
_T("'%.*s' added already\n"),
|
_T("'%.*s' added already"),
|
||||||
bfn->name.len, bfn->name.ptr);
|
bfn->name.len, bfn->name.ptr);
|
||||||
|
|
||||||
*ret = -1;
|
*ret = -1;
|
||||||
@ -821,7 +819,7 @@ STDMETHODIMP CAwk::AddBuiltinFunction (
|
|||||||
errlin = 0;
|
errlin = 0;
|
||||||
ase_strxcpy (
|
ase_strxcpy (
|
||||||
errmsg, ASE_COUNTOF(errmsg),
|
errmsg, ASE_COUNTOF(errmsg),
|
||||||
ase_awk_geterrstr(errnum));
|
ase_awk_geterrstr(NULL, errnum));
|
||||||
|
|
||||||
*ret = -1;
|
*ret = -1;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@ -837,7 +835,7 @@ STDMETHODIMP CAwk::AddBuiltinFunction (
|
|||||||
errlin = 0;
|
errlin = 0;
|
||||||
ase_strxcpy (
|
ase_strxcpy (
|
||||||
errmsg, ASE_COUNTOF(errmsg),
|
errmsg, ASE_COUNTOF(errmsg),
|
||||||
ase_awk_geterrstr(errnum));
|
ase_awk_geterrstr(NULL, errnum));
|
||||||
|
|
||||||
*ret = -1;
|
*ret = -1;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@ -883,7 +881,7 @@ STDMETHODIMP CAwk::DeleteBuiltinFunction (BSTR name, int* ret)
|
|||||||
errlin = 0;
|
errlin = 0;
|
||||||
ase_strxcpy (
|
ase_strxcpy (
|
||||||
errmsg, ASE_COUNTOF(errmsg),
|
errmsg, ASE_COUNTOF(errmsg),
|
||||||
ase_awk_geterrstr(errnum));
|
ase_awk_geterrstr(NULL, errnum));
|
||||||
|
|
||||||
*ret = -1;
|
*ret = -1;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user