*** empty log message ***

This commit is contained in:
2006-10-24 04:48:52 +00:00
parent ef845392e4
commit 6c99da0073
7 changed files with 196 additions and 209 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.h,v 1.133 2006-10-24 04:10:12 bacon Exp $
* $Id: awk.h,v 1.134 2006-10-24 04:48:52 bacon Exp $
*/
#ifndef _ASE_AWK_AWK_H_
@ -316,6 +316,14 @@ enum
ASE_AWK_EXTIO_NUM
};
/* assertion statement */
#ifdef NDEBUG
#define ase_awk_assert(awk,expr) ((void)0)
#else
#define ase_awk_assert(awk,expr) (void)((expr) || \
(ase_awk_assertfail (awk, ASE_T(#expr), ASE_T(__FILE__), __LINE__), 0))
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -411,6 +419,10 @@ ase_char_t* ase_awk_strxnstr (
const ase_char_t* str, ase_size_t strsz,
const ase_char_t* sub, ase_size_t subsz);
/* abort function for assertion. use ase_awk_assert instead */
int ase_awk_assertfail (ase_awk_t* awk,
const ase_char_t* expr, const ase_char_t* file, int line);
/* utility functions to convert an error number ot a string */
const ase_char_t* ase_awk_geterrstr (int errnum);

View File

@ -1,5 +1,5 @@
/*
* $Id: awk_i.h,v 1.72 2006-10-24 04:10:12 bacon Exp $
* $Id: awk_i.h,v 1.73 2006-10-24 04:48:52 bacon Exp $
*/
#ifndef _ASE_AWK_AWKI_H_
@ -21,13 +21,6 @@ typedef struct ase_awk_tree_t ase_awk_tree_t;
#include <ase/awk/extio.h>
#include <ase/awk/misc.h>
#ifdef NDEBUG
#define ase_awk_assert(awk,expr) ((void)0)
#else
#define ase_awk_assert(awk,expr) (void)((expr) || \
(ase_awk_abort(awk, ASE_T(#expr), ASE_T(__FILE__), __LINE__), 0))
#endif
#ifdef _MSC_VER
#pragma warning (disable: 4996)
#endif

View File

@ -1,17 +1,9 @@
/*
* $Id: func.c,v 1.68 2006-10-24 04:10:12 bacon Exp $
* $Id: func.c,v 1.69 2006-10-24 04:48:52 bacon Exp $
*/
#include <ase/awk/awk_i.h>
#ifdef _WIN32
#include <tchar.h>
#include <math.h>
#else
#include <stdlib.h>
#include <math.h>
#endif
static int __bfn_close (ase_awk_run_t* run);
static int __bfn_fflush (ase_awk_run_t* run);
static int __bfn_index (ase_awk_run_t* run);
@ -23,8 +15,6 @@ static int __bfn_toupper (ase_awk_run_t* run);
static int __bfn_gsub (ase_awk_run_t* run);
static int __bfn_sub (ase_awk_run_t* run);
static int __bfn_match (ase_awk_run_t* run);
static int __bfn_system (ase_awk_run_t* run);
/*static int __bfn_sin (ase_awk_run_t* run);*/
/* TODO: move it under the awk structure... */
static ase_awk_bfn_t __sys_bfn[] =
@ -44,10 +34,6 @@ static ase_awk_bfn_t __sys_bfn[] =
{ASE_T("sub"), 3, 0, 2, 3, ASE_T("xvr"), __bfn_sub},
{ASE_T("match"), 5, 0, 2, 2, ASE_T("vx"), __bfn_match},
/* TODO: remove these two functions */
{ASE_T("system"), 6, 0, 1, 1, ASE_NULL, __bfn_system},
/*{ ASE_T("sin"), 3, 0, 1, 1, ASE_NULL, __bfn_sin},*/
{ASE_NULL, 0, 0, 0, 0, ASE_NULL, ASE_NULL}
};
@ -1253,6 +1239,7 @@ static int __bfn_match (ase_awk_run_t* run)
return 0;
}
#if 0
static int __bfn_system (ase_awk_run_t* run)
{
ase_size_t nargs;
@ -1289,7 +1276,6 @@ static int __bfn_system (ase_awk_run_t* run)
}
/* math functions */
#if 0
static int __bfn_sin (ase_awk_run_t* run)
{
ase_size_t nargs;

View File

@ -1,5 +1,5 @@
/*
* $Id: misc.c,v 1.31 2006-10-24 04:10:12 bacon Exp $
* $Id: misc.c,v 1.32 2006-10-24 04:48:52 bacon Exp $
*/
#include <ase/awk/awk_i.h>
@ -1060,7 +1060,7 @@ exit_loop:
}
}
int ase_awk_abort (ase_awk_t* awk,
int ase_awk_assertfail (ase_awk_t* awk,
const ase_char_t* expr, const ase_char_t* file, int line)
{
awk->syscas.dprintf (

View File

@ -1,5 +1,5 @@
/*
* $Id: misc.h,v 1.7 2006-10-24 04:10:12 bacon Exp $
* $Id: misc.h,v 1.8 2006-10-24 04:48:52 bacon Exp $
*/
#ifndef _ASE_AWK_MISC_H_
@ -38,9 +38,6 @@ ase_char_t* ase_awk_strxntokbyrex (
ase_awk_run_t* run, const ase_char_t* s, ase_size_t len,
void* rex, ase_char_t** tok, ase_size_t* tok_len, int* errnum);
int ase_awk_abort (ase_awk_t* awk,
const ase_char_t* expr, const ase_char_t* file, int line);
#ifdef __cplusplus
}
#endif