added qse_awk_setopt()/qse_awk_getopt().
deleted qse_awk_getoption()/qse_awk_setoption()/qse_awk_setmaxdepth()/qse_awk_getmaxdepth(). redefined enumeration types related to the functions added or deleted above. moved fnc_sleep from cmd/awk/awk.c to mod/awk/sys.c managed to get external module call working in the primitive level
This commit is contained in:
@ -53,11 +53,16 @@ public:
|
||||
typedef qse_awk_errstr_t errstr_t;
|
||||
typedef qse_awk_errinf_t errinf_t;
|
||||
|
||||
/// The depth_t type redefines #qse_awk_depth_t.
|
||||
typedef qse_awk_depth_t depth_t;
|
||||
|
||||
/// The option_t type redefines #qse_awk_option_t.
|
||||
typedef qse_awk_option_t option_t;
|
||||
enum depth_t
|
||||
{
|
||||
DEPTH_INCLUDE = QSE_AWK_DEPTH_INCLUDE,
|
||||
DEPTH_BLOCK_PARSE = QSE_AWK_DEPTH_BLOCK_PARSE,
|
||||
DEPTH_BLOCK_RUN = QSE_AWK_DEPTH_BLOCK_RUN,
|
||||
DEPTH_EXPR_PARSE = QSE_AWK_DEPTH_EXPR_PARSE,
|
||||
DEPTH_EXPR_RUN = QSE_AWK_DEPTH_EXPR_RUN,
|
||||
DEPTH_REX_BUILD = QSE_AWK_DEPTH_REX_BUILD,
|
||||
DEPTH_REX_MATCH = QSE_AWK_DEPTH_REX_MATCH
|
||||
};
|
||||
|
||||
/// The gbl_id_t type redefines #qse_awk_gbl_id_t.
|
||||
typedef qse_awk_gbl_id_t gbl_id_t;
|
||||
@ -948,16 +953,16 @@ public:
|
||||
///
|
||||
|
||||
///
|
||||
/// The getOption() function gets the current options.
|
||||
/// @return 0 or current options ORed of #option_t enumerators.
|
||||
/// The getTrait() function gets the current options.
|
||||
/// @return current traits
|
||||
///
|
||||
int getOption () const;
|
||||
int getTrait () const;
|
||||
|
||||
///
|
||||
/// The setOption() function changes the current options.
|
||||
/// The setTrait() function changes the current traits.
|
||||
///
|
||||
void setOption (
|
||||
int opt ///< options ORed of #option_t enumerators.
|
||||
void setTrait (
|
||||
int trait
|
||||
);
|
||||
|
||||
///
|
||||
@ -965,7 +970,7 @@ public:
|
||||
/// for operations identified by @a ids.
|
||||
///
|
||||
void setMaxDepth (
|
||||
int ids, ///< number ORed of #depth_t enumerators
|
||||
depth_t id, ///< depth identifier
|
||||
size_t depth ///< new depth
|
||||
);
|
||||
|
||||
@ -974,7 +979,7 @@ public:
|
||||
/// type identified by @a id.
|
||||
///
|
||||
size_t getMaxDepth (
|
||||
depth_t id ///< operation identifier
|
||||
depth_t id ///< depth identifier
|
||||
) const;
|
||||
|
||||
///
|
||||
|
@ -391,6 +391,7 @@ typedef qse_flt_t (*qse_awk_math2_t) (
|
||||
);
|
||||
|
||||
|
||||
#if 0
|
||||
typedef void* (*qse_awk_buildrex_t) (
|
||||
qse_awk_t* awk,
|
||||
const qse_char_t* ptn,
|
||||
@ -416,6 +417,7 @@ typedef qse_bool_t (*qse_awk_isemptyrex_t) (
|
||||
qse_awk_t* awk,
|
||||
void* code
|
||||
);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The qse_awk_fnc_impl_t type defines a intrinsic function handler.
|
||||
@ -809,11 +811,26 @@ struct qse_awk_rtx_ecb_t
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
enum qse_awk_opt_t
|
||||
{
|
||||
QSE_AWK_TRAIT = 0,
|
||||
QSE_AWK_DEPTH_INCLUDE,
|
||||
QSE_AWK_DEPTH_BLOCK_PARSE,
|
||||
QSE_AWK_DEPTH_BLOCK_RUN,
|
||||
QSE_AWK_DEPTH_EXPR_PARSE,
|
||||
QSE_AWK_DEPTH_EXPR_RUN,
|
||||
QSE_AWK_DEPTH_REX_BUILD,
|
||||
QSE_AWK_DEPTH_REX_MATCH
|
||||
};
|
||||
typedef enum qse_awk_opt_t qse_awk_opt_t;
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* The qse_awk_option_t type defines various options to change the behavior
|
||||
* The qse_awk_trait_t type defines various options to change the behavior
|
||||
* of #qse_awk_t.
|
||||
*/
|
||||
enum qse_awk_option_t
|
||||
enum qse_awk_trait_t
|
||||
{
|
||||
/**
|
||||
* allows undeclared variables and implicit concatenation
|
||||
@ -942,7 +959,8 @@ enum qse_awk_option_t
|
||||
QSE_AWK_NEWLINE | QSE_AWK_PABLOCK |
|
||||
QSE_AWK_STRIPSTRSPC | QSE_AWK_STRICTNAMING
|
||||
};
|
||||
typedef enum qse_awk_option_t qse_awk_option_t;
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* The qse_awk_errnum_t type defines error codes.
|
||||
@ -1106,22 +1124,6 @@ typedef const qse_char_t* (*qse_awk_errstr_t) (
|
||||
qse_awk_errnum_t num /**< error number */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_depth_t type defines operation types requiring recursion depth
|
||||
* control.
|
||||
*/
|
||||
enum qse_awk_depth_t
|
||||
{
|
||||
QSE_AWK_DEPTH_BLOCK_PARSE = (1 << 0),
|
||||
QSE_AWK_DEPTH_BLOCK_RUN = (1 << 1),
|
||||
QSE_AWK_DEPTH_EXPR_PARSE = (1 << 2),
|
||||
QSE_AWK_DEPTH_EXPR_RUN = (1 << 3),
|
||||
QSE_AWK_DEPTH_REX_BUILD = (1 << 4),
|
||||
QSE_AWK_DEPTH_REX_MATCH = (1 << 5),
|
||||
QSE_AWK_DEPTH_INCLUDE = (1 << 6)
|
||||
};
|
||||
typedef enum qse_awk_depth_t qse_awk_depth_t;
|
||||
|
||||
/**
|
||||
* The qse_awk_gbl_id_t type defines intrinsic globals variable IDs.
|
||||
*/
|
||||
@ -1435,41 +1437,16 @@ void qse_awk_seterror (
|
||||
const qse_awk_loc_t* errloc /**< error location */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_getoption() function gets the current options set.
|
||||
* @return 0 or a number ORed of #qse_awk_option_t enumerators.
|
||||
*/
|
||||
int qse_awk_getoption (
|
||||
const qse_awk_t* awk /**< awk */
|
||||
int qse_awk_getopt (
|
||||
qse_awk_t* awk,
|
||||
qse_awk_opt_t id,
|
||||
void* value
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_setoption() function sets the options.
|
||||
*/
|
||||
void qse_awk_setoption (
|
||||
qse_awk_t* awk, /**< awk */
|
||||
int opt /**< 0 or a number ORed of
|
||||
* #qse_awk_option_t enumerators */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_getmaxdepth() function gets the current maximum recursing depth
|
||||
* for a specified operation @a type.
|
||||
* @return maximum depth
|
||||
*/
|
||||
qse_size_t qse_awk_getmaxdepth (
|
||||
const qse_awk_t* awk, /**< awk */
|
||||
qse_awk_depth_t type /**< operation type */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_setmaxdepth() function sets the maximum recursing depth for
|
||||
* operations indicated by @a types.
|
||||
*/
|
||||
void qse_awk_setmaxdepth (
|
||||
qse_awk_t* awk, /**< awk */
|
||||
int types, /**< number ORed of #qse_awk_depth_t enumerators */
|
||||
qse_size_t depth /**< maximum depth */
|
||||
int qse_awk_setopt (
|
||||
qse_awk_t* awk,
|
||||
qse_awk_opt_t id,
|
||||
const void* value
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -44,6 +44,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
enum qse_awk_optstd_t
|
||||
{
|
||||
QSE_AWK_MODDIR = 0
|
||||
};
|
||||
|
||||
typedef enum qse_awk_optstd_t qse_awk_optstd_t;
|
||||
|
||||
/**
|
||||
* The qse_awk_parsestd_type_t type defines the types of source I/O.
|
||||
*/
|
||||
@ -128,6 +135,18 @@ void* qse_awk_getxtnstd (
|
||||
qse_awk_t* awk
|
||||
);
|
||||
|
||||
int qse_awk_getoptstd (
|
||||
qse_awk_t* awk,
|
||||
qse_awk_optstd_t id,
|
||||
void* value
|
||||
);
|
||||
|
||||
int qse_awk_setoptstd (
|
||||
qse_awk_t* awk,
|
||||
qse_awk_optstd_t id,
|
||||
const void* value
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_awk_parsestd() functions parses source script.
|
||||
* The code below shows how to parse a literal string 'BEGIN { print 10; }'
|
||||
|
@ -812,14 +812,14 @@ int qse_httpd_getserveroptstd (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_server_t* server,
|
||||
qse_httpd_server_optstd_t id,
|
||||
void** value
|
||||
void* value
|
||||
);
|
||||
|
||||
int qse_httpd_setserveroptstd (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_server_t* server,
|
||||
qse_httpd_server_optstd_t id,
|
||||
void* value
|
||||
const void* value
|
||||
);
|
||||
|
||||
void* qse_httpd_getserverxtnstd (
|
||||
|
Reference in New Issue
Block a user