added qse_sio_openstd().
added QSE_SED_ZEROA1 and related code
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: fio.h 565 2011-09-11 02:48:21Z hyunghwan.chung $
|
||||
* $Id: fio.h 569 2011-09-19 06:51:02Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2011 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -55,6 +55,14 @@ enum qse_fio_open_flag_t
|
||||
QSE_FIO_SEQUENTIAL = (1 << 27) /* hint that access is sequential */
|
||||
};
|
||||
|
||||
enum qse_fio_std_t
|
||||
{
|
||||
QSE_FIO_STDIN = 0,
|
||||
QSE_FIO_STDOUT = 1,
|
||||
QSE_FIO_STDERR = 2
|
||||
};
|
||||
typedef enum qse_fio_std_t qse_fio_std_t;
|
||||
|
||||
/* seek origin */
|
||||
enum qse_fio_ori_t
|
||||
{
|
||||
@ -62,6 +70,8 @@ enum qse_fio_ori_t
|
||||
QSE_FIO_CURRENT = 1,
|
||||
QSE_FIO_END = 2
|
||||
};
|
||||
/* file origin for seek */
|
||||
typedef enum qse_fio_ori_t qse_fio_ori_t;
|
||||
|
||||
enum qse_fio_mode_t
|
||||
{
|
||||
@ -95,9 +105,6 @@ enum qse_fio_mode_t
|
||||
/* file offset */
|
||||
typedef qse_foff_t qse_fio_off_t;
|
||||
|
||||
/* file origin for seek */
|
||||
typedef enum qse_fio_ori_t qse_fio_ori_t;
|
||||
|
||||
typedef struct qse_fio_t qse_fio_t;
|
||||
typedef struct qse_fio_lck_t qse_fio_lck_t;
|
||||
|
||||
@ -143,14 +150,14 @@ qse_fio_t* qse_fio_open (
|
||||
int mode
|
||||
);
|
||||
|
||||
/***
|
||||
/**
|
||||
* The qse_fio_close() function closes a file.
|
||||
*/
|
||||
void qse_fio_close (
|
||||
qse_fio_t* fio
|
||||
);
|
||||
|
||||
/***
|
||||
/**
|
||||
* The qse_fio_close() function opens a file into @a fio.
|
||||
*/
|
||||
int qse_fio_init (
|
||||
@ -161,7 +168,7 @@ int qse_fio_init (
|
||||
int mode
|
||||
);
|
||||
|
||||
/***
|
||||
/**
|
||||
* The qse_fio_close() function finalizes a file by closing the handle
|
||||
* stored in @a fio.
|
||||
*/
|
||||
@ -169,6 +176,7 @@ void qse_fio_fini (
|
||||
qse_fio_t* fio
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* The qse_fio_gethandle() function returns the native file handle.
|
||||
*/
|
||||
@ -271,6 +279,12 @@ int qse_fio_unlock (
|
||||
int flags
|
||||
);
|
||||
|
||||
|
||||
int qse_getstdfiohandle (
|
||||
qse_fio_std_t std,
|
||||
qse_fio_hnd_t* hnd
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: sio.h 568 2011-09-17 15:41:26Z hyunghwan.chung $
|
||||
* $Id: sio.h 569 2011-09-19 06:51:02Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2011 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -50,6 +50,11 @@ enum qse_sio_open_flag_t
|
||||
|
||||
typedef qse_fio_off_t qse_sio_pos_t;
|
||||
typedef qse_fio_hnd_t qse_sio_hnd_t;
|
||||
typedef qse_fio_std_t qse_sio_std_t;
|
||||
|
||||
#define QSE_SIO_STDIN QSE_FIO_STDIN
|
||||
#define QSE_SIO_STDOUT QSE_FIO_STDOUT
|
||||
#define QSE_SIO_STDER QSE_FIO_STDERR
|
||||
|
||||
/**
|
||||
* The qse_sio_t type defines a simple text stream over a file. It also
|
||||
@ -86,6 +91,13 @@ qse_sio_t* qse_sio_open (
|
||||
int flags /**< number OR'ed of #qse_sio_open_flag_t */
|
||||
);
|
||||
|
||||
qse_sio_t* qse_sio_openstd (
|
||||
qse_mmgr_t* mmgr, /**< memory manager */
|
||||
qse_size_t xtnsize, /**< extension size in bytes */
|
||||
qse_sio_std_t std, /**< standard I/O identifier */
|
||||
int flags /**< number OR'ed of #qse_sio_open_flag_t */
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_sio_close() function destroys a stream object.
|
||||
*/
|
||||
@ -100,6 +112,13 @@ int qse_sio_init (
|
||||
int flags
|
||||
);
|
||||
|
||||
int qse_sio_initstd (
|
||||
qse_sio_t* sio,
|
||||
qse_mmgr_t* mmgr,
|
||||
qse_sio_std_t std,
|
||||
int flags
|
||||
);
|
||||
|
||||
void qse_sio_fini (
|
||||
qse_sio_t* sio
|
||||
);
|
||||
|
Reference in New Issue
Block a user