* fixed a bug of not setting an error code upon a few cases of QSE_AWK_STRXDUP failures

* added a new memory debugging facility to qseawk
This commit is contained in:
2011-08-14 10:04:14 +00:00
parent e833fdff6f
commit 4527bf0a34
11 changed files with 107 additions and 34 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: sio.h 441 2011-04-22 14:28:43Z hyunghwan.chung $
* $Id: sio.h 547 2011-08-13 16:04:14Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -50,6 +50,10 @@ enum qse_sio_open_flag_t
typedef qse_fio_off_t qse_sio_pos_t;
typedef qse_fio_hnd_t qse_sio_hnd_t;
/**
* The qse_sio_t type defines a simple text stream over a file. It also
* provides predefined streams for standard input, output, and error.
*/
typedef struct qse_sio_t qse_sio_t;
struct qse_sio_t
@ -145,7 +149,7 @@ qse_ssize_t qse_sio_putsn (
);
/**
* The get_sio_getpos() gets the current position in a stream.
* The qse_sio_getpos() gets the current position in a stream.
* Note that it may not return the desired postion due to buffering.
* @return 0 on success, -1 on failure
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: tio.h 441 2011-04-22 14:28:43Z hyunghwan.chung $
* $Id: tio.h 547 2011-08-13 16:04:14Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -51,12 +51,12 @@ typedef enum qse_tio_errnum_t qse_tio_errnum_t;
enum
{
/* the size of input buffer should be at least equal to or greater
* than the maximum sequence length of the qse_mchar_t string.
* (i.e. 6 for utf8)
*/
QSE_TIO_MAX_INBUF_LEN = 4096,
QSE_TIO_MAX_OUTBUF_LEN = 4096
/* the size of input buffer should be at least equal to or greater
* than the maximum sequence length of the qse_mchar_t string.
* (i.e. 6 for utf8)
*/
QSE_TIO_MAX_INBUF_LEN = 4096,
QSE_TIO_MAX_OUTBUF_LEN = 4096
};
enum
@ -98,12 +98,12 @@ struct qse_tio_t
/* for housekeeping */
int input_status;
qse_size_t inbuf_curp;
qse_size_t inbuf_len;
qse_size_t outbuf_len;
qse_size_t inbuf_curp;
qse_size_t inbuf_len;
qse_size_t outbuf_len;
qse_mchar_t inbuf[QSE_TIO_MAX_INBUF_LEN];
qse_mchar_t outbuf[QSE_TIO_MAX_OUTBUF_LEN];
qse_mchar_t inbuf[QSE_TIO_MAX_INBUF_LEN];
qse_mchar_t outbuf[QSE_TIO_MAX_OUTBUF_LEN];
};
#ifdef __cplusplus