enhanced code
- changed qse_strfcpy() and qse_strxfcpy() to accept a string array - removed the data field from qse_awk_prm_t - made relevant changes
This commit is contained in:
@ -64,6 +64,8 @@ public:
|
||||
typedef qse_awk_rtx_t run_t;
|
||||
/** Represents the underlying interpreter */
|
||||
typedef qse_awk_t awk_t;
|
||||
/** Represents the underlying runtime context */
|
||||
typedef qse_awk_rtx_t rtx_t;
|
||||
|
||||
enum ccls_type_t
|
||||
{
|
||||
@ -793,6 +795,7 @@ protected:
|
||||
|
||||
void clearError ();
|
||||
void retrieveError ();
|
||||
void retrieveError (rtx_t* rtx);
|
||||
|
||||
public:
|
||||
/**
|
||||
@ -1088,8 +1091,8 @@ protected:
|
||||
static bool_t isType (void* data, cint_t c, qse_ccls_type_t type);
|
||||
static cint_t transCase (void* data, cint_t c, qse_ccls_type_t type);
|
||||
|
||||
static real_t pow (void* data, real_t x, real_t y);
|
||||
static int sprintf (void* data, char_t* buf, size_t size,
|
||||
static real_t pow (awk_t* data, real_t x, real_t y);
|
||||
static int sprintf (awk_t* data, char_t* buf, size_t size,
|
||||
const char_t* fmt, ...);
|
||||
|
||||
protected:
|
||||
|
@ -59,13 +59,13 @@ typedef struct qse_awk_rcb_t qse_awk_rcb_t;
|
||||
typedef struct qse_awk_rexfns_t qse_awk_rexfns_t;
|
||||
|
||||
typedef qse_real_t (*qse_awk_pow_t) (
|
||||
void* data,
|
||||
qse_awk_t* awk,
|
||||
qse_real_t x,
|
||||
qse_real_t y
|
||||
);
|
||||
|
||||
typedef int (*qse_awk_sprintf_t) (
|
||||
void* data,
|
||||
qse_awk_t* awk,
|
||||
qse_char_t* buf,
|
||||
qse_size_t size,
|
||||
const qse_char_t* fmt,
|
||||
@ -112,9 +112,6 @@ struct qse_awk_prm_t
|
||||
{
|
||||
qse_awk_pow_t pow; /* required */
|
||||
qse_awk_sprintf_t sprintf; /* required */
|
||||
|
||||
/* user-defined data passed to the functions above */
|
||||
void* data; /* optional */
|
||||
};
|
||||
|
||||
struct qse_awk_sio_t
|
||||
|
@ -177,7 +177,7 @@ qse_size_t qse_strxncpy (
|
||||
qse_size_t qse_strfcpy (
|
||||
qse_char_t* buf,
|
||||
const qse_char_t* fmt,
|
||||
...
|
||||
const qse_char_t* str[]
|
||||
);
|
||||
/******/
|
||||
|
||||
@ -189,7 +189,7 @@ qse_size_t qse_strfcpy (
|
||||
qse_size_t qse_strfncpy (
|
||||
qse_char_t* buf,
|
||||
const qse_char_t* fmt,
|
||||
const qse_cstr_t* str
|
||||
const qse_cstr_t str[]
|
||||
);
|
||||
/******/
|
||||
|
||||
@ -202,7 +202,7 @@ qse_size_t qse_strxfcpy (
|
||||
qse_char_t* buf,
|
||||
qse_size_t bsz,
|
||||
const qse_char_t* fmt,
|
||||
...
|
||||
const qse_char_t* str[]
|
||||
);
|
||||
/******/
|
||||
|
||||
@ -215,7 +215,7 @@ qse_size_t qse_strxfncpy (
|
||||
qse_char_t* buf,
|
||||
qse_size_t bsz,
|
||||
const qse_char_t* fmt,
|
||||
const qse_cstr_t* str
|
||||
const qse_cstr_t str[]
|
||||
);
|
||||
/******/
|
||||
|
||||
|
Reference in New Issue
Block a user