diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 50aaf480..18233414 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.94 2006-11-29 02:54:14 bacon Exp $ + * $Id: awk.c,v 1.95 2006-11-29 03:18:18 bacon Exp $ */ #if defined(__BORLANDC__) @@ -41,7 +41,7 @@ ase_awk_t* ase_awk_open (const ase_awk_syscas_t* syscas) if (syscas->pow == ASE_NULL) return ASE_NULL; -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG) awk = (ase_awk_t*) malloc (ASE_SIZEOF(ase_awk_t)); #else awk = (ase_awk_t*) syscas->malloc ( diff --git a/ase/awk/awk_i.h b/ase/awk/awk_i.h index 7217be6f..6d8c0f79 100644 --- a/ase/awk/awk_i.h +++ b/ase/awk/awk_i.h @@ -1,5 +1,5 @@ /* - * $Id: awk_i.h,v 1.86 2006-11-28 04:30:21 bacon Exp $ + * $Id: awk_i.h,v 1.87 2006-11-29 03:18:18 bacon Exp $ */ #ifndef _ASE_AWK_AWKI_H_ @@ -36,7 +36,7 @@ typedef struct ase_awk_tree_t ase_awk_tree_t; #define ASE_AWK_MAX_LOCALS 9999 #define ASE_AWK_MAX_PARAMS 9999 -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG) #define _CRTDBG_MAP_ALLOC #include diff --git a/ase/awk/func.c b/ase/awk/func.c index 69b6e1e1..fabe3455 100644 --- a/ase/awk/func.c +++ b/ase/awk/func.c @@ -1,5 +1,5 @@ /* - * $Id: func.c,v 1.82 2006-11-29 02:54:15 bacon Exp $ + * $Id: func.c,v 1.83 2006-11-29 03:18:18 bacon Exp $ */ #include @@ -23,22 +23,22 @@ static int __bfn_sprintf (ase_awk_run_t*, const ase_char_t*, ase_size_t); static ase_awk_bfn_t __sys_bfn[] = { /* io functions */ - { {ASE_T("close"), 5}, ASE_AWK_EXTIO, 1, 1, ASE_NULL, __bfn_close}, - { {ASE_T("fflush"), 6}, ASE_AWK_EXTIO, 0, 1, ASE_NULL, __bfn_fflush}, + { {ASE_T("close"), 5}, ASE_AWK_EXTIO, {1, 1, ASE_NULL}, __bfn_close}, + { {ASE_T("fflush"), 6}, ASE_AWK_EXTIO, {0, 1, ASE_NULL}, __bfn_fflush}, /* string functions */ - { {ASE_T("index"), 5}, 0, 2, 2, ASE_NULL, __bfn_index}, - { {ASE_T("substr"), 6}, 0, 2, 3, ASE_NULL, __bfn_substr}, - { {ASE_T("length"), 6}, 0, 1, 1, ASE_NULL, __bfn_length}, - { {ASE_T("split"), 5}, 0, 2, 3, ASE_T("vrv"), __bfn_split}, - { {ASE_T("tolower"), 7}, 0, 1, 1, ASE_NULL, __bfn_tolower}, - { {ASE_T("toupper"), 7}, 0, 1, 1, ASE_NULL, __bfn_toupper}, - { {ASE_T("gsub"), 4}, 0, 2, 3, ASE_T("xvr"), __bfn_gsub}, - { {ASE_T("sub"), 3}, 0, 2, 3, ASE_T("xvr"), __bfn_sub}, - { {ASE_T("match"), 5}, 0, 2, 2, ASE_T("vx"), __bfn_match}, - { {ASE_T("sprintf"), 7}, 0, 1, MAX, ASE_NULL, __bfn_sprintf}, + { {ASE_T("index"), 5}, 0, {2, 2, ASE_NULL}, __bfn_index}, + { {ASE_T("substr"), 6}, 0, {2, 3, ASE_NULL}, __bfn_substr}, + { {ASE_T("length"), 6}, 0, {1, 1, ASE_NULL}, __bfn_length}, + { {ASE_T("split"), 5}, 0, {2, 3, ASE_T("vrv")}, __bfn_split}, + { {ASE_T("tolower"), 7}, 0, {1, 1, ASE_NULL}, __bfn_tolower}, + { {ASE_T("toupper"), 7}, 0, {1, 1, ASE_NULL}, __bfn_toupper}, + { {ASE_T("gsub"), 4}, 0, {2, 3, ASE_T("xvr")}, __bfn_gsub}, + { {ASE_T("sub"), 3}, 0, {2, 3, ASE_T("xvr")}, __bfn_sub}, + { {ASE_T("match"), 5}, 0, {2, 2, ASE_T("vx")}, __bfn_match}, + { {ASE_T("sprintf"), 7}, 0, {1, MAX, ASE_NULL}, __bfn_sprintf}, - { {ASE_NULL, 0}, 0, 0, 0, ASE_NULL, ASE_NULL} + { {ASE_NULL, 0}, 0, {0, 0, ASE_NULL}, ASE_NULL} }; void* ase_awk_addbfn ( @@ -275,7 +275,7 @@ static int __bfn_fflush ( ase_char_t* str0; ase_size_t len0; int n; - + nargs = ase_awk_getnargs (run); ASE_AWK_ASSERT (run->awk, nargs == 0 || nargs == 1); diff --git a/ase/awk/jni.c b/ase/awk/jni.c index be4519ef..bba9619e 100644 --- a/ase/awk/jni.c +++ b/ase/awk/jni.c @@ -1,5 +1,5 @@ /* - * $Id: jni.c,v 1.31 2006-11-29 02:39:09 bacon Exp $ + * $Id: jni.c,v 1.32 2006-11-29 03:18:18 bacon Exp $ */ #include @@ -965,7 +965,7 @@ static int __handle_bfn ( /* unwinde the local references */ for (j = 0; j < i; j++) { - arg = (*env)->GetObjectArrayElement (env, args, i, arg); + arg = (*env)->GetObjectArrayElement (env, args, i); if (arg != NULL) (*env)->DeleteLocalRef (env, arg); } diff --git a/ase/lsp/lsp.c b/ase/lsp/lsp.c index b6f2f7ac..f4b4b9e7 100644 --- a/ase/lsp/lsp.c +++ b/ase/lsp/lsp.c @@ -1,5 +1,5 @@ /* - * $Id: lsp.c,v 1.18 2006-11-29 02:54:17 bacon Exp $ + * $Id: lsp.c,v 1.19 2006-11-29 03:19:48 bacon Exp $ */ #if defined(__BORLANDC__) @@ -42,7 +42,7 @@ ase_lsp_t* ase_lsp_open ( syscas->dprintf == ASE_NULL || syscas->abort == ASE_NULL) return ASE_NULL; -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG) lsp = (ase_lsp_t*) malloc (ASE_SIZEOF(ase_lsp_t)); #else lsp = (ase_lsp_t*) syscas->malloc ( diff --git a/ase/lsp/lsp_i.h b/ase/lsp/lsp_i.h index 6f7d43cf..a54cd5dd 100644 --- a/ase/lsp/lsp_i.h +++ b/ase/lsp/lsp_i.h @@ -1,5 +1,5 @@ /* - * $Id: lsp_i.h,v 1.4 2006-10-29 13:00:39 bacon Exp $ + * $Id: lsp_i.h,v 1.5 2006-11-29 03:19:49 bacon Exp $ */ #ifndef _ASE_LSP_LSPI_H_ @@ -17,7 +17,7 @@ #pragma warning (disable: 4996) #endif -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG) #define _CRTDBG_MAP_ALLOC #include diff --git a/ase/macros.h b/ase/macros.h index 6a843add..a251b656 100644 --- a/ase/macros.h +++ b/ase/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h,v 1.43 2006-11-29 03:02:07 bacon Exp $ + * $Id: macros.h,v 1.44 2006-11-29 03:18:18 bacon Exp $ */ #ifndef _ASE_MACROS_H_ @@ -15,7 +15,6 @@ #endif #define ASE_CHAR_EOF ((ase_cint_t)-1) -#define ASE_UNUSED(x) ((x) = (x)) #define ASE_SIZEOF(n) (sizeof(n)) #define ASE_COUNTOF(n) (sizeof(n)/sizeof(n[0]))