added qse_dir_t.
added qse_mux_t. added dir::xxx() for awk
This commit is contained in:
parent
a3ee069804
commit
7e509d4daa
@ -1432,11 +1432,6 @@ QSE_EXPORT int qse_awk_close (
|
||||
qse_awk_t* awk /**< awk */
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_awk_setmmgr (
|
||||
qse_awk_t* awk,
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_mmgr_t* qse_awk_getmmgr (
|
||||
qse_awk_t* awk
|
||||
);
|
||||
|
@ -5,6 +5,7 @@ pkginclude_HEADERS = \
|
||||
chr.h \
|
||||
cp949.h \
|
||||
cp950.h \
|
||||
dir.h \
|
||||
dll.h \
|
||||
env.h \
|
||||
fio.h \
|
||||
@ -21,6 +22,7 @@ pkginclude_HEADERS = \
|
||||
map.h \
|
||||
mbwc.h \
|
||||
mem.h \
|
||||
mux.h \
|
||||
nwad.h \
|
||||
nwif.h \
|
||||
nwio.h \
|
||||
|
@ -52,12 +52,12 @@ CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dll.h env.h \
|
||||
fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h \
|
||||
main.h map.h mbwc.h mem.h nwad.h nwif.h nwio.h oht.h opt.h \
|
||||
path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h stdio.h \
|
||||
str.h task.h time.h tio.h tre.h uri.h utf8.h xma.h Mmgr.hpp \
|
||||
StdMmgr.hpp Mmged.hpp
|
||||
am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dir.h dll.h \
|
||||
env.h fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h \
|
||||
lda.h main.h map.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h \
|
||||
oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
stdio.h str.h task.h time.h tio.h tre.h uri.h utf8.h xma.h \
|
||||
Mmgr.hpp StdMmgr.hpp Mmged.hpp
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
@ -262,11 +262,12 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
pkginclude_HEADERS = alg.h chr.h cp949.h cp950.h dll.h env.h fio.h \
|
||||
fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h main.h \
|
||||
map.h mbwc.h mem.h nwad.h nwif.h nwio.h oht.h opt.h path.h \
|
||||
pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h stdio.h str.h \
|
||||
task.h time.h tio.h tre.h uri.h utf8.h xma.h $(am__append_1)
|
||||
pkginclude_HEADERS = alg.h chr.h cp949.h cp950.h dir.h dll.h env.h \
|
||||
fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h \
|
||||
main.h map.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h oht.h \
|
||||
opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
stdio.h str.h task.h time.h tio.h tre.h uri.h utf8.h xma.h \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
108
qse/include/qse/cmn/dir.h
Normal file
108
qse/include/qse/cmn/dir.h
Normal file
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_DIR_H_
|
||||
#define _QSE_DIR_H_
|
||||
|
||||
/** @file
|
||||
* This file provides functions and data types for I/O multiplexing.
|
||||
*/
|
||||
|
||||
#include <qse/types.h>
|
||||
#include <qse/macros.h>
|
||||
#include <qse/cmn/time.h>
|
||||
|
||||
typedef struct qse_dir_t qse_dir_t;
|
||||
typedef struct qse_dir_ent_t qse_dir_ent_t;
|
||||
|
||||
enum qse_dir_errnum_t
|
||||
{
|
||||
QSE_DIR_ENOERR = 0, /**< no error */
|
||||
QSE_DIR_EOTHER, /**< other error */
|
||||
QSE_DIR_ENOIMPL, /**< not implemented */
|
||||
QSE_DIR_ESYSERR, /**< subsystem(system call) error */
|
||||
QSE_DIR_EINTERN, /**< internal error */
|
||||
|
||||
QSE_DIR_ENOMEM, /**< out of memory */
|
||||
QSE_DIR_EINVAL, /**< invalid parameter */
|
||||
QSE_DIR_EACCES, /**< access denied */
|
||||
QSE_DIR_ENOENT, /**< no such file */
|
||||
QSE_DIR_EEXIST, /**< already exist */
|
||||
QSE_DIR_EINTR /**< interrupted */
|
||||
};
|
||||
typedef enum qse_dir_errnum_t qse_dir_errnum_t;
|
||||
|
||||
enum qse_dir_flag_t
|
||||
{
|
||||
QSE_DIR_MBSPATH = (1 << 0),
|
||||
QSE_DIR_SORT = (1 << 1),
|
||||
QSE_DIR_STAT = (1 << 2)
|
||||
};
|
||||
|
||||
struct qse_dir_ent_t
|
||||
{
|
||||
const qse_char_t* name;
|
||||
|
||||
struct
|
||||
{
|
||||
int type;
|
||||
qse_foff_t size;
|
||||
qse_ntime_t tmmod;
|
||||
} stat;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
qse_dir_t* qse_dir_open (
|
||||
qse_mmgr_t* mmgr,
|
||||
qse_size_t xtnsize,
|
||||
const qse_char_t* path,
|
||||
int flags
|
||||
);
|
||||
|
||||
void qse_dir_close (
|
||||
qse_dir_t* dir
|
||||
);
|
||||
|
||||
qse_mmgr_t* qse_dir_getmmgr (
|
||||
qse_dir_t* dir
|
||||
);
|
||||
|
||||
void* qse_dir_getxtn (
|
||||
qse_dir_t* dir
|
||||
);
|
||||
|
||||
int qse_dir_reset (
|
||||
qse_dir_t* dir,
|
||||
const qse_char_t* path
|
||||
);
|
||||
|
||||
int qse_dir_read (
|
||||
qse_dir_t* dir,
|
||||
qse_dir_ent_t* ent
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -66,15 +66,6 @@ int qse_glob (
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
int qse_globwithcmgr (
|
||||
const qse_char_t* pattern,
|
||||
qse_glob_cbimpl_t cbimpl,
|
||||
void* cbctx,
|
||||
int flags,
|
||||
qse_mmgr_t* mmgr,
|
||||
qse_cmgr_t* cmgr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
123
qse/include/qse/cmn/mux.h
Normal file
123
qse/include/qse/cmn/mux.h
Normal file
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_MUX_H_
|
||||
#define _QSE_MUX_H_
|
||||
|
||||
/** @file
|
||||
* This file provides functions and data types for I/O multiplexing.
|
||||
*/
|
||||
|
||||
#include <qse/types.h>
|
||||
#include <qse/macros.h>
|
||||
#include <qse/cmn/time.h>
|
||||
|
||||
typedef struct qse_mux_t qse_mux_t;
|
||||
typedef struct qse_mux_evt_t qse_mux_evt_t;
|
||||
|
||||
enum qse_mux_errnum_t
|
||||
{
|
||||
QSE_MUX_ENOERR = 0, /**< no error */
|
||||
QSE_MUX_EOTHER, /**< other error */
|
||||
QSE_MUX_ENOIMPL, /**< not implemented */
|
||||
QSE_MUX_ESYSERR, /**< subsystem(system call) error */
|
||||
QSE_MUX_EINTERN, /**< internal error */
|
||||
|
||||
QSE_MUX_ENOMEM, /**< out of memory */
|
||||
QSE_MUX_EINVAL, /**< invalid parameter */
|
||||
QSE_MUX_EACCES, /**< access denied */
|
||||
QSE_MUX_ENOENT, /**< no such file */
|
||||
QSE_MUX_EEXIST, /**< already exist */
|
||||
QSE_MUX_EINTR /**< interrupted */
|
||||
};
|
||||
typedef enum qse_mux_errnum_t qse_mux_errnum_t;
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef qse_uintptr_t qse_mux_hnd_t;
|
||||
#elif defined(__OS2__)
|
||||
typedef int qse_mux_hnd_t;
|
||||
#elif defined(__DOS__)
|
||||
typedef int qse_mux_hnd_t;
|
||||
#else
|
||||
typedef int qse_mux_hnd_t;
|
||||
#endif
|
||||
|
||||
enum qse_mux_evtmask_t
|
||||
{
|
||||
QSE_MUX_IN = (1 << 0),
|
||||
QSE_MUX_OUT = (1 << 1)
|
||||
};
|
||||
typedef enum qse_mux_evtmask_t qse_mux_evtmask_t;
|
||||
|
||||
typedef void (*qse_mux_evtfun_t) (
|
||||
qse_mux_t* mux,
|
||||
const qse_mux_evt_t* evt
|
||||
);
|
||||
|
||||
struct qse_mux_evt_t
|
||||
{
|
||||
qse_mux_hnd_t hnd;
|
||||
int mask;
|
||||
void* data;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
qse_mux_t* qse_mux_open (
|
||||
qse_mmgr_t* mmgr,
|
||||
qse_size_t xtnsize,
|
||||
qse_mux_evtfun_t evtfun,
|
||||
qse_size_t capahint
|
||||
);
|
||||
|
||||
void qse_mux_close (
|
||||
qse_mux_t* mux
|
||||
);
|
||||
|
||||
qse_mmgr_t* qse_mux_getmmgr (
|
||||
qse_mux_t* mux
|
||||
);
|
||||
|
||||
void* qse_mux_getxtn (
|
||||
qse_mux_t* mux
|
||||
);
|
||||
|
||||
int qse_mux_insert (
|
||||
qse_mux_t* mux,
|
||||
const qse_mux_evt_t* evt
|
||||
);
|
||||
|
||||
int qse_mux_delete (
|
||||
qse_mux_t* mux,
|
||||
const qse_mux_evt_t* evt
|
||||
);
|
||||
|
||||
int qse_mux_poll (
|
||||
qse_mux_t* mux,
|
||||
qse_ntime_t timeout
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -80,13 +80,13 @@ struct qse_nwio_tmout_t
|
||||
typedef struct qse_nwio_tmout_t qse_nwio_tmout_t;
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef qse_intptr_t qse_nwio_hnd_t;
|
||||
typedef qse_uintptr_t qse_nwio_hnd_t;
|
||||
#elif defined(__OS2__)
|
||||
typedef int qse_nwio_hnd_t; /**< defines a pipe handle type */
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#elif defined(__DOS__)
|
||||
typedef int qse_nwio_hnd_t; /**< defines a pipe handle type */
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#else
|
||||
typedef int qse_nwio_hnd_t; /**< defines a pipe handle type */
|
||||
typedef int qse_nwio_hnd_t;
|
||||
#endif
|
||||
|
||||
typedef struct qse_nwio_t qse_nwio_t;
|
||||
|
@ -49,6 +49,17 @@ enum qse_canonpath_flag_t
|
||||
QSE_CANONPATH_DROPTRAILINGSEP = (1 << 2)
|
||||
};
|
||||
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define QSE_ISPATHSEP(c) ((c) == QSE_T('/') || (c) == QSE_T('\\'))
|
||||
# define QSE_ISPATHMBSEP(c) ((c) == QSE_MT('/') || (c) == QSE_MT('\\'))
|
||||
# define QSE_ISPATHWCSEP(c) ((c) == QSE_WT('/') || (c) == QSE_WT('\\'))
|
||||
#else
|
||||
# define QSE_ISPATHSEP(c) ((c) == QSE_T('/'))
|
||||
# define QSE_ISPATHMBSEP(c) ((c) == QSE_MT('/'))
|
||||
# define QSE_ISPATHWCSEP(c) ((c) == QSE_WT('/'))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -329,7 +329,6 @@
|
||||
* of a relevant object created with an extension size greater than 0.
|
||||
*/
|
||||
#define QSE_DEFINE_COMMON_FUNCTIONS(name) \
|
||||
void qse_##name##_setmmgr (qse_##name##_t* name, qse_mmgr_t* mmgr); \
|
||||
qse_mmgr_t* qse_##name##_getmmgr (qse_##name##_t* name); \
|
||||
void* qse_##name##_getxtn (qse_##name##_t* name);
|
||||
|
||||
@ -345,10 +344,6 @@ void* qse_##name##_getxtn (qse_##name##_t* name);
|
||||
* an object.
|
||||
*/
|
||||
#define QSE_IMPLEMENT_COMMON_FUNCTIONS(name) \
|
||||
void qse_##name##_setmmgr (qse_##name##_t* name, qse_mmgr_t* mmgr) \
|
||||
{ \
|
||||
(name)->mmgr = mmgr; \
|
||||
} \
|
||||
qse_mmgr_t* qse_##name##_getmmgr (qse_##name##_t* name) \
|
||||
{ \
|
||||
return (name)->mmgr; \
|
||||
|
@ -135,11 +135,6 @@ QSE_EXPORT void qse_htrd_fini (
|
||||
qse_htrd_t* htrd
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_htrd_setmmgr (
|
||||
qse_htrd_t* htrd,
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_mmgr_t* qse_htrd_getmmgr (
|
||||
qse_htrd_t* htrd
|
||||
);
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <qse/cmn/time.h>
|
||||
|
||||
typedef struct qse_httpd_t qse_httpd_t;
|
||||
typedef struct qse_httpd_server_t qse_httpd_server_t;
|
||||
typedef struct qse_httpd_client_t qse_httpd_client_t;
|
||||
|
||||
enum qse_httpd_errnum_t
|
||||
@ -73,36 +74,6 @@ struct qse_httpd_stat_t
|
||||
qse_ntime_t mtime;
|
||||
};
|
||||
|
||||
enum qse_httpd_server_flag_t
|
||||
{
|
||||
QSE_HTTPD_SERVER_ACTIVE = (1 << 0),
|
||||
QSE_HTTPD_SERVER_SECURE = (1 << 1),
|
||||
QSE_HTTPD_SERVER_BINDTONWIF = (1 << 2)
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_server_t qse_httpd_server_t;
|
||||
|
||||
typedef void (*qse_httpd_server_predetach_t) (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_server_t* server
|
||||
);
|
||||
|
||||
struct qse_httpd_server_t
|
||||
{
|
||||
/* ---------------------------------------------- */
|
||||
int flags;
|
||||
qse_nwad_t nwad; /* binding address */
|
||||
unsigned int nwif; /* interface number to bind to */
|
||||
|
||||
/* set by server.open callback */
|
||||
qse_ubi_t handle;
|
||||
|
||||
/* private */
|
||||
qse_httpd_server_predetach_t predetach;
|
||||
qse_httpd_server_t* next;
|
||||
qse_httpd_server_t* prev;
|
||||
};
|
||||
|
||||
typedef struct qse_httpd_peer_t qse_httpd_peer_t;
|
||||
struct qse_httpd_peer_t
|
||||
{
|
||||
@ -162,11 +133,9 @@ struct qse_httpd_scb_t
|
||||
|
||||
struct
|
||||
{
|
||||
void* (*open) (qse_httpd_t* httpd);
|
||||
void* (*open) (qse_httpd_t* httpd, qse_httpd_muxcb_t muxcb);
|
||||
void (*close) (qse_httpd_t* httpd, void* mux);
|
||||
int (*addhnd) (
|
||||
qse_httpd_t* httpd, void* mux, qse_ubi_t handle,
|
||||
int mask, qse_httpd_muxcb_t cbfun, void* cbarg);
|
||||
int (*addhnd) (qse_httpd_t* httpd, void* mux, qse_ubi_t handle, int mask, void* cbarg);
|
||||
int (*delhnd) (qse_httpd_t* httpd, void* mux, qse_ubi_t handle);
|
||||
int (*poll) (qse_httpd_t* httpd, void* mux, qse_ntime_t timeout);
|
||||
|
||||
@ -266,6 +235,8 @@ struct qse_httpd_rcb_t
|
||||
qse_mchar_t* buf, int bufsz);
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
typedef struct qse_httpd_task_t qse_httpd_task_t;
|
||||
|
||||
typedef int (*qse_httpd_task_init_t) (
|
||||
@ -286,7 +257,6 @@ typedef int (*qse_httpd_task_main_t) (
|
||||
qse_httpd_task_t* task
|
||||
);
|
||||
|
||||
|
||||
enum qse_httpd_task_trigger_mask_t
|
||||
{
|
||||
QSE_HTTPD_TASK_TRIGGER_READ = (1 << 0),
|
||||
@ -322,11 +292,19 @@ struct qse_httpd_task_t
|
||||
qse_httpd_task_t* next;
|
||||
};
|
||||
|
||||
enum qse_httpd_sctype_t
|
||||
{
|
||||
QSE_HTTPD_SERVER,
|
||||
QSE_HTTPD_CLIENT
|
||||
};
|
||||
typedef enum qse_httpd_sctype_t qse_httpd_sctype_t;
|
||||
|
||||
struct qse_httpd_client_t
|
||||
{
|
||||
/* == PUBLIC == */
|
||||
/* == PRIVATE == */
|
||||
qse_httpd_sctype_t type;
|
||||
|
||||
/* == PUBLIC == */
|
||||
qse_ubi_t handle;
|
||||
qse_ubi_t handle2;
|
||||
qse_nwad_t remote_addr;
|
||||
@ -354,6 +332,38 @@ struct qse_httpd_client_t
|
||||
} task;
|
||||
};
|
||||
|
||||
enum qse_httpd_server_flag_t
|
||||
{
|
||||
QSE_HTTPD_SERVER_ACTIVE = (1 << 0),
|
||||
QSE_HTTPD_SERVER_SECURE = (1 << 1),
|
||||
QSE_HTTPD_SERVER_BINDTONWIF = (1 << 2)
|
||||
};
|
||||
|
||||
typedef void (*qse_httpd_server_predetach_t) (
|
||||
qse_httpd_t* httpd,
|
||||
qse_httpd_server_t* server
|
||||
);
|
||||
|
||||
struct qse_httpd_server_t
|
||||
{
|
||||
qse_httpd_sctype_t type;
|
||||
|
||||
/* ---------------------------------------------- */
|
||||
int flags;
|
||||
qse_nwad_t nwad; /* binding address */
|
||||
unsigned int nwif; /* interface number to bind to */
|
||||
|
||||
/* set by server.open callback */
|
||||
qse_ubi_t handle;
|
||||
|
||||
/* private */
|
||||
qse_httpd_server_predetach_t predetach;
|
||||
qse_httpd_server_t* next;
|
||||
qse_httpd_server_t* prev;
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* The qse_httpd_rsrc_type_t defines the resource type than can
|
||||
* be entasked with qse_httpd_entaskrsrc().
|
||||
@ -523,11 +533,6 @@ QSE_EXPORT void qse_httpd_close (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_httpd_setmmgr (
|
||||
qse_httpd_t* httpd,
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_mmgr_t* qse_httpd_getmmgr (
|
||||
qse_httpd_t* httpd
|
||||
);
|
||||
|
@ -152,11 +152,6 @@ QSE_EXPORT void qse_upxd_seterrnum (
|
||||
qse_upxd_errnum_t errnum
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_upxd_setmmgr (
|
||||
qse_upxd_t* upxd,
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_mmgr_t* qse_upxd_getmmgr (
|
||||
qse_upxd_t* upxd
|
||||
);
|
||||
|
@ -414,11 +414,6 @@ QSE_EXPORT void qse_sed_close (
|
||||
qse_sed_t* sed /**< stream editor */
|
||||
);
|
||||
|
||||
QSE_EXPORT void qse_sed_setmmgr (
|
||||
qse_sed_t* sed,
|
||||
qse_mmgr_t* mmgr
|
||||
);
|
||||
|
||||
QSE_EXPORT qse_mmgr_t* qse_sed_getmmgr (
|
||||
qse_sed_t* sed
|
||||
);
|
||||
|
@ -412,11 +412,6 @@ int qse_awk_clear (qse_awk_t* awk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void qse_awk_setmmgr (qse_awk_t* awk, qse_mmgr_t* mmgr)
|
||||
{
|
||||
awk->mmgr = mmgr;
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_awk_getmmgr (qse_awk_t* awk)
|
||||
{
|
||||
return awk->mmgr;
|
||||
|
@ -28,6 +28,7 @@ libqsecmn_la_SOURCES = \
|
||||
alg-sort.c \
|
||||
assert.c \
|
||||
chr.c \
|
||||
dir.c \
|
||||
dll.c \
|
||||
env.c \
|
||||
gdl.c \
|
||||
@ -46,6 +47,7 @@ libqsecmn_la_SOURCES = \
|
||||
mbwc.c \
|
||||
mbwc-str.c \
|
||||
mem.c \
|
||||
mux.c \
|
||||
nwad.c \
|
||||
nwif.c \
|
||||
nwio.c \
|
||||
|
@ -88,11 +88,11 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libqsecmn_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
am__libqsecmn_la_SOURCES_DIST = alg-base64.c alg-rand.c alg-search.c \
|
||||
alg-sort.c assert.c chr.c dll.c env.c gdl.c htb.c fio.c fma.c \
|
||||
fmt.c fs.c fs-err.c fs-move.c glob.c hton.c ipad.c lda.c \
|
||||
main.c mbwc.c mbwc-str.c mem.c nwad.c nwif.c nwio.c oht.c \
|
||||
opt.c path-basename.c path-canon.c pio.c pma.c rbt.c rex.c \
|
||||
sio.c sll.c slmb.c stdio.c str-beg.c str-cat.c str-chr.c \
|
||||
alg-sort.c assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c \
|
||||
fma.c fmt.c fs.c fs-err.c fs-move.c glob.c hton.c ipad.c lda.c \
|
||||
main.c mbwc.c mbwc-str.c mem.c mux.c nwad.c nwif.c nwio.c \
|
||||
oht.c opt.c path-basename.c path-canon.c pio.c pma.c rbt.c \
|
||||
rex.c sio.c sll.c slmb.c stdio.c str-beg.c str-cat.c str-chr.c \
|
||||
str-cnv.c str-cmp.c str-cpy.c str-del.c str-dup.c str-dynm.c \
|
||||
str-dynw.c str-end.c str-excl.c str-fcpy.c str-fnmat.c \
|
||||
str-incl.c str-len.c str-pac.c str-pbrk.c str-put.c str-rev.c \
|
||||
@ -103,10 +103,10 @@ am__libqsecmn_la_SOURCES_DIST = alg-base64.c alg-rand.c alg-search.c \
|
||||
xma.c cp949.c cp950.c
|
||||
@INCLUDE_MORE_CMGRS_TRUE@am__objects_1 = cp949.lo cp950.lo
|
||||
am_libqsecmn_la_OBJECTS = alg-base64.lo alg-rand.lo alg-search.lo \
|
||||
alg-sort.lo assert.lo chr.lo dll.lo env.lo gdl.lo htb.lo \
|
||||
fio.lo fma.lo fmt.lo fs.lo fs-err.lo fs-move.lo glob.lo \
|
||||
alg-sort.lo assert.lo chr.lo dir.lo dll.lo env.lo gdl.lo \
|
||||
htb.lo fio.lo fma.lo fmt.lo fs.lo fs-err.lo fs-move.lo glob.lo \
|
||||
hton.lo ipad.lo lda.lo main.lo mbwc.lo mbwc-str.lo mem.lo \
|
||||
nwad.lo nwif.lo nwio.lo oht.lo opt.lo path-basename.lo \
|
||||
mux.lo nwad.lo nwif.lo nwio.lo oht.lo opt.lo path-basename.lo \
|
||||
path-canon.lo pio.lo pma.lo rbt.lo rex.lo sio.lo sll.lo \
|
||||
slmb.lo stdio.lo str-beg.lo str-cat.lo str-chr.lo str-cnv.lo \
|
||||
str-cmp.lo str-cpy.lo str-del.lo str-dup.lo str-dynm.lo \
|
||||
@ -350,9 +350,9 @@ noinst_HEADERS = \
|
||||
tre-stack.h
|
||||
|
||||
libqsecmn_la_SOURCES = alg-base64.c alg-rand.c alg-search.c alg-sort.c \
|
||||
assert.c chr.c dll.c env.c gdl.c htb.c fio.c fma.c fmt.c fs.c \
|
||||
fs-err.c fs-move.c glob.c hton.c ipad.c lda.c main.c mbwc.c \
|
||||
mbwc-str.c mem.c nwad.c nwif.c nwio.c oht.c opt.c \
|
||||
assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c fma.c fmt.c \
|
||||
fs.c fs-err.c fs-move.c glob.c hton.c ipad.c lda.c main.c \
|
||||
mbwc.c mbwc-str.c mem.c mux.c nwad.c nwif.c nwio.c oht.c opt.c \
|
||||
path-basename.c path-canon.c pio.c pma.c rbt.c rex.c sio.c \
|
||||
sll.c slmb.c stdio.c str-beg.c str-cat.c str-chr.c str-cnv.c \
|
||||
str-cmp.c str-cpy.c str-del.c str-dup.c str-dynm.c str-dynw.c \
|
||||
@ -455,6 +455,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cp949.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cp950.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dll.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fio.Plo@am__quote@
|
||||
@ -473,6 +474,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbwc-str.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbwc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mux.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nwad.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nwif.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nwio.Plo@am__quote@
|
||||
|
536
qse/lib/cmn/dir.c
Normal file
536
qse/lib/cmn/dir.c
Normal file
@ -0,0 +1,536 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/cmn/dir.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/mbwc.h>
|
||||
#include <qse/cmn/path.h>
|
||||
#include "mem.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <windows.h>
|
||||
#elif defined(__OS2__)
|
||||
# define INCL_DOSFILEMGR
|
||||
# define INCL_ERRORS
|
||||
# include <os2.h>
|
||||
#elif defined(__DOS__)
|
||||
# include <dos.h>
|
||||
# include <errno.h>
|
||||
#else
|
||||
# include "syscall.h"
|
||||
#endif
|
||||
|
||||
struct qse_dir_t
|
||||
{
|
||||
qse_mmgr_t* mmgr;
|
||||
int flags;
|
||||
|
||||
qse_str_t tbuf;
|
||||
qse_mbs_t mbuf;
|
||||
|
||||
#if defined(_WIN32)
|
||||
HANDLE h;
|
||||
WIN32_FIND_DATA wfd;
|
||||
int done;
|
||||
#elif defined(__OS2__)
|
||||
HDIR h;
|
||||
FILEFINDBUF3L ffb;
|
||||
ULONG count;
|
||||
int opened;
|
||||
#elif defined(__DOS__)
|
||||
struct find_t f;
|
||||
int done;
|
||||
int opened;
|
||||
#else
|
||||
DIR* dp;
|
||||
#endif
|
||||
};
|
||||
|
||||
int qse_dir_init (qse_dir_t* dir, qse_mmgr_t* mmgr, const qse_char_t* path, int flags);
|
||||
void qse_dir_fini (qse_dir_t* dir);
|
||||
|
||||
static int reset_to_path (qse_dir_t* dir, const qse_char_t* path);
|
||||
|
||||
qse_dir_t* qse_dir_open (qse_mmgr_t* mmgr, qse_size_t xtnsize, const qse_char_t* path, int flags)
|
||||
{
|
||||
qse_dir_t* dir;
|
||||
|
||||
dir = QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(*dir) + xtnsize);
|
||||
if (dir)
|
||||
{
|
||||
if (qse_dir_init (dir, mmgr, path, flags) <= -1)
|
||||
{
|
||||
QSE_MMGR_FREE (mmgr, dir);
|
||||
dir = QSE_NULL;
|
||||
}
|
||||
else QSE_MEMSET (dir + 1, 0, xtnsize);
|
||||
}
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
void qse_dir_close (qse_dir_t* dir)
|
||||
{
|
||||
qse_dir_fini (dir);
|
||||
QSE_MMGR_FREE (dir->mmgr, dir);
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_dir_getmmgr (qse_dir_t* dir)
|
||||
{
|
||||
return dir->mmgr;
|
||||
}
|
||||
|
||||
void* qse_dir_getxtn (qse_dir_t* dir)
|
||||
{
|
||||
return QSE_XTN (dir);
|
||||
}
|
||||
|
||||
int qse_dir_init (qse_dir_t* dir, qse_mmgr_t* mmgr, const qse_char_t* path, int flags)
|
||||
{
|
||||
QSE_MEMSET (dir, 0, QSE_SIZEOF(*dir));
|
||||
|
||||
dir->mmgr = mmgr;
|
||||
dir->flags = flags;
|
||||
|
||||
if (qse_str_init (&dir->tbuf, mmgr, 256) <= -1) return -1;
|
||||
if (qse_mbs_init (&dir->mbuf, mmgr, 256) <= -1)
|
||||
{
|
||||
qse_str_fini (&dir->tbuf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
dir->h = INVALID_HANDLE_VALUE;
|
||||
#endif
|
||||
|
||||
return reset_to_path (dir, path);
|
||||
}
|
||||
|
||||
static void close_dir_safely (qse_dir_t* dir)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
if (dir->h != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FindClose (dir->h);
|
||||
dir->h = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
#elif defined(__OS2__)
|
||||
if (dir->opened)
|
||||
{
|
||||
DosFindClose (dir->h);
|
||||
dir->opened = 0;
|
||||
}
|
||||
#elif defined(__DOS__)
|
||||
if (dir->opened)
|
||||
{
|
||||
_dos_findclose (&dir->f);
|
||||
dir->opened = 0;
|
||||
}
|
||||
#else
|
||||
if (dir->dp)
|
||||
{
|
||||
QSE_CLOSEDIR (dir->dp);
|
||||
dir->dp = QSE_NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void qse_dir_fini (qse_dir_t* dir)
|
||||
{
|
||||
close_dir_safely (dir);
|
||||
|
||||
qse_mbs_fini (&dir->mbuf);
|
||||
qse_str_fini (&dir->tbuf);
|
||||
}
|
||||
|
||||
static qse_mchar_t* wcs_to_mbuf (qse_dir_t* dir, const qse_wchar_t* wcs, qse_mbs_t* mbs)
|
||||
{
|
||||
qse_size_t ml, wl;
|
||||
|
||||
if (qse_wcstombs (wcs, &wl, QSE_NULL, &ml) <= -1 ||
|
||||
qse_mbs_setlen (mbs, ml) == (qse_size_t)-1) return QSE_NULL;
|
||||
|
||||
qse_wcstombs (wcs, &wl, QSE_MBS_PTR(mbs), &ml);
|
||||
return QSE_MBS_PTR(mbs);
|
||||
}
|
||||
|
||||
static qse_wchar_t* mbs_to_wbuf (qse_dir_t* dir, const qse_mchar_t* mbs, qse_wcs_t* wcs)
|
||||
{
|
||||
qse_size_t ml, wl;
|
||||
|
||||
if (qse_mbstowcs (mbs, &ml, QSE_NULL, &wl) <= -1 ||
|
||||
qse_wcs_setlen (wcs, wl) == (qse_size_t)-1) return QSE_NULL;
|
||||
|
||||
qse_mbstowcs (mbs, &ml, QSE_WCS_PTR(wcs), &wl);
|
||||
return QSE_WCS_PTR(wcs);
|
||||
}
|
||||
|
||||
static qse_mchar_t* make_mbsdos_path (qse_dir_t* dir, const qse_mchar_t* mpath)
|
||||
{
|
||||
if (mpath[0] == QSE_MT('\0'))
|
||||
{
|
||||
if (qse_mbs_cpy (&dir->mbuf, QSE_MT("*.*")) == (qse_size_t)-1) return QSE_NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_size_t len;
|
||||
if ((len = qse_mbs_cpy (&dir->mbuf, mpath)) == (qse_size_t)-1 ||
|
||||
(!QSE_ISPATHMBSEP(mpath[len - 1]) &&
|
||||
!qse_ismbsdrivecurpath(mpath) &&
|
||||
qse_mbs_ccat (&dir->mbuf, QSE_MT('\\')) == (qse_size_t)-1) ||
|
||||
qse_mbs_cat (&dir->mbuf, QSE_MT("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return QSE_MBS_PTR(&dir->mbuf);
|
||||
}
|
||||
|
||||
static qse_char_t* make_dos_path (qse_dir_t* dir, const qse_char_t* path)
|
||||
{
|
||||
if (path[0] == QSE_T('\0'))
|
||||
{
|
||||
if (qse_str_cpy (&dir->tbuf, QSE_T("*.*")) == (qse_size_t)-1) return QSE_NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_size_t len;
|
||||
if ((len = qse_str_cpy (&dir->tbuf, path)) == (qse_size_t)-1 ||
|
||||
(!QSE_ISPATHSEP(path[len - 1]) &&
|
||||
!qse_isdrivecurpath(path) &&
|
||||
qse_str_ccat (&dir->tbuf, QSE_T('\\')) == (qse_size_t)-1) ||
|
||||
qse_str_cat (&dir->tbuf, QSE_T("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return QSE_STR_PTR(&dir->tbuf);
|
||||
}
|
||||
|
||||
|
||||
static qse_mchar_t* mkdospath (qse_dir_t* dir, const qse_char_t* path)
|
||||
{
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
return make_dos_path (dir, path);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
return make_mbsdos_path (dir, (const qse_mchar_t*) path);
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_char_t* tptr;
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
tptr = make_dos_path (dir, path);
|
||||
if (tptr == QSE_NULL) return QSE_NULL;
|
||||
|
||||
mptr = wcs_to_mbuf (dir, QSE_STR_PTR(&dir->tbuf), &dir->mbuf);
|
||||
if (mptr == QSE_NULL) return QSE_NULL;
|
||||
|
||||
return mptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static int reset_to_path (qse_dir_t* dir, const qse_char_t* path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_char_t* tptr;
|
||||
|
||||
dir->done = 0;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
tptr = make_dos_path (dir, path);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
qse_mchar_t* mptr = make_mbsdos_path (dir, (const qse_mchar_t*) path);
|
||||
if (mptr == QSE_NULL) return -1;
|
||||
tptr = mbs_to_wbuf (dir, mptr, &dir->tbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
tptr = make_dos_path (dir, path);
|
||||
if (tptr == QSE_NULL) return -1;
|
||||
}
|
||||
#endif
|
||||
if (tptr == QSE_NULL) return -1;
|
||||
|
||||
dir->h = FindFirstFile (tptr, &dir->wfd);
|
||||
if (dir->h == INVALID_HANDLE_VALUE) return -1;
|
||||
|
||||
return 0;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
APIRET rc;
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
dir->h = HDIR_CREATE;
|
||||
dir->count = 1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
mptr = make_dos_path (dir, path);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
mptr = make_mbsdos_path (dir, (const qse_mchar_t*) path);
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_char_t* tptr = make_dos_path (dir, path);
|
||||
if (tptr == QSE_NULL) return -1;
|
||||
mptr = wcs_to_mbuf (dir, tptr, &dir->mbuf);
|
||||
}
|
||||
#endif
|
||||
if (mptr == QSE_NULL) return -1;
|
||||
|
||||
rc = DosFindFirst (
|
||||
mptr,
|
||||
&dir->h,
|
||||
FILE_DIRECTORY | FILE_READONLY,
|
||||
&dir->ffb,
|
||||
QSE_SIZEOF(dir->ffb),
|
||||
&dir->count,
|
||||
FIL_STANDARDL);
|
||||
|
||||
if (rc != NO_ERROR) return -1;
|
||||
|
||||
dir->opened = 1;
|
||||
return 0;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__DOS__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
unsigned int rc;
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
dir->done = 0;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
mptr = make_dos_path (dir, path);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
mptr = make_mbsdos_path (dir, (const qse_mchar_t*) path);
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_char_t* tptr = make_dos_path (dir, path);
|
||||
if (tptr == QSE_NULL) return -1;
|
||||
mptr = wcs_to_mbuf (dir, tptr, &dir->mbuf);
|
||||
}
|
||||
#endif
|
||||
if (mptr == QSE_NULL) return -1;
|
||||
|
||||
rc = _dos_findfirst (mptr, _A_NORMAL | _A_SUBDIR, &dir->f);
|
||||
if (rc != 0) return -1;
|
||||
|
||||
dir->opened = 1;
|
||||
return 0;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#else
|
||||
DIR* dp;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
dp = QSE_OPENDIR (path[0] == QSE_MT('\0')? QSE_T("."): path);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
const qse_mchar_t* mpath = (const qse_mchar_t*)path;
|
||||
dp = QSE_OPENDIR (mpath == QSE_MT('\0')? QSE_MT("."): mpath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path[0] == QSE_T('\0'))
|
||||
{
|
||||
dp = QSE_OPENDIR (QSE_MT("."));
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
mptr = wcs_to_mbuf (dir, path, &dir->mbuf);
|
||||
if (mptr == QSE_NULL) return -1;
|
||||
|
||||
dp = QSE_OPENDIR (mptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
dir->dp = dp;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int qse_dir_reset (qse_dir_t* dir, const qse_char_t* path)
|
||||
{
|
||||
close_dir_safely (dir);
|
||||
return reset_to_path (dir, path);
|
||||
}
|
||||
|
||||
static int read_dir_to_tbuf (qse_dir_t* dir, void** name)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
if (dir->done) return (dir->done > 0)? 0: -1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cpy (&dir->tbuf, dir->wfd.cFileName) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
if (wcs_to_mbuf (dir, dir->wfd.cFileName, &dir->mbuf) == QSE_NULL) return -1;
|
||||
*name = QSE_STR_PTR(&dir->mbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qse_str_cpy (&dir->tbuf, dir->wfd.cFileName) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (FindNextFile (dir->h, &dir->wfd) == FALSE)
|
||||
dir->done = (GetLastError() == ERROR_NO_MORE_FILES)? 1: -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
APIRET rc;
|
||||
|
||||
if (dir->count <= 0) return 0;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cpy (&dir->tbuf, dir->ffb.achName) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
if (qse_mbs_cpy (&dir->mbuf, dir->ffb.achName) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_MBS_PTR(&dir->mbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mbs_to_wbuf (dir, dir->ffb.achName, &dir->tbuf) == QSE_NULL) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = DosFindNext (dir->h, &dir->ffb, QSE_SIZEOF(dir->ffb), &dir->count);
|
||||
if (rc == ERROR_NO_MORE_FILES) dir->count = 0;
|
||||
else if (rc != NO_ERROR) return -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__DOS__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
unsigned int rc;
|
||||
|
||||
if (dir->done) return (dir->done > 0)? 0: -1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cpy (&dir->tbuf, dir->f.name) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
if (qse_mbs_cpy (&dir->mbuf, dir->f.name) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_MBS_PTR(&dir->mbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mbs_to_wbuf (dir, dir->f.name, &dir->tbuf) == QSE_NULL) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = _dos_findnext (&dir->f);
|
||||
if (rc != 0) dir->done = (errno == ENOENT)? 1: -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#else
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_dirent_t* de;
|
||||
|
||||
errno = 0;
|
||||
de = QSE_READDIR (dir->dp);
|
||||
if (de == NULL) return (errno == 0)? 0: -1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cpy (&dir->tbuf, de->d_name) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
#else
|
||||
if (dir->flags & QSE_DIR_MBSPATH)
|
||||
{
|
||||
if (qse_mbs_cpy (&dir->mbuf, de->d_name) == (qse_size_t)-1) return -1;
|
||||
*name = QSE_MBS_PTR(&dir->mbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mbs_to_wbuf (dir, de->d_name, &dir->tbuf) == QSE_NULL) return -1;
|
||||
*name = QSE_STR_PTR(&dir->tbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
int qse_dir_read (qse_dir_t* dir, qse_dir_ent_t* ent)
|
||||
{
|
||||
int x;
|
||||
void* name;
|
||||
|
||||
x = read_dir_to_tbuf (dir, &name);
|
||||
if (x >= 1)
|
||||
{
|
||||
QSE_MEMSET (ent, 0, QSE_SIZEOF(ent));
|
||||
ent->name = name;
|
||||
|
||||
if (dir->flags & QSE_DIR_STAT)
|
||||
{
|
||||
/* TODO: more information */
|
||||
}
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/mbwc.h>
|
||||
#include <qse/cmn/path.h>
|
||||
#include <qse/cmn/dir.h>
|
||||
#include "mem.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
@ -44,17 +45,7 @@
|
||||
# define IS_ESC(c) ((c) == QSE_T('\\'))
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define SEPC QSE_T('\\')
|
||||
#else
|
||||
# define SEPC QSE_T('/')
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define IS_SEP(c) ((c) == QSE_T('/') || (c) == QSE_T('\\'))
|
||||
#else
|
||||
# define IS_SEP(c) ((c) == QSE_T('/'))
|
||||
#endif
|
||||
#define IS_SEP(c) QSE_ISPATHSEP(c)
|
||||
|
||||
#define IS_NIL(c) ((c) == QSE_T('\0'))
|
||||
#define IS_SEP_OR_NIL(c) (IS_SEP(c) || IS_NIL(c))
|
||||
@ -83,7 +74,6 @@ struct glob_t
|
||||
void* cbctx;
|
||||
|
||||
qse_mmgr_t* mmgr;
|
||||
qse_cmgr_t* cmgr;
|
||||
|
||||
qse_str_t path;
|
||||
qse_str_t tbuf; /* temporary buffer */
|
||||
@ -108,10 +98,10 @@ static qse_mchar_t* wcs_to_mbuf (glob_t* g, const qse_wchar_t* wcs, qse_mbs_t* m
|
||||
{
|
||||
qse_size_t ml, wl;
|
||||
|
||||
if (qse_wcstombswithcmgr (wcs, &wl, QSE_NULL, &ml, g->cmgr) <= -1 ||
|
||||
if (qse_wcstombs (wcs, &wl, QSE_NULL, &ml) <= -1 ||
|
||||
qse_mbs_setlen (mbs, ml) == (qse_size_t)-1) return QSE_NULL;
|
||||
|
||||
qse_wcstombswithcmgr (wcs, &wl, QSE_MBS_PTR(mbs), &ml, g->cmgr);
|
||||
qse_wcstombs (wcs, &wl, QSE_MBS_PTR(mbs), &ml);
|
||||
return QSE_MBS_PTR(mbs);
|
||||
}
|
||||
|
||||
@ -322,338 +312,6 @@ static int get_next_segment (glob_t* g, segment_t* seg)
|
||||
return seg->type;
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
struct qse_dir_t
|
||||
{
|
||||
HANDLE h;
|
||||
WIN32_FIND_DATA wfd;
|
||||
int done;
|
||||
};
|
||||
typedef struct qse_dir_t qse_dir_t;
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
struct qse_dir_t
|
||||
{
|
||||
HDIR h;
|
||||
FILEFINDBUF3L ffb;
|
||||
ULONG count;
|
||||
};
|
||||
typedef struct qse_dir_t qse_dir_t;
|
||||
|
||||
#elif defined(__DOS__)
|
||||
|
||||
struct qse_dir_t
|
||||
{
|
||||
struct find_t f;
|
||||
int done;
|
||||
};
|
||||
typedef struct qse_dir_t qse_dir_t;
|
||||
|
||||
#endif
|
||||
|
||||
static qse_dir_t* xopendir (glob_t* g, const qse_cstr_t* path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_dir_t* dp;
|
||||
|
||||
dp = QSE_MMGR_ALLOC (g->mmgr, QSE_SIZEOF(*dp));
|
||||
if (dp == QSE_NULL) return QSE_NULL;
|
||||
|
||||
dp->done = 0;
|
||||
|
||||
if (path->len <= 0)
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, QSE_T("*")) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, path->ptr) == (qse_size_t)-1 ||
|
||||
(!IS_SEP(path->ptr[path->len-1]) &&
|
||||
!qse_isdrivecurpath(path->ptr) &&
|
||||
qse_str_ccat (&g->tbuf, QSE_T('\\')) == (qse_size_t)-1) ||
|
||||
qse_str_ccat (&g->tbuf, QSE_T('*')) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
dp->h = FindFirstFile (QSE_STR_PTR(&g->tbuf), &dp->wfd);
|
||||
if (dp->h == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
|
||||
return dp;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_dir_t* dp;
|
||||
APIRET rc;
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
dp = QSE_MMGR_ALLOC (g->mmgr, QSE_SIZEOF(*dp));
|
||||
if (dp == QSE_NULL) return QSE_NULL;
|
||||
|
||||
if (path->len <= 0)
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, QSE_T("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, path->ptr) == (qse_size_t)-1 ||
|
||||
(!IS_SEP(path->ptr[path->len-1]) &&
|
||||
!qse_isdrivecurpath(path->ptr) &&
|
||||
qse_str_ccat (&g->tbuf, QSE_T('\\')) == (qse_size_t)-1) ||
|
||||
qse_str_cat (&g->tbuf, QSE_T("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
dp->h = HDIR_CREATE;
|
||||
dp->count = 1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
mptr = QSE_STR_PTR(&g->tbuf);
|
||||
#else
|
||||
mptr = wcs_to_mbuf (g, QSE_STR_PTR(&g->tbuf), &g->mbuf);
|
||||
if (mptr == QSE_NULL)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = DosFindFirst (
|
||||
mptr,
|
||||
&dp->h,
|
||||
FILE_DIRECTORY | FILE_READONLY,
|
||||
&dp->ffb,
|
||||
QSE_SIZEOF(dp->ffb),
|
||||
&dp->count,
|
||||
FIL_STANDARDL);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
|
||||
return dp;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__DOS__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_dir_t* dp;
|
||||
unsigned int rc;
|
||||
qse_mchar_t* mptr;
|
||||
qse_size_t wl, ml;
|
||||
|
||||
dp = QSE_MMGR_ALLOC (g->mmgr, QSE_SIZEOF(*dp));
|
||||
if (dp == QSE_NULL) return QSE_NULL;
|
||||
|
||||
dp->done = 0;
|
||||
|
||||
if (path->len <= 0)
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, QSE_T("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qse_str_cpy (&g->tbuf, path->ptr) == (qse_size_t)-1 ||
|
||||
(!IS_SEP(path->ptr[path->len-1]) &&
|
||||
!qse_isdrivecurpath(path->ptr) &&
|
||||
qse_str_ccat (&g->tbuf, QSE_T('\\')) == (qse_size_t)-1) ||
|
||||
qse_str_cat (&g->tbuf, QSE_T("*.*")) == (qse_size_t)-1)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
mptr = QSE_STR_PTR(&g->tbuf);
|
||||
#else
|
||||
mptr = wcs_to_mbuf (g, QSE_STR_PTR(&g->tbuf), &g->mbuf);
|
||||
if (mptr == QSE_NULL)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = _dos_findfirst (mptr, _A_NORMAL | _A_SUBDIR, &dp->f);
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
return QSE_NULL;
|
||||
}
|
||||
|
||||
return dp;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#else
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
return QSE_OPENDIR ((path->len <= 0)? QSE_T("."): path->ptr);
|
||||
#else
|
||||
if (path->len <= 0)
|
||||
{
|
||||
return QSE_OPENDIR (QSE_MT("."));
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_mchar_t* mptr;
|
||||
|
||||
mptr = wcs_to_mbuf (g, path->ptr, &g->mbuf);
|
||||
if (mptr == QSE_NULL) return QSE_NULL;
|
||||
|
||||
return QSE_OPENDIR (mptr);
|
||||
}
|
||||
#endif
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static int xreaddir (glob_t* g, qse_dir_t* dp, qse_str_t* path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
if (dp->done) return (dp->done > 0)? 0: -1;
|
||||
|
||||
if (qse_str_cat (path, dp->wfd.cFileName) == (qse_size_t)-1) return -1;
|
||||
|
||||
if (FindNextFile (dp->h, &dp->wfd) == FALSE)
|
||||
dp->done = (GetLastError() == ERROR_NO_MORE_FILES)? 1: -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
APIRET rc;
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
/* nothing */
|
||||
#else
|
||||
qse_size_t ml, wl, tmp;
|
||||
#endif
|
||||
|
||||
if (dp->count <= 0) return 0;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cat (path, dp->ffb.achName) == (qse_size_t)-1) return -1;
|
||||
#else
|
||||
tmp = QSE_STR_LEN(path);
|
||||
if (qse_mbstowcswithcmgr (dp->ffb.achName, &ml, QSE_NULL, &wl, g->cmgr) <= -1 ||
|
||||
qse_str_setlen (path, tmp + wl) == (qse_size_t)-1) return -1;
|
||||
qse_mbstowcswithcmgr (dp->ffb.achName, &ml, QSE_STR_CPTR(&g->path,tmp), &wl, g->cmgr);
|
||||
#endif
|
||||
|
||||
rc = DosFindNext (dp->h, &dp->ffb, QSE_SIZEOF(dp->ffb), &dp->count);
|
||||
if (rc == ERROR_NO_MORE_FILES) dp->count = 0;
|
||||
else if (rc != NO_ERROR) return -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#elif defined(__DOS__)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
unsigned int rc;
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
/* nothing */
|
||||
#else
|
||||
qse_size_t ml, wl, tmp;
|
||||
#endif
|
||||
|
||||
if (dp->done) return (dp->done > 0)? 0: -1;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cat (path, dp->f.name) == (qse_size_t)-1) return -1;
|
||||
#else
|
||||
tmp = QSE_STR_LEN(path);
|
||||
if (qse_mbstowcswithcmgr (dp->f.name, &ml, QSE_NULL, &wl, g->cmgr) <= -1 ||
|
||||
qse_str_setlen (path, tmp + wl) == (qse_size_t)-1) return -1;
|
||||
qse_mbstowcswithcmgr (dp->f.name, &ml, QSE_STR_CPTR(&g->path,tmp), &wl, g->cmgr);
|
||||
#endif
|
||||
|
||||
rc = _dos_findnext (&dp->f);
|
||||
if (rc != 0) dp->done = (errno == ENOENT)? 1: -1;
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#else
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
qse_dirent_t* de;
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
/* nothing */
|
||||
#else
|
||||
qse_size_t ml, wl, tmp;
|
||||
#endif
|
||||
|
||||
de = QSE_READDIR (dp);
|
||||
if (de == NULL) return 0;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
if (qse_str_cat (path, de->d_name) == (qse_size_t)-1) return -1;
|
||||
#else
|
||||
tmp = QSE_STR_LEN(path);
|
||||
if (qse_mbstowcswithcmgr (de->d_name, &ml, QSE_NULL, &wl, g->cmgr) <= -1 ||
|
||||
qse_str_setlen (path, tmp + wl) == (qse_size_t)-1) return -1;
|
||||
qse_mbstowcswithcmgr (de->d_name, &ml, QSE_STR_CPTR(&g->path,tmp), &wl, g->cmgr);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static void xclosedir (glob_t* g, qse_dir_t* dp)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
FindClose (dp->h);
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
#elif defined(__OS2__)
|
||||
DosFindClose (dp->h);
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
#elif defined(__DOS__)
|
||||
_dos_findclose (&dp->f);
|
||||
QSE_MMGR_FREE (g->mmgr, dp);
|
||||
#else
|
||||
QSE_CLOSEDIR (dp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int handle_non_wild_segments (glob_t* g, segment_t* seg)
|
||||
{
|
||||
while (get_next_segment(g, seg) != NONE && !seg->wild)
|
||||
@ -731,6 +389,8 @@ static int search (glob_t* g, segment_t* seg)
|
||||
{
|
||||
qse_dir_t* dp;
|
||||
qse_size_t tmp, tmp2;
|
||||
qse_dir_ent_t ent;
|
||||
int x;
|
||||
|
||||
#if defined(NO_RECURSION)
|
||||
stack_node_t* r;
|
||||
@ -744,7 +404,7 @@ entry:
|
||||
|
||||
if (seg->wild)
|
||||
{
|
||||
dp = xopendir (g, QSE_STR_CSTR(&g->path));
|
||||
dp = qse_dir_open (g->mmgr, 0, QSE_STR_PTR(&g->path), 0);
|
||||
if (dp)
|
||||
{
|
||||
tmp = QSE_STR_LEN(&g->path);
|
||||
@ -756,7 +416,11 @@ entry:
|
||||
{
|
||||
qse_str_setlen (&g->path, tmp2);
|
||||
|
||||
if (xreaddir (g, dp, &g->path) <= 0) break;
|
||||
x = qse_dir_read (dp, &ent);
|
||||
if (x <= -1) goto oops;
|
||||
if (x == 0) break;
|
||||
|
||||
if (qse_str_cat (&g->path, ent.name) == (qse_size_t)-1) goto oops;
|
||||
|
||||
if (qse_strnfnmat (QSE_STR_CPTR(&g->path,tmp2), seg->ptr, seg->len, g->fnmat_flags) > 0)
|
||||
{
|
||||
@ -810,7 +474,7 @@ entry:
|
||||
}
|
||||
|
||||
qse_str_setlen (&g->path, tmp);
|
||||
xclosedir (g, dp); dp = QSE_NULL;
|
||||
qse_dir_close (dp); dp = QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -850,14 +514,14 @@ entry:
|
||||
return 0;
|
||||
|
||||
oops:
|
||||
if (dp) xclosedir (g, dp);
|
||||
if (dp) qse_dir_close (dp);
|
||||
|
||||
#if defined(NO_RECURSION)
|
||||
while (g->stack)
|
||||
{
|
||||
r = g->stack;
|
||||
g->stack = r->next;
|
||||
xclosedir (g, r->dp);
|
||||
qse_dir_close (r->dp);
|
||||
QSE_MMGR_FREE (g->mmgr, r);
|
||||
}
|
||||
|
||||
@ -871,7 +535,7 @@ oops:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int qse_globwithcmgr (const qse_char_t* pattern, qse_glob_cbimpl_t cbimpl, void* cbctx, int flags, qse_mmgr_t* mmgr, qse_cmgr_t* cmgr)
|
||||
int qse_glob (const qse_char_t* pattern, qse_glob_cbimpl_t cbimpl, void* cbctx, int flags, qse_mmgr_t* mmgr)
|
||||
{
|
||||
segment_t seg;
|
||||
glob_t g;
|
||||
@ -881,7 +545,6 @@ int qse_globwithcmgr (const qse_char_t* pattern, qse_glob_cbimpl_t cbimpl, void*
|
||||
g.cbimpl = cbimpl;
|
||||
g.cbctx = cbctx;
|
||||
g.mmgr = mmgr;
|
||||
g.cmgr = cmgr;
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
g.fnmat_flags |= QSE_STRFNMAT_IGNORECASE;
|
||||
@ -928,8 +591,3 @@ int qse_globwithcmgr (const qse_char_t* pattern, qse_glob_cbimpl_t cbimpl, void*
|
||||
return g.expanded;
|
||||
}
|
||||
|
||||
int qse_glob (const qse_char_t* pattern, qse_glob_cbimpl_t cbimpl, void* cbctx, int flags, qse_mmgr_t* mmgr)
|
||||
{
|
||||
return qse_globwithcmgr (pattern, cbimpl, cbctx, flags, mmgr, qse_getdflcmgr());
|
||||
}
|
||||
|
||||
|
621
qse/lib/cmn/mux.c
Normal file
621
qse/lib/cmn/mux.c
Normal file
@ -0,0 +1,621 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/cmn/mux.h>
|
||||
#include "mem.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define FD_SETSIZE 4096 /* what is the best value??? */
|
||||
# include <winsock2.h>
|
||||
# include <windows.h>
|
||||
# define USE_SELECT
|
||||
#elif defined(__OS2__)
|
||||
# include <types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <tcpustd.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <nerrno.h>
|
||||
# define INCL_DOSERRORS
|
||||
# include <os2.h>
|
||||
# pragma library("tcpip32.lib")
|
||||
|
||||
#elif defined(__DOS__)
|
||||
# include <errno.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# include <errno.h>
|
||||
# if defined(HAVE_SYS_EPOLL_H)
|
||||
# include <sys/epoll.h>
|
||||
# if defined(HAVE_EPOLL_CREATE)
|
||||
# define USE_EPOLL
|
||||
# endif
|
||||
# elif defined(HAVE_POLL_H)
|
||||
# define USE_POLL
|
||||
# else
|
||||
# define USE_SELECT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct qse_mux_t
|
||||
{
|
||||
qse_mmgr_t* mmgr;
|
||||
qse_mux_errnum_t errnum;
|
||||
|
||||
qse_mux_evtfun_t evtfun;
|
||||
|
||||
#if defined(USE_SELECT)
|
||||
fd_set rset;
|
||||
fd_set wset;
|
||||
fd_set tmprset;
|
||||
fd_set tmpwset;
|
||||
int size;
|
||||
int maxhnd;
|
||||
|
||||
struct
|
||||
{
|
||||
qse_mux_evt_t** ptr;
|
||||
int ubound;
|
||||
} me;
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
int fd;
|
||||
|
||||
struct
|
||||
{
|
||||
struct epoll_event* ptr;
|
||||
qse_size_t len;
|
||||
qse_size_t capa;
|
||||
} ee;
|
||||
|
||||
struct
|
||||
{
|
||||
qse_mux_evt_t** ptr;
|
||||
int ubound;
|
||||
} me;
|
||||
#endif
|
||||
};
|
||||
|
||||
int qse_mux_init (qse_mux_t* mux, qse_mmgr_t* mmgr, qse_mux_evtfun_t evtfun, qse_size_t capahint);
|
||||
void qse_mux_fini (qse_mux_t* mux);
|
||||
|
||||
#if defined(_WIN32)
|
||||
static qse_mux_errnum_t syserr_to_errnum (DWORD e)
|
||||
{
|
||||
|
||||
switch (e)
|
||||
{
|
||||
case ERROR_NOT_ENOUGH_MEMORY:
|
||||
case ERROR_OUTOFMEMORY:
|
||||
return QSE_MUX_ENOMEM;
|
||||
|
||||
case ERROR_INVALID_PARAMETER:
|
||||
case ERROR_INVALID_HANDLE:
|
||||
case ERROR_INVALID_NAME:
|
||||
return QSE_MUX_EINVAL;
|
||||
|
||||
case ERROR_ACCESS_DENIED:
|
||||
return QSE_MUX_EACCES;
|
||||
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
case ERROR_PATH_NOT_FOUND:
|
||||
return QSE_MUX_ENOENT;
|
||||
|
||||
case ERROR_ALREADY_EXISTS:
|
||||
case ERROR_FILE_EXISTS:
|
||||
return QSE_MUX_EEXIST;
|
||||
|
||||
default:
|
||||
return QSE_MUX_ESYSERR;
|
||||
}
|
||||
}
|
||||
#elif defined(__OS2__)
|
||||
static qse_mux_errnum_t syserr_to_errnum (APIRET e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case ERROR_NOT_ENOUGH_MEMORY:
|
||||
return QSE_MUX_ENOMEM;
|
||||
|
||||
case ERROR_INVALID_PARAMETER:
|
||||
case ERROR_INVALID_HANDLE:
|
||||
case ERROR_INVALID_NAME:
|
||||
return QSE_MUX_EINVAL;
|
||||
|
||||
case ERROR_ACCESS_DENIED:
|
||||
return QSE_MUX_EACCES;
|
||||
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
case ERROR_PATH_NOT_FOUND:
|
||||
return QSE_MUX_ENOENT;
|
||||
|
||||
case ERROR_ALREADY_EXISTS:
|
||||
return QSE_MUX_EEXIST;
|
||||
|
||||
default:
|
||||
return QSE_MUX_ESYSERR;
|
||||
}
|
||||
}
|
||||
#elif defined(__DOS__)
|
||||
static qse_mux_errnum_t syserr_to_errnum (int e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case ENOMEM:
|
||||
return QSE_MUX_ENOMEM;
|
||||
|
||||
case EINVAL:
|
||||
return QSE_MUX_EINVAL;
|
||||
|
||||
case EACCES:
|
||||
return QSE_MUX_EACCES;
|
||||
|
||||
case ENOENT:
|
||||
return QSE_MUX_ENOENT;
|
||||
|
||||
case EEXIST:
|
||||
return QSE_MUX_EEXIST;
|
||||
|
||||
default:
|
||||
return QSE_MUX_ESYSERR;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
static qse_mux_errnum_t syserr_to_errnum (int e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case ENOMEM:
|
||||
return QSE_MUX_ENOMEM;
|
||||
|
||||
case EINVAL:
|
||||
return QSE_MUX_EINVAL;
|
||||
|
||||
case ENOENT:
|
||||
return QSE_MUX_ENOENT;
|
||||
|
||||
case EACCES:
|
||||
return QSE_MUX_EACCES;
|
||||
|
||||
case EEXIST:
|
||||
return QSE_MUX_EEXIST;
|
||||
|
||||
case EINTR:
|
||||
return QSE_MUX_EINTR;
|
||||
|
||||
default:
|
||||
return QSE_MUX_ESYSERR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
qse_mux_t* qse_mux_open (qse_mmgr_t* mmgr, qse_size_t xtnsize, qse_mux_evtfun_t evtfun, qse_size_t capahint)
|
||||
{
|
||||
qse_mux_t* mux;
|
||||
|
||||
mux = QSE_MMGR_ALLOC (mmgr, QSE_SIZEOF(*mux) + xtnsize);
|
||||
if (mux)
|
||||
{
|
||||
if (qse_mux_init (mux, mmgr, evtfun, capahint) <= -1)
|
||||
{
|
||||
QSE_MMGR_FREE (mmgr, mux);
|
||||
mux = QSE_NULL;
|
||||
}
|
||||
else QSE_MEMSET (mux + 1, 0, xtnsize);
|
||||
}
|
||||
|
||||
return mux;
|
||||
}
|
||||
|
||||
void qse_mux_close (qse_mux_t* mux)
|
||||
{
|
||||
qse_mux_fini (mux);
|
||||
QSE_MMGR_FREE (mux->mmgr, mux);
|
||||
}
|
||||
|
||||
int qse_mux_init (qse_mux_t* mux, qse_mmgr_t* mmgr, qse_mux_evtfun_t evtfun, qse_size_t capahint)
|
||||
{
|
||||
QSE_MEMSET (mux, 0, QSE_SIZEOF(*mux));
|
||||
mux->mmgr = mmgr;
|
||||
mux->evtfun = evtfun;
|
||||
|
||||
/* epoll_create returns an error and set errno to EINVAL
|
||||
* if size is 0. Having a positive size greater than 0
|
||||
* also makes easier other parts like maintaining internal
|
||||
* event buffers */
|
||||
if (capahint <= 0) capahint = 1;
|
||||
|
||||
#if defined(USE_SELECT)
|
||||
FD_ZERO (&mux->rset);
|
||||
FD_ZERO (&mux->wset);
|
||||
mux->maxhnd = -1;
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
#if defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC)
|
||||
mux->fd = epoll_create1 (O_CLOEXEC);
|
||||
#else
|
||||
mux->fd = epoll_create (capahint);
|
||||
#endif
|
||||
if (mux->fd <= -1)
|
||||
{
|
||||
mux->errnum = syserr_to_errnum (errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC)
|
||||
/* nothing to do */
|
||||
#elif defined(FD_CLOEXEC)
|
||||
{
|
||||
int flag = fcntl (mux->fd, F_GETFD);
|
||||
if (flag >= 0) fcntl (mux->fd, F_SETFD, flag | FD_CLOEXEC);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
/* TODO: */
|
||||
mux->errnum = QSE_MUX_ENOIMPL;
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void qse_mux_fini (qse_mux_t* mux)
|
||||
{
|
||||
#if defined(USE_SELECT)
|
||||
FD_ZERO (&mux->rset);
|
||||
FD_ZERO (&mux->wset);
|
||||
|
||||
if (mux->me.ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mux->me.ubound; i++)
|
||||
{
|
||||
if (mux->me.ptr[i])
|
||||
QSE_MMGR_FREE (mux->mmgr, mux->me.ptr[i]);
|
||||
}
|
||||
|
||||
QSE_MMGR_FREE (mux->mmgr, mux->me.ptr);
|
||||
mux->me.ubound = 0;
|
||||
mux->maxhnd = -1;
|
||||
}
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
close (mux->fd);
|
||||
|
||||
if (mux->ee.ptr)
|
||||
{
|
||||
QSE_MMGR_FREE (mux->mmgr, mux->ee.ptr);
|
||||
mux->ee.len = 0;
|
||||
mux->ee.capa = 0;
|
||||
}
|
||||
|
||||
if (mux->me.ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mux->me.ubound; i++)
|
||||
{
|
||||
if (mux->me.ptr[i])
|
||||
QSE_MMGR_FREE (mux->mmgr, mux->me.ptr[i]);
|
||||
}
|
||||
|
||||
QSE_MMGR_FREE (mux->mmgr, mux->me.ptr);
|
||||
mux->me.ubound = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_mux_getmmgr (qse_mux_t* mux)
|
||||
{
|
||||
return mux->mmgr;
|
||||
}
|
||||
|
||||
void* qse_mux_getxtn (qse_mux_t* mux)
|
||||
{
|
||||
return QSE_XTN (mux);
|
||||
}
|
||||
|
||||
#define ALIGN_TO(num,align) ((((num) + (align) - 1) / (align)) * (align))
|
||||
|
||||
int qse_mux_insert (qse_mux_t* mux, const qse_mux_evt_t* evt)
|
||||
{
|
||||
#if defined(USE_SELECT)
|
||||
|
||||
if (evt->hnd >= mux->me.ubound)
|
||||
{
|
||||
qse_mux_evt_t** tmp;
|
||||
int ubound;
|
||||
|
||||
ubound = evt->hnd + 1;
|
||||
ubound = ALIGN_TO (ubound, 128);
|
||||
|
||||
tmp = QSE_MMGR_REALLOC (mux->mmgr, mux->me.ptr, QSE_SIZEOF(*mux->me.ptr) * ubound);
|
||||
if (tmp == QSE_NULL)
|
||||
{
|
||||
mux->errnum = QSE_MUX_ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
QSE_MEMSET (&tmp[mux->me.ubound], 0, QSE_SIZEOF(*mux->me.ptr) * (ubound - mux->me.ubound));
|
||||
mux->me.ptr = tmp;
|
||||
mux->me.ubound = ubound;
|
||||
}
|
||||
|
||||
if (!mux->me.ptr[evt->hnd])
|
||||
{
|
||||
mux->me.ptr[evt->hnd] = QSE_MMGR_ALLOC (mux->mmgr, QSE_SIZEOF(*evt));
|
||||
if (!mux->me.ptr[evt->hnd])
|
||||
{
|
||||
mux->errnum = QSE_MUX_ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (evt->mask & QSE_MUX_IN) FD_SET (evt->hnd, &mux->rset);
|
||||
if (evt->mask & QSE_MUX_OUT) FD_SET (evt->hnd, &mux->wset);
|
||||
|
||||
*mux->me.ptr[evt->hnd] = *evt;
|
||||
if (evt->hnd > mux->maxhnd) mux->maxhnd = evt->hnd;
|
||||
mux->size++;
|
||||
return 0;
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
struct epoll_event ev;
|
||||
|
||||
QSE_MEMSET (&ev, 0, QSE_SIZEOF(ev));
|
||||
if (evt->mask & QSE_MUX_IN) ev.events |= EPOLLIN;
|
||||
if (evt->mask & QSE_MUX_OUT) ev.events |= EPOLLOUT;
|
||||
ev.data.fd = evt->hnd;
|
||||
|
||||
if (ev.events == 0 || evt->hnd < 0)
|
||||
{
|
||||
mux->errnum = QSE_MUX_EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (evt->hnd >= mux->me.ubound)
|
||||
{
|
||||
qse_mux_evt_t** tmp;
|
||||
int ubound;
|
||||
|
||||
ubound = evt->hnd + 1;
|
||||
ubound = ALIGN_TO (ubound, 128);
|
||||
|
||||
tmp = QSE_MMGR_REALLOC (mux->mmgr, mux->me.ptr, QSE_SIZEOF(*mux->me.ptr) * ubound);
|
||||
if (tmp == QSE_NULL)
|
||||
{
|
||||
mux->errnum = QSE_MUX_ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
QSE_MEMSET (&tmp[mux->me.ubound], 0, QSE_SIZEOF(*mux->me.ptr) * (ubound - mux->me.ubound));
|
||||
mux->me.ptr = tmp;
|
||||
mux->me.ubound = ubound;
|
||||
}
|
||||
|
||||
if (!mux->me.ptr[evt->hnd])
|
||||
{
|
||||
mux->me.ptr[evt->hnd] = QSE_MMGR_ALLOC (mux->mmgr, QSE_SIZEOF(*evt));
|
||||
if (!mux->me.ptr[evt->hnd])
|
||||
{
|
||||
mux->errnum = QSE_MUX_ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (mux->ee.len >= mux->ee.capa)
|
||||
{
|
||||
struct epoll_event* tmp;
|
||||
qse_size_t newcapa;
|
||||
|
||||
newcapa = (mux->ee.capa + 1) * 2;
|
||||
newcapa = ALIGN_TO (newcapa, 256);
|
||||
|
||||
tmp = QSE_MMGR_REALLOC (
|
||||
mux->mmgr, mux->ee.ptr,
|
||||
QSE_SIZEOF(*mux->ee.ptr) * newcapa);
|
||||
if (tmp == QSE_NULL)
|
||||
{
|
||||
mux->errnum = QSE_MUX_ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
mux->ee.ptr = tmp;
|
||||
mux->ee.capa = newcapa;
|
||||
}
|
||||
|
||||
if (epoll_ctl (mux->fd, EPOLL_CTL_ADD, evt->hnd, &ev) == -1)
|
||||
{
|
||||
mux->errnum = syserr_to_errnum (errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*mux->me.ptr[evt->hnd] = *evt;
|
||||
mux->ee.len++;
|
||||
return 0;
|
||||
#else
|
||||
/* TODO: */
|
||||
mux->errnum = QSE_MUX_ENOIMPL;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int qse_mux_delete (qse_mux_t* mux, const qse_mux_evt_t* evt)
|
||||
{
|
||||
#if defined(USE_SELECT)
|
||||
qse_mux_evt_t* mevt;
|
||||
|
||||
if (mux->size <= 0 || evt->hnd < 0 || evt->hnd >= mux->me.ubound)
|
||||
{
|
||||
mux->errnum = QSE_MUX_EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
mevt = mux->me.ptr[evt->hnd];
|
||||
if (mevt->hnd != evt->hnd)
|
||||
{
|
||||
/* already deleted??? */
|
||||
mux->errnum = QSE_MUX_EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mevt->mask & QSE_MUX_IN) FD_CLR (evt->hnd, &mux->rset);
|
||||
if (mevt->mask & QSE_MUX_OUT) FD_CLR (evt->hnd, &mux->wset);
|
||||
|
||||
if (mevt->hnd == mux->maxhnd)
|
||||
{
|
||||
qse_mux_hnd_t i;
|
||||
|
||||
for (i = mevt->hnd; i > 0; )
|
||||
{
|
||||
i--;
|
||||
if (mux->me.ptr[i] && mux->me.ptr[i]->hnd >= 0)
|
||||
{
|
||||
QSE_ASSERT (i == mux->me.ptr[i]->hnd);
|
||||
mux->maxhnd = mux->me.ptr[i]->hnd;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
mux->maxhnd = -1;
|
||||
QSE_ASSERT (mux->size == 1);
|
||||
}
|
||||
|
||||
done:
|
||||
mevt->hnd = -1;
|
||||
mux->size--;
|
||||
return 0;
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
if (mux->ee.len <= 0)
|
||||
{
|
||||
mux->errnum = QSE_MUX_EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (epoll_ctl (mux->fd, EPOLL_CTL_DEL, evt->hnd, QSE_NULL) <= -1)
|
||||
{
|
||||
mux->errnum = syserr_to_errnum(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mux->ee.len--;
|
||||
return 0;
|
||||
#else
|
||||
/* TODO */
|
||||
mux->errnum = QSE_MUX_ENOIMPL;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int qse_mux_poll (qse_mux_t* mux, qse_ntime_t timeout)
|
||||
{
|
||||
|
||||
#if defined(USE_SELECT)
|
||||
struct timeval tv;
|
||||
int n;
|
||||
|
||||
tv.tv_sec = timeout / QSE_MSECS_PER_SEC;
|
||||
tv.tv_usec = (timeout % QSE_MSECS_PER_SEC) * QSE_USECS_PER_MSEC;
|
||||
|
||||
mux->tmprset = mux->rset;
|
||||
mux->tmpwset = mux->wset;
|
||||
|
||||
n = select (mux->maxhnd + 1, &mux->tmprset, &mux->tmpwset, QSE_NULL, &tv);
|
||||
if (n <= -1)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
mux->errnum = syserr_to_errnum(WSAGetLastError());
|
||||
#else
|
||||
mux->errnum = syserr_to_errnum(errno);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
qse_mux_hnd_t i;
|
||||
qse_mux_evt_t* evt, xevt;
|
||||
|
||||
for (i = 0 ; i < mux->maxhnd; i++)
|
||||
{
|
||||
evt = mux->me.ptr[i];
|
||||
if (!evt || evt->hnd != i) continue;
|
||||
|
||||
QSE_MEMCPY (&xevt, evt, QSE_SIZEOF(xevt));
|
||||
|
||||
xevt.mask = 0;
|
||||
if ((evt->mask & QSE_MUX_IN) && FD_ISSET(evt->hnd, &mux->tmprset)) xevt.mask |= QSE_MUX_IN;
|
||||
if ((evt->mask & QSE_MUX_OUT) && FD_ISSET(evt->hnd, &mux->tmpwset)) xevt.mask |= QSE_MUX_OUT;
|
||||
|
||||
if (xevt.mask > 0) mux->evtfun (mux, &xevt);
|
||||
}
|
||||
}
|
||||
|
||||
return n;
|
||||
|
||||
#elif defined(USE_EPOLL)
|
||||
int nfds, hnd, i, mask;
|
||||
qse_mux_evt_t* evt, xevt;
|
||||
|
||||
nfds = epoll_wait (mux->fd, mux->ee.ptr, mux->ee.len, timeout);
|
||||
if (nfds <= -1)
|
||||
{
|
||||
mux->errnum = syserr_to_errnum(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < nfds; i++)
|
||||
{
|
||||
hnd = mux->ee.ptr[i].data.fd;
|
||||
evt = mux->me.ptr[hnd];
|
||||
|
||||
QSE_ASSERT (evt->hnd == hnd);
|
||||
|
||||
QSE_MEMCPY (&xevt, evt, QSE_SIZEOF(xevt));
|
||||
|
||||
xevt.mask = 0;
|
||||
if (mux->ee.ptr[i].events & EPOLLIN) xevt.mask |= QSE_MUX_IN;
|
||||
if (mux->ee.ptr[i].events & EPOLLOUT) xevt.mask |= QSE_MUX_OUT;
|
||||
|
||||
if (mux->ee.ptr[i].events & EPOLLHUP)
|
||||
{
|
||||
if (evt->mask & QSE_MUX_IN)
|
||||
xevt.mask |= QSE_MUX_IN;
|
||||
if (evt->mask & QSE_MUX_OUT)
|
||||
xevt.mask |= QSE_MUX_OUT;
|
||||
}
|
||||
|
||||
mux->evtfun (mux, &xevt);
|
||||
}
|
||||
|
||||
return nfds;
|
||||
|
||||
#else
|
||||
/* TODO */
|
||||
mux->errnum = QSE_MUX_ENOIMPL;
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -20,13 +20,8 @@
|
||||
|
||||
#include <qse/cmn/path.h>
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define IS_MSEP(c) ((c) == QSE_MT('/') || (c) == QSE_MT('\\'))
|
||||
# define IS_WSEP(c) ((c) == QSE_WT('/') || (c) == QSE_WT('\\'))
|
||||
#else
|
||||
# define IS_MSEP(c) ((c) == QSE_MT('/'))
|
||||
# define IS_WSEP(c) ((c) == QSE_WT('/'))
|
||||
#endif
|
||||
#define IS_MSEP(c) QSE_ISPATHMBSEP(c)
|
||||
#define IS_WSEP(c) QSE_ISPATHWCSEP(c)
|
||||
|
||||
const qse_mchar_t* qse_mbsbasename (const qse_mchar_t* path)
|
||||
{
|
||||
|
@ -24,12 +24,7 @@
|
||||
/* MBS IMPLEMENTATION */
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define IS_MSEP(c) ((c) == QSE_MT('/') || (c) == QSE_MT('\\'))
|
||||
#else
|
||||
# define IS_MSEP(c) ((c) == QSE_MT('/'))
|
||||
#endif
|
||||
#define IS_MSEP(c) QSE_ISPATHMBSEP(c)
|
||||
|
||||
#define IS_MNIL(c) ((c) == QSE_MT('\0'))
|
||||
#define IS_MSEP_OR_MNIL(c) (IS_MSEP(c) || IS_MNIL(c))
|
||||
|
@ -363,7 +363,6 @@
|
||||
#endif
|
||||
|
||||
/* ===== DIRECTORY - not really system calls ===== */
|
||||
typedef DIR qse_dir_t;
|
||||
#define QSE_OPENDIR(name) opendir(name)
|
||||
#define QSE_CLOSEDIR(name) closedir(name)
|
||||
|
||||
|
@ -448,11 +448,6 @@ void qse_htrd_clear (qse_htrd_t* htrd)
|
||||
clear_feed (htrd);
|
||||
}
|
||||
|
||||
void qse_htrd_setmmgr (qse_htrd_t* htrd, qse_mmgr_t* mmgr)
|
||||
{
|
||||
htrd->mmgr = mmgr;
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_htrd_getmmgr (qse_htrd_t* htrd)
|
||||
{
|
||||
return htrd->mmgr;
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <qse/cmn/alg.h>
|
||||
#include <qse/cmn/fmt.h>
|
||||
#include <qse/cmn/path.h>
|
||||
#include <qse/cmn/mux.h>
|
||||
#include <qse/cmn/dir.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <winsock2.h>
|
||||
@ -47,7 +49,7 @@
|
||||
# if defined(HAVE_SYS_SENDFILE_H)
|
||||
# include <sys/sendfile.h>
|
||||
# endif
|
||||
# if defined(HAVE_EPOLL) && defined(HAVE_SYS_EPOLL_H)
|
||||
# if defined(HAVE_SYS_EPOLL_H)
|
||||
# include <sys/epoll.h>
|
||||
# endif
|
||||
# if defined(__linux__)
|
||||
@ -544,11 +546,15 @@ static int server_open (qse_httpd_t* httpd, qse_httpd_server_t* server)
|
||||
fd = socket (SOCKADDR_FAMILY(&addr), SOCK_STREAM, IPPROTO_TCP);
|
||||
if (fd <= -1) goto oops;
|
||||
|
||||
#if defined(FD_CLOEXEC)
|
||||
flag = fcntl (fd, F_GETFD);
|
||||
if (flag >= 0) fcntl (fd, F_SETFD, flag | FD_CLOEXEC);
|
||||
#endif
|
||||
|
||||
#if defined(SO_REUSEADDR)
|
||||
flag = 1;
|
||||
setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &flag, QSE_SIZEOF(flag));
|
||||
#endif
|
||||
|
||||
/* TODO: linux. use capset() to set required capabilities just in case */
|
||||
#if defined(IP_TRANSPARENT)
|
||||
@ -621,21 +627,41 @@ IP_TRANSPRENT is needed for:
|
||||
|
||||
if (listen (fd, 10) <= -1) goto oops;
|
||||
|
||||
#if defined(O_NONBLOCK)
|
||||
flag = fcntl (fd, F_GETFL);
|
||||
if (flag >= 0) fcntl (fd, F_SETFL, flag | O_NONBLOCK);
|
||||
#endif
|
||||
|
||||
server->handle.i = fd;
|
||||
return 0;
|
||||
|
||||
oops:
|
||||
#if defined(_WIN32)
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(WSAGetLastError()));
|
||||
if (fd != INVALID_SOCKET) closesocket (fd);
|
||||
#elif defined(__OS2__)
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(sock_errno()));
|
||||
if (fd >= 0) soclose (fd);
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
#else
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
if (fd >= 0) QSE_CLOSE (fd);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void server_close (qse_httpd_t* httpd, qse_httpd_server_t* server)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
closesocket (server->handle.i);
|
||||
#elif defined(__OS2__)
|
||||
soclose (server->handle.i);
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
#else
|
||||
QSE_CLOSE (server->handle.i);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int server_accept (
|
||||
@ -643,7 +669,7 @@ static int server_accept (
|
||||
{
|
||||
sockaddr_t addr;
|
||||
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
#if defined(HAVE_SOCKLEN_T)
|
||||
socklen_t addrlen;
|
||||
#else
|
||||
int addrlen;
|
||||
@ -667,12 +693,16 @@ qse_fprintf (QSE_STDERR, QSE_T("Error: too many client?\n"));
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FD_CLOEXEC)
|
||||
flag = fcntl (fd, F_GETFD);
|
||||
if (flag >= 0) fcntl (fd, F_SETFD, flag | FD_CLOEXEC);
|
||||
#endif
|
||||
|
||||
#if defined(O_NONBLOCK)
|
||||
flag = fcntl (fd, F_GETFL);
|
||||
if (flag >= 0) fcntl (fd, F_SETFL, flag | O_NONBLOCK);
|
||||
|
||||
#endif
|
||||
|
||||
if (sockaddr_to_nwad (&addr, &client->remote_addr) <= -1)
|
||||
{
|
||||
@ -721,10 +751,22 @@ qse_fprintf (QSE_STDERR, QSE_T("Error: too many client?\n"));
|
||||
|
||||
static int peer_open (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
{
|
||||
int fd = -1, flag;
|
||||
sockaddr_t connaddr, bindaddr;
|
||||
int connaddrsize, bindaddrsize;
|
||||
int connected = 1;
|
||||
#if defined(_WIN32)
|
||||
SOCKET fd = -1;
|
||||
unsigned long cmd;
|
||||
#elif defined(__OS2__)
|
||||
int fd = -1;
|
||||
int flag;
|
||||
#elif defined(__DOS__)
|
||||
int fd = -1;
|
||||
int flag;
|
||||
#else
|
||||
int fd = -1;
|
||||
int flag;
|
||||
#endif
|
||||
|
||||
connaddrsize = nwad_to_sockaddr (&peer->nwad, &connaddr);
|
||||
bindaddrsize = nwad_to_sockaddr (&peer->local, &bindaddr);
|
||||
@ -741,14 +783,37 @@ static int peer_open (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
flag = 1;
|
||||
setsockopt (fd, SOL_IP, IP_TRANSPARENT, &flag, QSE_SIZEOF(flag));
|
||||
#endif
|
||||
|
||||
if (bind (fd, (struct sockaddr*)&bindaddr, bindaddrsize) <= -1)
|
||||
{
|
||||
/* i won't care about binding faiulre */
|
||||
/* TODO: some logging for this failure though */
|
||||
}
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
cmd = 1;
|
||||
if (ioctlsocket(fd, FIONBIO, &cmd) == SOCKET_ERROR) goto oops;
|
||||
|
||||
if (connect (fd, (struct sockaddr*)&connaddr, connaddrsize) <= -1)
|
||||
{
|
||||
if (WSAGetLastError() != WSAEWOULDBLOCK) goto oops;
|
||||
connected = 0;
|
||||
}
|
||||
|
||||
cmd = 0;
|
||||
if (ioctlsocket(fd, FIONBIO, &cmd) == SOCKET_ERROR) goto oops;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
#else
|
||||
|
||||
#if defined(FD_CLOEXEC)
|
||||
flag = fcntl (fd, F_GETFD);
|
||||
if (flag >= 0) fcntl (fd, F_SETFD, flag | FD_CLOEXEC);
|
||||
#endif
|
||||
|
||||
flag = fcntl (fd, F_GETFL);
|
||||
if (flag >= 0) fcntl (fd, F_SETFL, flag | O_NONBLOCK);
|
||||
@ -761,32 +826,85 @@ static int peer_open (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
|
||||
/* restore flags */
|
||||
if (fcntl (fd, F_SETFL, flag) <= -1) goto oops;
|
||||
#endif
|
||||
|
||||
peer->handle.i = fd;
|
||||
return connected;
|
||||
|
||||
oops:
|
||||
#if defined(_WIN32)
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(WSAGetLastError()));
|
||||
if (fd != INVALID_SOCKET) closesocket (fd);
|
||||
#elif defined(__OS2__)
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(sock_errno()));
|
||||
if (fd >= 0) soclose (fd);
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
#else
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
if (fd >= 0) QSE_CLOSE (fd);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void peer_close (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
closesocket (peer->handle.i);
|
||||
#elif defined(__OS2__)
|
||||
soclose (peer->handle.i);
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
#else
|
||||
QSE_CLOSE (peer->handle.i);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int peer_connected (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
{
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
socklen_t len;
|
||||
#else
|
||||
#if defined(_WIN32)
|
||||
int len;
|
||||
#endif
|
||||
DWORD ret;
|
||||
|
||||
len = QSE_SIZEOF(ret);
|
||||
if (getsockopt (peer->handle.i, SOL_SOCKET, SO_ERROR, (char*)&ret, &len) == SOCKET_ERROR)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum (ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ret == WSAEWOULDBLOCK) return 0;
|
||||
if (ret != 0)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum (ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1; /* connection completed */
|
||||
|
||||
#elif defined(__OS2__)
|
||||
/* TODO */
|
||||
httpd->errnum = QSE_HTTPD_ENOIMPL;
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO */
|
||||
httpd->errnum = QSE_HTTPD_ENOIMPL;
|
||||
return -1;
|
||||
#else
|
||||
|
||||
#if defined(HAVE_SOCKLEN_T)
|
||||
socklen_t len;
|
||||
#else
|
||||
int len;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
len = QSE_SIZEOF(ret);
|
||||
if (getsockopt (peer->handle.i, SOL_SOCKET, SO_ERROR, &ret, &len) <= -1) return -1;
|
||||
if (getsockopt (peer->handle.i, SOL_SOCKET, SO_ERROR, &ret, &len) <= -1)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum (ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ret == EINPROGRESS) return 0;
|
||||
if (ret != 0)
|
||||
@ -796,13 +914,14 @@ static int peer_connected (qse_httpd_t* httpd, qse_httpd_peer_t* peer)
|
||||
}
|
||||
|
||||
return 1; /* connection completed */
|
||||
#endif
|
||||
}
|
||||
|
||||
static qse_ssize_t peer_recv (
|
||||
qse_httpd_t* httpd, qse_httpd_peer_t* peer,
|
||||
qse_mchar_t* buf, qse_size_t bufsize)
|
||||
{
|
||||
ssize_t ret = read (peer->handle.i, buf, bufsize);
|
||||
ssize_t ret = recv (peer->handle.i, buf, bufsize, 0);
|
||||
if (ret <= -1) qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
return ret;
|
||||
}
|
||||
@ -811,216 +930,101 @@ static qse_ssize_t peer_send (
|
||||
qse_httpd_t* httpd, qse_httpd_peer_t* peer,
|
||||
const qse_mchar_t* buf, qse_size_t bufsize)
|
||||
{
|
||||
ssize_t ret = write (peer->handle.i, buf, bufsize);
|
||||
ssize_t ret = send (peer->handle.i, buf, bufsize, 0);
|
||||
if (ret <= -1) qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
struct mux_ev_t
|
||||
typedef struct mux_xtn_t mux_xtn_t;
|
||||
struct mux_xtn_t
|
||||
{
|
||||
qse_ubi_t handle;
|
||||
int reqmask;
|
||||
qse_httpd_t* httpd;
|
||||
qse_httpd_muxcb_t cbfun;
|
||||
void* cbarg;
|
||||
};
|
||||
|
||||
struct mux_t
|
||||
static void dispatch_muxcb (qse_mux_t* mux, const qse_mux_evt_t* evt)
|
||||
{
|
||||
int fd;
|
||||
mux_xtn_t* xtn;
|
||||
qse_ubi_t ubi;
|
||||
|
||||
struct
|
||||
{
|
||||
struct epoll_event* ptr;
|
||||
qse_size_t len;
|
||||
qse_size_t capa;
|
||||
} ee;
|
||||
xtn = qse_mux_getxtn (mux);
|
||||
ubi.i = evt->hnd;
|
||||
xtn->cbfun (xtn->httpd, mux, ubi, evt->mask, evt->data);
|
||||
}
|
||||
|
||||
struct
|
||||
{
|
||||
struct mux_ev_t** ptr;
|
||||
qse_size_t capa;
|
||||
} mev;
|
||||
};
|
||||
|
||||
#define MUX_EV_ALIGN 64
|
||||
|
||||
static void* mux_open (qse_httpd_t* httpd)
|
||||
static void* mux_open (qse_httpd_t* httpd, qse_httpd_muxcb_t cbfun)
|
||||
{
|
||||
struct mux_t* mux;
|
||||
qse_mux_t* mux;
|
||||
mux_xtn_t* xtn;
|
||||
|
||||
mux = qse_httpd_allocmem (httpd, QSE_SIZEOF(*mux));
|
||||
if (mux == QSE_NULL) return QSE_NULL;
|
||||
|
||||
QSE_MEMSET (mux, 0, QSE_SIZEOF(*mux));
|
||||
|
||||
#if defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC)
|
||||
mux->fd = epoll_create1 (O_CLOEXEC);
|
||||
#else
|
||||
mux->fd = epoll_create (100);
|
||||
#endif
|
||||
if (mux->fd <= -1)
|
||||
mux = qse_mux_open (httpd->mmgr, QSE_SIZEOF(*xtn), dispatch_muxcb, 256);
|
||||
if (!mux)
|
||||
{
|
||||
qse_httpd_freemem (httpd, mux);
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
/* TODO
|
||||
qse_httpd_seterrnum (httpd, muxerr_to_errnum(mux));
|
||||
*/
|
||||
return QSE_NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC)
|
||||
/* nothing else to do */
|
||||
#else
|
||||
{
|
||||
int flag = fcntl (mux->fd, F_GETFD);
|
||||
if (flag >= 0) fcntl (mux->fd, F_SETFD, flag | FD_CLOEXEC);
|
||||
}
|
||||
#endif
|
||||
|
||||
xtn = qse_mux_getxtn (mux);
|
||||
xtn->httpd = httpd;
|
||||
xtn->cbfun = cbfun;
|
||||
return mux;
|
||||
}
|
||||
|
||||
static void mux_close (qse_httpd_t* httpd, void* vmux)
|
||||
{
|
||||
struct mux_t* mux = (struct mux_t*)vmux;
|
||||
if (mux->ee.ptr) qse_httpd_freemem (httpd, mux->ee.ptr);
|
||||
if (mux->mev.ptr)
|
||||
{
|
||||
qse_size_t i;
|
||||
for (i = 0; i < mux->mev.capa; i++)
|
||||
if (mux->mev.ptr[i]) qse_httpd_freemem (httpd, mux->mev.ptr[i]);
|
||||
qse_httpd_freemem (httpd, mux->mev.ptr);
|
||||
}
|
||||
QSE_CLOSE (mux->fd);
|
||||
qse_httpd_freemem (httpd, mux);
|
||||
qse_mux_close ((qse_mux_t*)vmux);
|
||||
}
|
||||
|
||||
static int mux_addhnd (
|
||||
qse_httpd_t* httpd, void* vmux, qse_ubi_t handle,
|
||||
int mask, qse_httpd_muxcb_t cbfun, void* cbarg)
|
||||
qse_httpd_t* httpd, void* vmux, qse_ubi_t handle, int mask, void* data)
|
||||
{
|
||||
struct mux_t* mux = (struct mux_t*)vmux;
|
||||
struct epoll_event ev;
|
||||
struct mux_ev_t* mev;
|
||||
qse_mux_evt_t evt;
|
||||
|
||||
ev.events = 0;
|
||||
if (mask & QSE_HTTPD_MUX_READ) ev.events |= EPOLLIN;
|
||||
if (mask & QSE_HTTPD_MUX_WRITE) ev.events |= EPOLLOUT;
|
||||
evt.hnd = handle.i;
|
||||
evt.mask = 0;
|
||||
if (mask & QSE_HTTPD_MUX_READ) evt.mask |= QSE_MUX_IN;
|
||||
if (mask & QSE_HTTPD_MUX_WRITE) evt.mask |= QSE_MUX_OUT;
|
||||
evt.data = data;
|
||||
|
||||
if (ev.events == 0 || handle.i <= -1)
|
||||
if (qse_mux_insert ((qse_mux_t*)vmux, &evt) <= -1)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_EINVAL);
|
||||
/* TODO
|
||||
qse_httpd_seterrnum (httpd, muxerr_to_errnum(mux));
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (handle.i >= mux->mev.capa)
|
||||
{
|
||||
struct mux_ev_t** tmp;
|
||||
qse_size_t tmpcapa, i;
|
||||
|
||||
tmpcapa = (((handle.i + MUX_EV_ALIGN) / MUX_EV_ALIGN) * MUX_EV_ALIGN);
|
||||
|
||||
tmp = (struct mux_ev_t**) qse_httpd_reallocmem (
|
||||
httpd, mux->mev.ptr,
|
||||
QSE_SIZEOF(*mux->mev.ptr) * tmpcapa);
|
||||
if (tmp == QSE_NULL) return -1;
|
||||
|
||||
for (i = mux->mev.capa; i < tmpcapa; i++) tmp[i] = QSE_NULL;
|
||||
mux->mev.ptr = tmp;
|
||||
mux->mev.capa = tmpcapa;
|
||||
}
|
||||
|
||||
if (mux->mev.ptr[handle.i] == QSE_NULL)
|
||||
{
|
||||
/* the location of the data passed to epoll_ctl()
|
||||
* must not change unless i update the info with epoll()
|
||||
* whenever there is reallocation. so i simply
|
||||
* make mux-mev.ptr reallocatable but auctual
|
||||
* data fixed once allocated. */
|
||||
mux->mev.ptr[handle.i] = qse_httpd_allocmem (
|
||||
httpd, QSE_SIZEOF(*mux->mev.ptr[handle.i]));
|
||||
if (mux->mev.ptr[handle.i] == QSE_NULL) return -1;
|
||||
}
|
||||
|
||||
if (mux->ee.len >= mux->ee.capa)
|
||||
{
|
||||
struct epoll_event* tmp;
|
||||
|
||||
tmp = qse_httpd_reallocmem (
|
||||
httpd, mux->ee.ptr,
|
||||
QSE_SIZEOF(*mux->ee.ptr) * (mux->ee.capa + 1) * 2);
|
||||
if (tmp == QSE_NULL) return -1;
|
||||
|
||||
mux->ee.ptr = tmp;
|
||||
mux->ee.capa = (mux->ee.capa + 1) * 2;
|
||||
}
|
||||
|
||||
mev = mux->mev.ptr[handle.i];
|
||||
mev->handle = handle;
|
||||
mev->reqmask = mask;
|
||||
mev->cbfun = cbfun;
|
||||
mev->cbarg = cbarg;
|
||||
|
||||
ev.data.ptr = mev;
|
||||
|
||||
if (epoll_ctl (mux->fd, EPOLL_CTL_ADD, handle.i, &ev) <= -1)
|
||||
{
|
||||
/* don't rollback ee.ptr */
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
mux->ee.len++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mux_delhnd (qse_httpd_t* httpd, void* vmux, qse_ubi_t handle)
|
||||
{
|
||||
struct mux_t* mux = (struct mux_t*)vmux;
|
||||
|
||||
if (epoll_ctl (mux->fd, EPOLL_CTL_DEL, handle.i, QSE_NULL) <= -1)
|
||||
qse_mux_evt_t evt;
|
||||
evt.hnd = handle.i;
|
||||
if (qse_mux_delete ((qse_mux_t*)vmux, &evt) <= -1)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
/* TODO
|
||||
qse_httpd_seterrnum (httpd, muxerr_to_errnum(mux));
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
|
||||
mux->ee.len--;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mux_poll (qse_httpd_t* httpd, void* vmux, qse_ntime_t timeout)
|
||||
{
|
||||
struct mux_t* mux = (struct mux_t*)vmux;
|
||||
struct mux_ev_t* mev;
|
||||
int mask, nfds, i;
|
||||
|
||||
nfds = epoll_wait (mux->fd, mux->ee.ptr, mux->ee.len, timeout);
|
||||
if (nfds <= -1)
|
||||
if (qse_mux_poll ((qse_mux_t*)vmux, timeout) <= -1)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
/* TODO
|
||||
qse_httpd_seterrnum (httpd, muxerr_to_errnum(mux));
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < nfds; i++)
|
||||
{
|
||||
mev = mux->ee.ptr[i].data.ptr;
|
||||
|
||||
mask = 0;
|
||||
|
||||
if (mux->ee.ptr[i].events & EPOLLIN)
|
||||
mask |= QSE_HTTPD_MUX_READ;
|
||||
if (mux->ee.ptr[i].events & EPOLLOUT)
|
||||
mask |= QSE_HTTPD_MUX_WRITE;
|
||||
|
||||
if (mux->ee.ptr[i].events & EPOLLHUP)
|
||||
{
|
||||
if (mev->reqmask & QSE_HTTPD_MUX_READ)
|
||||
mask |= QSE_HTTPD_MUX_READ;
|
||||
if (mev->reqmask & QSE_HTTPD_MUX_WRITE)
|
||||
mask |= QSE_HTTPD_MUX_WRITE;
|
||||
}
|
||||
|
||||
mev->cbfun (httpd, mux, mev->handle, mask, mev->cbarg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1064,11 +1068,24 @@ static int mux_writable (qse_httpd_t* httpd, qse_ubi_t handle, qse_ntoff_t msec)
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
|
||||
static int stat_file (
|
||||
qse_httpd_t* httpd, const qse_mchar_t* path,
|
||||
qse_httpd_stat_t* hst, int regonly)
|
||||
{
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
qse_stat_t st;
|
||||
|
||||
/* TODO: lstat? or stat? */
|
||||
@ -1092,24 +1109,39 @@ static int stat_file (
|
||||
hst->dev = st.st_dev;
|
||||
hst->ino = st.st_ino;
|
||||
hst->size = st.st_size;
|
||||
#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
|
||||
#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
|
||||
hst->mtime = QSE_SECNSEC_TO_MSEC(st.st_mtim.tv_sec,st.st_mtim.tv_nsec);
|
||||
#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
|
||||
#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
|
||||
hst->mtime = QSE_SECNSEC_TO_MSEC(st.st_mtimespec.tv_sec,st.st_mtimespec.tv_nsec);
|
||||
#else
|
||||
#else
|
||||
hst->mtime = QSE_SEC_TO_MSEC(st.st_mtime);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
static int file_executable (qse_httpd_t* httpd, const qse_mchar_t* path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
if (access (path, X_OK) == -1)
|
||||
return (errno == EACCES)? 0 /*no*/: -1 /*error*/;
|
||||
return 1; /* yes */
|
||||
#endif
|
||||
}
|
||||
|
||||
static int file_stat (
|
||||
@ -1121,13 +1153,27 @@ static int file_stat (
|
||||
static int file_ropen (
|
||||
qse_httpd_t* httpd, const qse_mchar_t* path, qse_ubi_t* handle)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
|
||||
int fd;
|
||||
int flags;
|
||||
|
||||
flags = O_RDONLY;
|
||||
#if defined(O_LARGEFILE)
|
||||
#if defined(O_LARGEFILE)
|
||||
flags |= O_LARGEFILE;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
qse_printf (QSE_T("opening file [%hs] for reading\n"), path);
|
||||
fd = QSE_OPEN (path, flags, 0);
|
||||
@ -1143,19 +1189,34 @@ qse_printf (QSE_T("opening file [%hs] for reading\n"), path);
|
||||
handle->i = fd;
|
||||
qse_printf (QSE_T("opened file %hs\n"), path);
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static int file_wopen (
|
||||
qse_httpd_t* httpd, const qse_mchar_t* path,
|
||||
qse_ubi_t* handle)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
int fd;
|
||||
int flags;
|
||||
|
||||
flags = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
#if defined(O_LARGEFILE)
|
||||
#if defined(O_LARGEFILE)
|
||||
flags |= O_LARGEFILE;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
qse_printf (QSE_T("opening file [%hs] for writing\n"), path);
|
||||
fd = QSE_OPEN (path, flags, 0644);
|
||||
@ -1167,26 +1228,69 @@ qse_printf (QSE_T("opening file [%hs] for writing\n"), path);
|
||||
|
||||
handle->i = fd;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void file_close (qse_httpd_t* httpd, qse_ubi_t handle)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
qse_printf (QSE_T("closing file %d\n"), handle.i);
|
||||
QSE_CLOSE (handle.i);
|
||||
#endif
|
||||
}
|
||||
|
||||
static qse_ssize_t file_read (
|
||||
qse_httpd_t* httpd, qse_ubi_t handle,
|
||||
qse_mchar_t* buf, qse_size_t len)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
return QSE_READ (handle.i, buf, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
static qse_ssize_t file_write (
|
||||
qse_httpd_t* httpd, qse_ubi_t handle,
|
||||
const qse_mchar_t* buf, qse_size_t len)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__OS2__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#elif defined(__DOS__)
|
||||
/* TODO: */
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
return -1;
|
||||
#else
|
||||
return QSE_WRITE (handle.i, buf, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
@ -1217,7 +1321,7 @@ static int dir_open (qse_httpd_t* httpd, const qse_mchar_t* path, qse_ubi_t* han
|
||||
return -1;
|
||||
}
|
||||
|
||||
d->dp = QSE_OPENDIR (path);
|
||||
d->dp = qse_dir_open (httpd->mmgr, 0, (const qse_char_t*)path, QSE_DIR_MBSPATH | QSE_DIR_SORT);
|
||||
if (d->dp == QSE_NULL)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
@ -1236,7 +1340,7 @@ static void dir_close (qse_httpd_t* httpd, qse_ubi_t handle)
|
||||
|
||||
d = (dir_t*)handle.ptr;
|
||||
|
||||
QSE_CLOSEDIR (d->dp);
|
||||
qse_dir_close (d->dp);
|
||||
|
||||
QSE_MMGR_FREE (httpd->mmgr, d->path);
|
||||
QSE_MMGR_FREE (httpd->mmgr, d);
|
||||
@ -1245,23 +1349,22 @@ static void dir_close (qse_httpd_t* httpd, qse_ubi_t handle)
|
||||
static int dir_read (qse_httpd_t* httpd, qse_ubi_t handle, qse_httpd_dirent_t* dirent)
|
||||
{
|
||||
dir_t* d;
|
||||
qse_dirent_t* de;
|
||||
qse_dir_ent_t de;
|
||||
qse_mchar_t* fpath;
|
||||
int n;
|
||||
|
||||
d = (dir_t*)handle.ptr;
|
||||
|
||||
errno = 0;
|
||||
de = QSE_READDIR (d->dp);
|
||||
if (de == QSE_NULL)
|
||||
n = qse_dir_read (d->dp, &de);
|
||||
if (n <= -1)
|
||||
{
|
||||
if (errno == 0) return 0;
|
||||
qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ESYSERR);
|
||||
return -1;
|
||||
}
|
||||
else if (n == 0) return 0;
|
||||
|
||||
/* i assume that d->path ends with a slash */
|
||||
fpath = qse_mbsdup2 (d->path, de->d_name, httpd->mmgr);
|
||||
fpath = qse_mbsdup2 (d->path, (const qse_mchar_t*)de.name, httpd->mmgr);
|
||||
if (fpath == QSE_NULL)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOMEM);
|
||||
@ -1272,7 +1375,7 @@ static int dir_read (qse_httpd_t* httpd, qse_ubi_t handle, qse_httpd_dirent_t* d
|
||||
QSE_MMGR_FREE (httpd->mmgr, fpath);
|
||||
if (n <= -1) QSE_MEMSET (dirent, 0, QSE_SIZEOF(*dirent));
|
||||
|
||||
dirent->name = de->d_name;
|
||||
dirent->name = (const qse_mchar_t*)de.name;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1966,7 +2069,17 @@ auth_ok:
|
||||
xpath = merge_paths (httpd, server_xtn->cfg[SERVER_XTN_CFG_DOCROOT], qpath);
|
||||
if (xpath == QSE_NULL) return -1;
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* TODO */
|
||||
#elif defined(__OS2__)
|
||||
|
||||
/* TODO */
|
||||
#elif defined(__DOS__)
|
||||
|
||||
/* TODO */
|
||||
#else
|
||||
if (QSE_STAT (xpath, &st) == 0 && S_ISDIR(st.st_mode))
|
||||
#endif
|
||||
{
|
||||
/* it is a directory */
|
||||
if (server_xtn->cfg2.s.idxstd)
|
||||
|
@ -99,11 +99,6 @@ void qse_httpd_seterrnum (qse_httpd_t* httpd, qse_httpd_errnum_t errnum)
|
||||
httpd->errnum = errnum;
|
||||
}
|
||||
|
||||
void qse_httpd_setmmgr (qse_httpd_t* httpd, qse_mmgr_t* mmgr)
|
||||
{
|
||||
httpd->mmgr = mmgr;
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_httpd_getmmgr (qse_httpd_t* httpd)
|
||||
{
|
||||
return httpd->mmgr;
|
||||
@ -300,6 +295,7 @@ static qse_httpd_client_t* new_client (
|
||||
|
||||
QSE_MEMSET (client, 0, QSE_SIZEOF(*client));
|
||||
|
||||
client->type = QSE_HTTPD_CLIENT;
|
||||
client->htrd = qse_htrd_open (httpd->mmgr, QSE_SIZEOF(*xtn));
|
||||
if (client->htrd == QSE_NULL)
|
||||
{
|
||||
@ -442,8 +438,7 @@ qse_printf (QSE_T("failed to accept from server %s\n"), tmp);
|
||||
|
||||
qse_printf (QSE_T("MUX ADDHND CLIENT READ %d\n"), client->handle.i);
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, mux, client->handle, QSE_HTTPD_MUX_READ,
|
||||
perform_client_task, client) <= -1)
|
||||
httpd, mux, client->handle, QSE_HTTPD_MUX_READ, client) <= -1)
|
||||
{
|
||||
free_client (httpd, client);
|
||||
return -1;
|
||||
@ -511,8 +506,7 @@ qse_printf (QSE_T("FAILED TO ACTIVATE SERVER....[%s]\n"), buf);
|
||||
|
||||
qse_printf (QSE_T("MUX ADDHND SERVER %d\n"), server->handle.i);
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, httpd->mux, server->handle, QSE_HTTPD_MUX_READ,
|
||||
accept_client, server) <= -1)
|
||||
httpd, httpd->mux, server->handle, QSE_HTTPD_MUX_READ, server) <= -1)
|
||||
{
|
||||
qse_printf (QSE_T("FAILED TO ADD SERVER HANDLE TO MUX....\n"));
|
||||
httpd->scb->server.close (httpd, server);
|
||||
@ -556,6 +550,7 @@ qse_httpd_server_t* qse_httpd_attachserver (
|
||||
QSE_MEMCPY (server, tmpl, QSE_SIZEOF(*server));
|
||||
QSE_MEMSET (server + 1, 0, xtnsize);
|
||||
|
||||
server->type = QSE_HTTPD_SERVER;
|
||||
server->flags &= ~QSE_HTTPD_SERVER_ACTIVE;
|
||||
server->predetach = predetach;
|
||||
|
||||
@ -827,8 +822,7 @@ qse_printf (QSE_T("REMOVING XXXXX FROM READING NO MORE TASK....\n"));
|
||||
if (mux_status)
|
||||
{
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, httpd->mux, client->handle,
|
||||
mux_mask, perform_client_task, client) <= -1)
|
||||
httpd, httpd->mux, client->handle, mux_mask, client) <= -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -915,7 +909,7 @@ qse_printf (QSE_T("REMOVING XXXXX FROM READING NO MORE TASK....\n"));
|
||||
{
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, httpd->mux, task->trigger[i].handle,
|
||||
trigger_mux_mask, perform_client_task, client) <= -1)
|
||||
trigger_mux_mask, client) <= -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -949,7 +943,7 @@ qse_printf (QSE_T("REMOVING XXXXX FROM READING NO MORE TASK....\n"));
|
||||
{
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, httpd->mux, client->handle,
|
||||
client_handle_mux_mask, perform_client_task, client) <= -1)
|
||||
client_handle_mux_mask, client) <= -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -1073,7 +1067,7 @@ qse_printf (QSE_T("MUX ADDHND CLIENT RW(ENTASK) %d\n"), client->handle.i);
|
||||
if (httpd->scb->mux.addhnd (
|
||||
httpd, httpd->mux, client->handle,
|
||||
QSE_HTTPD_MUX_READ | QSE_HTTPD_MUX_WRITE,
|
||||
perform_client_task, client) <= -1)
|
||||
client) <= -1)
|
||||
{
|
||||
/*purge_client (httpd, client);*/
|
||||
client->status |= CLIENT_BAD;
|
||||
@ -1085,6 +1079,14 @@ qse_printf (QSE_T("MUX ADDHND CLIENT RW(ENTASK) %d\n"), client->handle.i);
|
||||
return new_task;
|
||||
}
|
||||
|
||||
static int dispatch_mux (
|
||||
qse_httpd_t* httpd, void* mux, qse_ubi_t handle, int mask, void* cbarg)
|
||||
{
|
||||
return ((qse_httpd_server_t*)cbarg)->type == QSE_HTTPD_SERVER?
|
||||
accept_client (httpd, mux, handle, mask, cbarg):
|
||||
perform_client_task (httpd, mux, handle, mask, cbarg);
|
||||
}
|
||||
|
||||
int qse_httpd_loop (qse_httpd_t* httpd, qse_httpd_scb_t* scb, qse_httpd_rcb_t* rcb, qse_ntime_t timeout)
|
||||
{
|
||||
QSE_ASSERTX (httpd->server.list.head != QSE_NULL,
|
||||
@ -1106,7 +1108,7 @@ int qse_httpd_loop (qse_httpd_t* httpd, qse_httpd_scb_t* scb, qse_httpd_rcb_t* r
|
||||
|
||||
QSE_ASSERT (httpd->server.navail > 0);
|
||||
|
||||
httpd->mux = httpd->scb->mux.open (httpd);
|
||||
httpd->mux = httpd->scb->mux.open (httpd, dispatch_mux);
|
||||
if (httpd->mux == QSE_NULL)
|
||||
{
|
||||
qse_printf (QSE_T("can't open mux....\n"));
|
||||
|
@ -73,12 +73,6 @@ void qse_upxd_fini (qse_upxd_t* upxd)
|
||||
free_all_servers (upxd);
|
||||
}
|
||||
|
||||
|
||||
void qse_upxd_setmmgr (qse_upxd_t* upxd, qse_mmgr_t* mmgr)
|
||||
{
|
||||
upxd->mmgr = mmgr;
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_upxd_getmmgr (qse_upxd_t* upxd)
|
||||
{
|
||||
return upxd->mmgr;
|
||||
|
@ -143,11 +143,6 @@ void qse_sed_fini (qse_sed_t* sed)
|
||||
qse_str_fini (&sed->tmp.rex);
|
||||
}
|
||||
|
||||
void qse_sed_setmmgr (qse_sed_t* sed, qse_mmgr_t* mmgr)
|
||||
{
|
||||
sed->mmgr = mmgr;
|
||||
}
|
||||
|
||||
qse_mmgr_t* qse_sed_getmmgr (qse_sed_t* sed)
|
||||
{
|
||||
return sed->mmgr;
|
||||
|
@ -15,6 +15,11 @@ libqseawk_sys_la_SOURCES = sys.c
|
||||
libqseawk_sys_la_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
libqseawk_sys_la_LIBADD = $(LIBADD_COMMON)
|
||||
|
||||
mod_LTLIBRARIES += libqseawk-dir.la
|
||||
libqseawk_dir_la_SOURCES = dir.c
|
||||
libqseawk_dir_la_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
libqseawk_dir_la_LIBADD = $(LIBADD_COMMON)
|
||||
|
||||
if HAVE_LIBUCI
|
||||
mod_LTLIBRARIES += libqseawk-uci.la
|
||||
libqseawk_uci_la_SOURCES = uci.c
|
||||
|
@ -81,6 +81,12 @@ am__uninstall_files_from_dir = { \
|
||||
am__installdirs = "$(DESTDIR)$(moddir)"
|
||||
LTLIBRARIES = $(mod_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libqseawk_dir_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
am_libqseawk_dir_la_OBJECTS = dir.lo
|
||||
libqseawk_dir_la_OBJECTS = $(am_libqseawk_dir_la_OBJECTS)
|
||||
libqseawk_dir_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libqseawk_dir_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@HAVE_C_MPI_TRUE@libqseawk_mpi_la_DEPENDENCIES = \
|
||||
@HAVE_C_MPI_TRUE@ $(am__DEPENDENCIES_1)
|
||||
am__libqseawk_mpi_la_SOURCES_DIST = mpi.c
|
||||
@ -119,9 +125,10 @@ CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libqseawk_mpi_la_SOURCES) $(libqseawk_sys_la_SOURCES) \
|
||||
$(libqseawk_uci_la_SOURCES)
|
||||
DIST_SOURCES = $(am__libqseawk_mpi_la_SOURCES_DIST) \
|
||||
SOURCES = $(libqseawk_dir_la_SOURCES) $(libqseawk_mpi_la_SOURCES) \
|
||||
$(libqseawk_sys_la_SOURCES) $(libqseawk_uci_la_SOURCES)
|
||||
DIST_SOURCES = $(libqseawk_dir_la_SOURCES) \
|
||||
$(am__libqseawk_mpi_la_SOURCES_DIST) \
|
||||
$(libqseawk_sys_la_SOURCES) \
|
||||
$(am__libqseawk_uci_la_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
@ -307,10 +314,14 @@ AM_CPPFLAGS = \
|
||||
LDFLAGS_COMMON = -L$(abs_builddir)/../../lib/cmn -L$(abs_builddir)/../../lib/awk -L$(libdir) -no-undefined -version-info 1:0:0
|
||||
LIBADD_COMMON = -lqseawk -lqsecmn
|
||||
moddir = $(libdir)
|
||||
mod_LTLIBRARIES = libqseawk-sys.la $(am__append_1) $(am__append_2)
|
||||
mod_LTLIBRARIES = libqseawk-sys.la libqseawk-dir.la $(am__append_1) \
|
||||
$(am__append_2)
|
||||
libqseawk_sys_la_SOURCES = sys.c
|
||||
libqseawk_sys_la_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
libqseawk_sys_la_LIBADD = $(LIBADD_COMMON)
|
||||
libqseawk_dir_la_SOURCES = dir.c
|
||||
libqseawk_dir_la_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
libqseawk_dir_la_LIBADD = $(LIBADD_COMMON)
|
||||
@HAVE_LIBUCI_TRUE@libqseawk_uci_la_SOURCES = uci.c
|
||||
@HAVE_LIBUCI_TRUE@libqseawk_uci_la_LDFLAGS = $(LDFLAGS_COMMON)
|
||||
@HAVE_LIBUCI_TRUE@libqseawk_uci_la_LIBADD = $(LIBADD_COMMON) $(UCI_LIBS)
|
||||
@ -383,6 +394,8 @@ clean-modLTLIBRARIES:
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libqseawk-dir.la: $(libqseawk_dir_la_OBJECTS) $(libqseawk_dir_la_DEPENDENCIES) $(EXTRA_libqseawk_dir_la_DEPENDENCIES)
|
||||
$(libqseawk_dir_la_LINK) -rpath $(moddir) $(libqseawk_dir_la_OBJECTS) $(libqseawk_dir_la_LIBADD) $(LIBS)
|
||||
libqseawk-mpi.la: $(libqseawk_mpi_la_OBJECTS) $(libqseawk_mpi_la_DEPENDENCIES) $(EXTRA_libqseawk_mpi_la_DEPENDENCIES)
|
||||
$(libqseawk_mpi_la_LINK) $(am_libqseawk_mpi_la_rpath) $(libqseawk_mpi_la_OBJECTS) $(libqseawk_mpi_la_LIBADD) $(LIBS)
|
||||
libqseawk-sys.la: $(libqseawk_sys_la_OBJECTS) $(libqseawk_sys_la_DEPENDENCIES) $(EXTRA_libqseawk_sys_la_DEPENDENCIES)
|
||||
@ -396,6 +409,7 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libqseawk_mpi_la-mpi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uci.Plo@am__quote@
|
||||
|
538
qse/mod/awk/dir.c
Normal file
538
qse/mod/awk/dir.c
Normal file
@ -0,0 +1,538 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/awk/awk.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/rbt.h>
|
||||
#include <qse/cmn/dir.h>
|
||||
#include "../../lib/cmn/mem.h"
|
||||
|
||||
typedef struct dir_list_t dir_list_t;
|
||||
typedef struct dir_node_t dir_node_t;
|
||||
|
||||
enum
|
||||
{
|
||||
DIR_ENOERR,
|
||||
DIR_ENOMEM,
|
||||
DIR_EINVAL,
|
||||
DIR_ENOENT
|
||||
};
|
||||
|
||||
struct dir_node_t
|
||||
{
|
||||
int id;
|
||||
qse_dir_t* ctx;
|
||||
dir_node_t* prev;
|
||||
dir_node_t* next;
|
||||
};
|
||||
|
||||
struct dir_list_t
|
||||
{
|
||||
dir_node_t* head;
|
||||
dir_node_t* tail;
|
||||
dir_node_t* free;
|
||||
|
||||
/* mapping table to map 'id' to 'node' */
|
||||
struct
|
||||
{
|
||||
dir_node_t** tab;
|
||||
int capa;
|
||||
int high;
|
||||
} map;
|
||||
|
||||
int errnum;
|
||||
};
|
||||
|
||||
static dir_node_t* new_dir_node (qse_awk_rtx_t* rtx, dir_list_t* list, const qse_char_t* path)
|
||||
{
|
||||
/* create a new context node and append it to the list tail */
|
||||
dir_node_t* node;
|
||||
|
||||
node = QSE_NULL;
|
||||
|
||||
if (list->free) node = list->free;
|
||||
else
|
||||
{
|
||||
node = qse_awk_rtx_callocmem (rtx, QSE_SIZEOF(*node));
|
||||
if (!node) goto oops;
|
||||
}
|
||||
|
||||
node->ctx = qse_dir_open (qse_awk_rtx_getmmgr(rtx), 0, path, 0);
|
||||
if (!node->ctx) goto oops;
|
||||
|
||||
if (node == list->free) list->free = node->next;
|
||||
else
|
||||
{
|
||||
if (list->map.high <= list->map.capa)
|
||||
{
|
||||
int newcapa;
|
||||
dir_node_t** tmp;
|
||||
|
||||
newcapa = list->map.capa + 64;
|
||||
if (newcapa < list->map.capa) goto oops; /* overflow */
|
||||
|
||||
tmp = (dir_node_t**) qse_awk_rtx_reallocmem (
|
||||
rtx, list->map.tab, QSE_SIZEOF(*tmp) * newcapa);
|
||||
if (!tmp) goto oops;
|
||||
|
||||
QSE_MEMSET (&tmp[list->map.capa], 0,
|
||||
QSE_SIZEOF(*tmp) * (newcapa - list->map.capa));
|
||||
|
||||
list->map.tab = tmp;
|
||||
list->map.capa = newcapa;
|
||||
}
|
||||
|
||||
node->id = list->map.high;
|
||||
QSE_ASSERT (list->map.tab[node->id] == QSE_NULL);
|
||||
list->map.tab[node->id] = node;
|
||||
list->map.high++;
|
||||
}
|
||||
|
||||
/* append it to the tail */
|
||||
node->next = QSE_NULL;
|
||||
node->prev = list->tail;
|
||||
if (list->tail) list->tail->next = node;
|
||||
else list->head = node;
|
||||
list->tail = node;
|
||||
|
||||
return node;
|
||||
|
||||
oops:
|
||||
if (node) qse_awk_rtx_freemem (rtx, node);
|
||||
qse_awk_rtx_seterrnum (rtx, QSE_AWK_ENOMEM, QSE_NULL);
|
||||
return QSE_NULL;
|
||||
}
|
||||
|
||||
static void free_dir_node (qse_awk_rtx_t* rtx, dir_list_t* list, dir_node_t* node)
|
||||
{
|
||||
if (node->prev) node->prev->next = node->next;
|
||||
if (node->next) node->next->prev = node->prev;
|
||||
if (list->head == node) list->head = node->next;
|
||||
if (list->tail == node) list->tail = node->prev;
|
||||
|
||||
list->map.tab[node->id] = QSE_NULL;
|
||||
|
||||
if (node->ctx)
|
||||
{
|
||||
qse_dir_close (node->ctx);
|
||||
}
|
||||
|
||||
if (list->map.high == node->id + 1)
|
||||
{
|
||||
/* destroy the actual node if the node to be freed has the
|
||||
* highest id */
|
||||
QSE_MMGR_FREE (qse_awk_rtx_getmmgr(rtx), node);
|
||||
list->map.high--;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* otherwise, chain the node to the free list */
|
||||
node->ctx = QSE_NULL;
|
||||
node->next = list->free;
|
||||
list->free = node;
|
||||
}
|
||||
|
||||
/* however, i destroy the whole free list when all the nodes are
|
||||
* chanined to the free list */
|
||||
if (list->head == QSE_NULL)
|
||||
{
|
||||
qse_mmgr_t* mmgr;
|
||||
dir_node_t* curnode;
|
||||
|
||||
mmgr = qse_awk_rtx_getmmgr(rtx);
|
||||
|
||||
while (list->free)
|
||||
{
|
||||
curnode = list->free;
|
||||
list->free = list->free->next;
|
||||
QSE_ASSERT (curnode->ctx == QSE_NULL);
|
||||
QSE_MMGR_FREE (mmgr, curnode);
|
||||
}
|
||||
|
||||
QSE_MMGR_FREE (mmgr, list->map.tab);
|
||||
list->map.high = 0;
|
||||
list->map.capa = 0;
|
||||
list->map.tab = QSE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
static int close_byid (qse_awk_rtx_t* rtx, dir_list_t* list, qse_long_t id)
|
||||
{
|
||||
int x = DIR_EINVAL;
|
||||
|
||||
if (id >= 0 && id < list->map.high && list->map.tab[id])
|
||||
{
|
||||
free_dir_node (rtx, list, list->map.tab[id]);
|
||||
x = DIR_ENOERR;
|
||||
}
|
||||
|
||||
return -x;
|
||||
}
|
||||
|
||||
static int reset_byid (qse_awk_rtx_t* rtx, dir_list_t* list, qse_long_t id, const qse_char_t* path)
|
||||
{
|
||||
int x = DIR_EINVAL;
|
||||
|
||||
if (id >= 0 && id < list->map.high && list->map.tab[id])
|
||||
{
|
||||
if (qse_dir_reset (list->map.tab[id]->ctx, path) >= 0) x = DIR_ENOERR;
|
||||
}
|
||||
|
||||
return -x;
|
||||
}
|
||||
|
||||
static int read_byid (qse_awk_rtx_t* rtx, dir_list_t* list, qse_long_t id, qse_awk_val_t** retv)
|
||||
{
|
||||
int x = DIR_EINVAL;
|
||||
|
||||
if (id >= 0 && id < list->map.high && list->map.tab[id])
|
||||
{
|
||||
int y;
|
||||
qse_dir_ent_t ent;
|
||||
y = qse_dir_read (list->map.tab[id]->ctx, &ent);
|
||||
if (y == 0) x = DIR_ENOENT;
|
||||
else if (y >= 1)
|
||||
{
|
||||
qse_awk_val_t* tmp;
|
||||
tmp = qse_awk_rtx_makestrvalwithstr (rtx, ent.name);
|
||||
if (tmp)
|
||||
{
|
||||
*retv = tmp;
|
||||
x = DIR_ENOERR;
|
||||
}
|
||||
else x = DIR_ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
return -x;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
static QSE_INLINE dir_list_t* rtx_to_list (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
qse_rbt_pair_t* pair;
|
||||
pair = qse_rbt_search ((qse_rbt_t*)fi->mod->ctx, &rtx, QSE_SIZEOF(rtx));
|
||||
QSE_ASSERT (pair != QSE_NULL);
|
||||
return (dir_list_t*)QSE_RBT_VPTR(pair);
|
||||
}
|
||||
|
||||
static int fnc_dir_errno (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
qse_awk_val_t* retv;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
retv = qse_awk_rtx_makeintval (rtx, list->errnum);
|
||||
if (retv == QSE_NULL) return -1;
|
||||
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static qse_char_t* errmsg[] =
|
||||
{
|
||||
QSE_T("no error"),
|
||||
QSE_T("out of memory"),
|
||||
QSE_T("invalid data"),
|
||||
QSE_T("no entry"),
|
||||
QSE_T("unknown error")
|
||||
};
|
||||
|
||||
static int fnc_dir_errstr (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
qse_awk_val_t* retv;
|
||||
qse_long_t errnum;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
if (qse_awk_rtx_getnargs (rtx) <= 0 ||
|
||||
qse_awk_rtx_valtolong (rtx, qse_awk_rtx_getarg (rtx, 0), &errnum) <= -1)
|
||||
{
|
||||
errnum = list->errnum;
|
||||
}
|
||||
|
||||
if (errnum < 0 || errnum >= QSE_COUNTOF(errmsg)) errnum = QSE_COUNTOF(errmsg) - 1;
|
||||
|
||||
retv = qse_awk_rtx_makestrvalwithstr (rtx, errmsg[errnum]);
|
||||
if (retv == QSE_NULL) return -1;
|
||||
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fnc_dir_open (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
dir_node_t* node;
|
||||
qse_long_t ret;
|
||||
qse_awk_val_t* retv;
|
||||
qse_char_t* path;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
path = qse_awk_rtx_valtostrdup (rtx, qse_awk_rtx_getarg (rtx, 0), QSE_NULL);
|
||||
if (path == QSE_NULL)
|
||||
{
|
||||
list->errnum = DIR_ENOMEM;
|
||||
ret = -DIR_ENOMEM;
|
||||
}
|
||||
else
|
||||
{
|
||||
node = new_dir_node (rtx, list, path);
|
||||
ret = node? node->id: -DIR_ENOMEM;
|
||||
qse_awk_rtx_freemem (rtx, path);
|
||||
}
|
||||
|
||||
if (ret <= -1)
|
||||
{
|
||||
list->errnum = -ret;
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
retv = qse_awk_rtx_makeintval (rtx, ret);
|
||||
if (retv == QSE_NULL) return -1;
|
||||
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fnc_dir_close (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
qse_awk_val_t* retv;
|
||||
qse_long_t id;
|
||||
int ret;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
ret = qse_awk_rtx_valtolong (rtx, qse_awk_rtx_getarg (rtx, 0), &id);
|
||||
if (ret <= -1) ret = -DIR_EINVAL;
|
||||
else ret = close_byid (rtx, list, id);
|
||||
|
||||
if (ret <= -1)
|
||||
{
|
||||
list->errnum = -ret;
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
retv = qse_awk_rtx_makeintval (rtx, ret);
|
||||
if (retv == QSE_NULL) return -1;
|
||||
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fnc_dir_reset (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
qse_awk_val_t* retv;
|
||||
qse_long_t id;
|
||||
int ret;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
ret = qse_awk_rtx_valtolong (rtx, qse_awk_rtx_getarg (rtx, 0), &id);
|
||||
if (ret <= -1) ret = -DIR_EINVAL;
|
||||
else
|
||||
{
|
||||
qse_char_t* path;
|
||||
|
||||
path = qse_awk_rtx_valtostrdup (rtx, qse_awk_rtx_getarg(rtx, 1), QSE_NULL);
|
||||
if (path)
|
||||
{
|
||||
ret = reset_byid (rtx, list, id, path);
|
||||
qse_awk_rtx_freemem (rtx, path);
|
||||
}
|
||||
else ret = -DIR_ENOMEM;
|
||||
}
|
||||
|
||||
if (ret <= -1)
|
||||
{
|
||||
list->errnum = -ret;
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
retv = qse_awk_rtx_makeintval (rtx, ret);
|
||||
if (retv == QSE_NULL) return -1;
|
||||
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fnc_dir_read (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
|
||||
{
|
||||
dir_list_t* list;
|
||||
qse_awk_val_t* retv;
|
||||
qse_long_t id;
|
||||
int ret;
|
||||
|
||||
list = rtx_to_list (rtx, fi);
|
||||
|
||||
ret = qse_awk_rtx_valtolong (rtx, qse_awk_rtx_getarg (rtx, 0), &id);
|
||||
if (ret <= -1) ret = -DIR_EINVAL;
|
||||
else ret = read_byid (rtx, list, id, &retv);
|
||||
|
||||
if (ret <= -1)
|
||||
{
|
||||
list->errnum = -ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
qse_awk_rtx_setretval (rtx, retv);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
typedef struct fnctab_t fnctab_t;
|
||||
struct fnctab_t
|
||||
{
|
||||
const qse_char_t* name;
|
||||
qse_awk_mod_sym_fnc_t info;
|
||||
};
|
||||
|
||||
static fnctab_t fnctab[] =
|
||||
{
|
||||
{ QSE_T("close"), { { 1, 1, QSE_NULL }, fnc_dir_close, 0 } },
|
||||
{ QSE_T("errno"), { { 0, 0, QSE_NULL }, fnc_dir_errno, 0 } },
|
||||
{ QSE_T("errstr"), { { 0, 1, QSE_NULL }, fnc_dir_errstr, 0 } },
|
||||
{ QSE_T("open"), { { 1, 1, QSE_NULL }, fnc_dir_open, 0 } },
|
||||
{ QSE_T("read"), { { 1, 1, QSE_NULL }, fnc_dir_read, 0 } },
|
||||
{ QSE_T("reset"), { { 2, 2, QSE_NULL }, fnc_dir_reset, 0 } },
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
static int query (qse_awk_mod_t* mod, qse_awk_t* awk, const qse_char_t* name, qse_awk_mod_sym_t* sym)
|
||||
{
|
||||
qse_cstr_t ea;
|
||||
int left, right, mid, n;
|
||||
|
||||
left = 0; right = QSE_COUNTOF(fnctab) - 1;
|
||||
|
||||
while (left <= right)
|
||||
{
|
||||
mid = (left + right) / 2;
|
||||
|
||||
n = qse_strcmp (fnctab[mid].name, name);
|
||||
if (n > 0) right = mid - 1;
|
||||
else if (n < 0) left = mid + 1;
|
||||
else
|
||||
{
|
||||
sym->type = QSE_AWK_MOD_FNC;
|
||||
sym->u.fnc = fnctab[mid].info;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ea.ptr = name;
|
||||
ea.len = qse_strlen(name);
|
||||
qse_awk_seterror (awk, QSE_AWK_ENOENT, &ea, QSE_NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int init (qse_awk_mod_t* mod, qse_awk_rtx_t* rtx)
|
||||
{
|
||||
qse_rbt_t* rbt;
|
||||
dir_list_t list;
|
||||
|
||||
rbt = (qse_rbt_t*)mod->ctx;
|
||||
|
||||
QSE_MEMSET (&list, 0, QSE_SIZEOF(list));
|
||||
if (qse_rbt_insert (rbt, &rtx, QSE_SIZEOF(rtx), &list, QSE_SIZEOF(list)) == QSE_NULL)
|
||||
{
|
||||
qse_awk_rtx_seterrnum (rtx, QSE_AWK_ENOMEM, QSE_NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void fini (qse_awk_mod_t* mod, qse_awk_rtx_t* rtx)
|
||||
{
|
||||
qse_rbt_t* rbt;
|
||||
qse_rbt_pair_t* pair;
|
||||
|
||||
rbt = (qse_rbt_t*)mod->ctx;
|
||||
|
||||
/* garbage clean-up */
|
||||
pair = qse_rbt_search (rbt, &rtx, QSE_SIZEOF(rtx));
|
||||
if (pair)
|
||||
{
|
||||
dir_list_t* list;
|
||||
dir_node_t* node, * next;
|
||||
|
||||
list = QSE_RBT_VPTR(pair);
|
||||
node = list->head;
|
||||
while (node)
|
||||
{
|
||||
next = node->next;
|
||||
free_dir_node (rtx, list, node);
|
||||
node = next;
|
||||
}
|
||||
|
||||
qse_rbt_delete (rbt, &rtx, QSE_SIZEOF(rtx));
|
||||
}
|
||||
}
|
||||
|
||||
static void unload (qse_awk_mod_t* mod, qse_awk_t* awk)
|
||||
{
|
||||
qse_rbt_t* rbt;
|
||||
|
||||
rbt = (qse_rbt_t*)mod->ctx;
|
||||
|
||||
QSE_ASSERT (QSE_RBT_SIZE(rbt) == 0);
|
||||
qse_rbt_close (rbt);
|
||||
}
|
||||
|
||||
QSE_EXPORT int load (qse_awk_mod_t* mod, qse_awk_t* awk)
|
||||
{
|
||||
qse_rbt_t* rbt;
|
||||
|
||||
mod->query = query;
|
||||
mod->unload = unload;
|
||||
|
||||
mod->init = init;
|
||||
mod->fini = fini;
|
||||
|
||||
rbt = qse_rbt_open (qse_awk_getmmgr(awk), 0, 1, 1);
|
||||
if (rbt == QSE_NULL)
|
||||
{
|
||||
qse_awk_seterrnum (awk, QSE_AWK_ENOMEM, QSE_NULL);
|
||||
return -1;
|
||||
}
|
||||
qse_rbt_setmancbs (rbt, qse_getrbtmancbs(QSE_RBT_MANCBS_INLINE_COPIERS));
|
||||
|
||||
mod->ctx = rbt;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__DOS__)
|
||||
/* kind of DllMain() for Causeway DLL */
|
||||
int main (int eax) { return 0; }
|
||||
#endif
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/awk/awk.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/main.h>
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/awk/awk.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/time.h>
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright 2006-2012 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
|
||||
QSE is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
QSE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <qse/awk/awk.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/rbt.h>
|
||||
|
@ -42,7 +42,7 @@ WVList
|
||||
0
|
||||
10
|
||||
WPickList
|
||||
85
|
||||
87
|
||||
11
|
||||
MItem
|
||||
3
|
||||
@ -222,7 +222,7 @@ WVList
|
||||
51
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/dll.c
|
||||
../../../../../lib/cmn/dir.c
|
||||
52
|
||||
WString
|
||||
4
|
||||
@ -240,7 +240,7 @@ WVList
|
||||
55
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/env.c
|
||||
../../../../../lib/cmn/dll.c
|
||||
56
|
||||
WString
|
||||
4
|
||||
@ -258,7 +258,7 @@ WVList
|
||||
59
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fio.c
|
||||
../../../../../lib/cmn/env.c
|
||||
60
|
||||
WString
|
||||
4
|
||||
@ -276,7 +276,7 @@ WVList
|
||||
63
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fma.c
|
||||
../../../../../lib/cmn/fio.c
|
||||
64
|
||||
WString
|
||||
4
|
||||
@ -294,7 +294,7 @@ WVList
|
||||
67
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
../../../../../lib/cmn/fma.c
|
||||
68
|
||||
WString
|
||||
4
|
||||
@ -311,8 +311,8 @@ WVList
|
||||
0
|
||||
71
|
||||
MItem
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
72
|
||||
WString
|
||||
4
|
||||
@ -329,8 +329,8 @@ WVList
|
||||
0
|
||||
75
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
76
|
||||
WString
|
||||
4
|
||||
@ -347,8 +347,8 @@ WVList
|
||||
0
|
||||
79
|
||||
MItem
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
80
|
||||
WString
|
||||
4
|
||||
@ -365,8 +365,8 @@ WVList
|
||||
0
|
||||
83
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
84
|
||||
WString
|
||||
4
|
||||
@ -383,8 +383,8 @@ WVList
|
||||
0
|
||||
87
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
88
|
||||
WString
|
||||
4
|
||||
@ -401,8 +401,8 @@ WVList
|
||||
0
|
||||
91
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
92
|
||||
WString
|
||||
4
|
||||
@ -419,8 +419,8 @@ WVList
|
||||
0
|
||||
95
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/hton.c
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
96
|
||||
WString
|
||||
4
|
||||
@ -438,7 +438,7 @@ WVList
|
||||
99
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
../../../../../lib/cmn/hton.c
|
||||
100
|
||||
WString
|
||||
4
|
||||
@ -455,8 +455,8 @@ WVList
|
||||
0
|
||||
103
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
104
|
||||
WString
|
||||
4
|
||||
@ -473,8 +473,8 @@ WVList
|
||||
0
|
||||
107
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
108
|
||||
WString
|
||||
4
|
||||
@ -491,8 +491,8 @@ WVList
|
||||
0
|
||||
111
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
112
|
||||
WString
|
||||
4
|
||||
@ -509,8 +509,8 @@ WVList
|
||||
0
|
||||
115
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
116
|
||||
WString
|
||||
4
|
||||
@ -527,8 +527,8 @@ WVList
|
||||
0
|
||||
119
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
120
|
||||
WString
|
||||
4
|
||||
@ -545,8 +545,8 @@ WVList
|
||||
0
|
||||
123
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwad.c
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
124
|
||||
WString
|
||||
4
|
||||
@ -563,8 +563,8 @@ WVList
|
||||
0
|
||||
127
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
28
|
||||
../../../../../lib/cmn/mux.c
|
||||
128
|
||||
WString
|
||||
4
|
||||
@ -582,7 +582,7 @@ WVList
|
||||
131
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
../../../../../lib/cmn/nwad.c
|
||||
132
|
||||
WString
|
||||
4
|
||||
@ -599,8 +599,8 @@ WVList
|
||||
0
|
||||
135
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
136
|
||||
WString
|
||||
4
|
||||
@ -617,8 +617,8 @@ WVList
|
||||
0
|
||||
139
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
140
|
||||
WString
|
||||
4
|
||||
@ -635,8 +635,8 @@ WVList
|
||||
0
|
||||
143
|
||||
MItem
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
144
|
||||
WString
|
||||
4
|
||||
@ -653,8 +653,8 @@ WVList
|
||||
0
|
||||
147
|
||||
MItem
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
148
|
||||
WString
|
||||
4
|
||||
@ -671,8 +671,8 @@ WVList
|
||||
0
|
||||
151
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pio.c
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
152
|
||||
WString
|
||||
4
|
||||
@ -689,8 +689,8 @@ WVList
|
||||
0
|
||||
155
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pma.c
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
156
|
||||
WString
|
||||
4
|
||||
@ -708,7 +708,7 @@ WVList
|
||||
159
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rbt.c
|
||||
../../../../../lib/cmn/pio.c
|
||||
160
|
||||
WString
|
||||
4
|
||||
@ -726,7 +726,7 @@ WVList
|
||||
163
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rex.c
|
||||
../../../../../lib/cmn/pma.c
|
||||
164
|
||||
WString
|
||||
4
|
||||
@ -744,7 +744,7 @@ WVList
|
||||
167
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
../../../../../lib/cmn/rbt.c
|
||||
168
|
||||
WString
|
||||
4
|
||||
@ -762,7 +762,7 @@ WVList
|
||||
171
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
../../../../../lib/cmn/rex.c
|
||||
172
|
||||
WString
|
||||
4
|
||||
@ -779,8 +779,8 @@ WVList
|
||||
0
|
||||
175
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
176
|
||||
WString
|
||||
4
|
||||
@ -797,8 +797,8 @@ WVList
|
||||
0
|
||||
179
|
||||
MItem
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
180
|
||||
WString
|
||||
4
|
||||
@ -815,8 +815,8 @@ WVList
|
||||
0
|
||||
183
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
184
|
||||
WString
|
||||
4
|
||||
@ -833,8 +833,8 @@ WVList
|
||||
0
|
||||
187
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
188
|
||||
WString
|
||||
4
|
||||
@ -852,7 +852,7 @@ WVList
|
||||
191
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
192
|
||||
WString
|
||||
4
|
||||
@ -870,7 +870,7 @@ WVList
|
||||
195
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
196
|
||||
WString
|
||||
4
|
||||
@ -888,7 +888,7 @@ WVList
|
||||
199
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
200
|
||||
WString
|
||||
4
|
||||
@ -906,7 +906,7 @@ WVList
|
||||
203
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
204
|
||||
WString
|
||||
4
|
||||
@ -924,7 +924,7 @@ WVList
|
||||
207
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
208
|
||||
WString
|
||||
4
|
||||
@ -942,7 +942,7 @@ WVList
|
||||
211
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
212
|
||||
WString
|
||||
4
|
||||
@ -959,8 +959,8 @@ WVList
|
||||
0
|
||||
215
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
216
|
||||
WString
|
||||
4
|
||||
@ -977,8 +977,8 @@ WVList
|
||||
0
|
||||
219
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
220
|
||||
WString
|
||||
4
|
||||
@ -995,8 +995,8 @@ WVList
|
||||
0
|
||||
223
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
224
|
||||
WString
|
||||
4
|
||||
@ -1014,7 +1014,7 @@ WVList
|
||||
227
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
228
|
||||
WString
|
||||
4
|
||||
@ -1031,8 +1031,8 @@ WVList
|
||||
0
|
||||
231
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
232
|
||||
WString
|
||||
4
|
||||
@ -1049,8 +1049,8 @@ WVList
|
||||
0
|
||||
235
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
236
|
||||
WString
|
||||
4
|
||||
@ -1068,7 +1068,7 @@ WVList
|
||||
239
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
240
|
||||
WString
|
||||
4
|
||||
@ -1085,8 +1085,8 @@ WVList
|
||||
0
|
||||
243
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
244
|
||||
WString
|
||||
4
|
||||
@ -1103,8 +1103,8 @@ WVList
|
||||
0
|
||||
247
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
248
|
||||
WString
|
||||
4
|
||||
@ -1121,8 +1121,8 @@ WVList
|
||||
0
|
||||
251
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
252
|
||||
WString
|
||||
4
|
||||
@ -1140,7 +1140,7 @@ WVList
|
||||
255
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-put.c
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
256
|
||||
WString
|
||||
4
|
||||
@ -1157,8 +1157,8 @@ WVList
|
||||
0
|
||||
259
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
260
|
||||
WString
|
||||
4
|
||||
@ -1176,7 +1176,7 @@ WVList
|
||||
263
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
../../../../../lib/cmn/str-put.c
|
||||
264
|
||||
WString
|
||||
4
|
||||
@ -1194,7 +1194,7 @@ WVList
|
||||
267
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-set.c
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
268
|
||||
WString
|
||||
4
|
||||
@ -1212,7 +1212,7 @@ WVList
|
||||
271
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
272
|
||||
WString
|
||||
4
|
||||
@ -1230,7 +1230,7 @@ WVList
|
||||
275
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
../../../../../lib/cmn/str-set.c
|
||||
276
|
||||
WString
|
||||
4
|
||||
@ -1248,7 +1248,7 @@ WVList
|
||||
279
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-str.c
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
280
|
||||
WString
|
||||
4
|
||||
@ -1265,8 +1265,8 @@ WVList
|
||||
0
|
||||
283
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
284
|
||||
WString
|
||||
4
|
||||
@ -1284,7 +1284,7 @@ WVList
|
||||
287
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
../../../../../lib/cmn/str-str.c
|
||||
288
|
||||
WString
|
||||
4
|
||||
@ -1301,8 +1301,8 @@ WVList
|
||||
0
|
||||
291
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
292
|
||||
WString
|
||||
4
|
||||
@ -1319,8 +1319,8 @@ WVList
|
||||
0
|
||||
295
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
296
|
||||
WString
|
||||
4
|
||||
@ -1337,8 +1337,8 @@ WVList
|
||||
0
|
||||
299
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
300
|
||||
WString
|
||||
4
|
||||
@ -1355,8 +1355,8 @@ WVList
|
||||
0
|
||||
303
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
304
|
||||
WString
|
||||
4
|
||||
@ -1373,8 +1373,8 @@ WVList
|
||||
0
|
||||
307
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
308
|
||||
WString
|
||||
4
|
||||
@ -1391,8 +1391,8 @@ WVList
|
||||
0
|
||||
311
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
312
|
||||
WString
|
||||
4
|
||||
@ -1409,8 +1409,8 @@ WVList
|
||||
0
|
||||
315
|
||||
MItem
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
316
|
||||
WString
|
||||
4
|
||||
@ -1427,8 +1427,8 @@ WVList
|
||||
0
|
||||
319
|
||||
MItem
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
320
|
||||
WString
|
||||
4
|
||||
@ -1445,8 +1445,8 @@ WVList
|
||||
0
|
||||
323
|
||||
MItem
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
324
|
||||
WString
|
||||
4
|
||||
@ -1463,8 +1463,8 @@ WVList
|
||||
0
|
||||
327
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
328
|
||||
WString
|
||||
4
|
||||
@ -1481,8 +1481,8 @@ WVList
|
||||
0
|
||||
331
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
332
|
||||
WString
|
||||
4
|
||||
@ -1499,8 +1499,8 @@ WVList
|
||||
0
|
||||
335
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tre.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
336
|
||||
WString
|
||||
4
|
||||
@ -1517,8 +1517,8 @@ WVList
|
||||
0
|
||||
339
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
340
|
||||
WString
|
||||
4
|
||||
@ -1536,7 +1536,7 @@ WVList
|
||||
343
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/xma.c
|
||||
../../../../../lib/cmn/tre.c
|
||||
344
|
||||
WString
|
||||
4
|
||||
@ -1553,44 +1553,44 @@ WVList
|
||||
0
|
||||
347
|
||||
MItem
|
||||
3
|
||||
*.h
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
348
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
349
|
||||
WVList
|
||||
0
|
||||
350
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
351
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
../../../../../lib/cmn/xma.c
|
||||
352
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
353
|
||||
WVList
|
||||
0
|
||||
354
|
||||
WVList
|
||||
0
|
||||
347
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
355
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
3
|
||||
*.h
|
||||
356
|
||||
WString
|
||||
3
|
||||
@ -1601,7 +1601,43 @@ WVList
|
||||
358
|
||||
WVList
|
||||
0
|
||||
347
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
359
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
360
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
361
|
||||
WVList
|
||||
0
|
||||
362
|
||||
WVList
|
||||
0
|
||||
355
|
||||
1
|
||||
1
|
||||
0
|
||||
363
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
364
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
365
|
||||
WVList
|
||||
0
|
||||
366
|
||||
WVList
|
||||
0
|
||||
355
|
||||
1
|
||||
1
|
||||
0
|
||||
|
185
qse/watcom/debug/dos32/mod/awk/awk-dir.tgt
Executable file
185
qse/watcom/debug/dos32/mod/awk/awk-dir.tgt
Executable file
@ -0,0 +1,185 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
5
|
||||
CWDLL
|
||||
3
|
||||
WString
|
||||
5
|
||||
dx2do
|
||||
1
|
||||
0
|
||||
1
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
0
|
||||
6
|
||||
MItem
|
||||
11
|
||||
awk-dir.dll
|
||||
7
|
||||
WString
|
||||
5
|
||||
CWDLL
|
||||
8
|
||||
WVList
|
||||
4
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
11
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
12
|
||||
WString
|
||||
27
|
||||
../../lib/cmn ../../lib/awk
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
15
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
16
|
||||
WString
|
||||
13
|
||||
qsecmn qseawk
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
19
|
||||
WString
|
||||
21
|
||||
dx???Export names(,):
|
||||
1
|
||||
20
|
||||
WString
|
||||
5
|
||||
load_
|
||||
0
|
||||
21
|
||||
MCState
|
||||
22
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
23
|
||||
WString
|
||||
24
|
||||
?????Eliminate dead code
|
||||
1
|
||||
1
|
||||
24
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
25
|
||||
WPickList
|
||||
2
|
||||
26
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
27
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
28
|
||||
WVList
|
||||
3
|
||||
29
|
||||
MVState
|
||||
30
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
31
|
||||
WString
|
||||
25
|
||||
d????Include directories:
|
||||
1
|
||||
32
|
||||
WString
|
||||
37
|
||||
"$(%watcom)/h;../../../../../include"
|
||||
0
|
||||
33
|
||||
MVState
|
||||
34
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
35
|
||||
WString
|
||||
23
|
||||
?????Macro definitions:
|
||||
1
|
||||
36
|
||||
WString
|
||||
15
|
||||
QSE_BUILD_DEBUG
|
||||
0
|
||||
37
|
||||
MCState
|
||||
38
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
39
|
||||
WString
|
||||
33
|
||||
?????Disable stack depth checking
|
||||
1
|
||||
1
|
||||
40
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
41
|
||||
MItem
|
||||
28
|
||||
../../../../../mod/awk/dir.c
|
||||
42
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
43
|
||||
WVList
|
||||
0
|
||||
44
|
||||
WVList
|
||||
0
|
||||
26
|
||||
1
|
||||
1
|
||||
0
|
@ -42,7 +42,7 @@ WVList
|
||||
0
|
||||
10
|
||||
WPickList
|
||||
85
|
||||
87
|
||||
11
|
||||
MItem
|
||||
3
|
||||
@ -234,7 +234,7 @@ WVList
|
||||
54
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/dll.c
|
||||
../../../../../lib/cmn/dir.c
|
||||
55
|
||||
WString
|
||||
4
|
||||
@ -252,7 +252,7 @@ WVList
|
||||
58
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/env.c
|
||||
../../../../../lib/cmn/dll.c
|
||||
59
|
||||
WString
|
||||
4
|
||||
@ -270,7 +270,7 @@ WVList
|
||||
62
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fio.c
|
||||
../../../../../lib/cmn/env.c
|
||||
63
|
||||
WString
|
||||
4
|
||||
@ -288,7 +288,7 @@ WVList
|
||||
66
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fma.c
|
||||
../../../../../lib/cmn/fio.c
|
||||
67
|
||||
WString
|
||||
4
|
||||
@ -306,7 +306,7 @@ WVList
|
||||
70
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
../../../../../lib/cmn/fma.c
|
||||
71
|
||||
WString
|
||||
4
|
||||
@ -323,8 +323,8 @@ WVList
|
||||
0
|
||||
74
|
||||
MItem
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
75
|
||||
WString
|
||||
4
|
||||
@ -341,8 +341,8 @@ WVList
|
||||
0
|
||||
78
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
79
|
||||
WString
|
||||
4
|
||||
@ -359,8 +359,8 @@ WVList
|
||||
0
|
||||
82
|
||||
MItem
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
83
|
||||
WString
|
||||
4
|
||||
@ -377,8 +377,8 @@ WVList
|
||||
0
|
||||
86
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
87
|
||||
WString
|
||||
4
|
||||
@ -395,8 +395,8 @@ WVList
|
||||
0
|
||||
90
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
91
|
||||
WString
|
||||
4
|
||||
@ -413,8 +413,8 @@ WVList
|
||||
0
|
||||
94
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
95
|
||||
WString
|
||||
4
|
||||
@ -431,8 +431,8 @@ WVList
|
||||
0
|
||||
98
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/hton.c
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
99
|
||||
WString
|
||||
4
|
||||
@ -450,7 +450,7 @@ WVList
|
||||
102
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
../../../../../lib/cmn/hton.c
|
||||
103
|
||||
WString
|
||||
4
|
||||
@ -467,8 +467,8 @@ WVList
|
||||
0
|
||||
106
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
107
|
||||
WString
|
||||
4
|
||||
@ -485,8 +485,8 @@ WVList
|
||||
0
|
||||
110
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
111
|
||||
WString
|
||||
4
|
||||
@ -503,8 +503,8 @@ WVList
|
||||
0
|
||||
114
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
115
|
||||
WString
|
||||
4
|
||||
@ -521,8 +521,8 @@ WVList
|
||||
0
|
||||
118
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
119
|
||||
WString
|
||||
4
|
||||
@ -539,8 +539,8 @@ WVList
|
||||
0
|
||||
122
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
123
|
||||
WString
|
||||
4
|
||||
@ -557,8 +557,8 @@ WVList
|
||||
0
|
||||
126
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwad.c
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
127
|
||||
WString
|
||||
4
|
||||
@ -575,8 +575,8 @@ WVList
|
||||
0
|
||||
130
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
28
|
||||
../../../../../lib/cmn/mux.c
|
||||
131
|
||||
WString
|
||||
4
|
||||
@ -594,7 +594,7 @@ WVList
|
||||
134
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
../../../../../lib/cmn/nwad.c
|
||||
135
|
||||
WString
|
||||
4
|
||||
@ -611,8 +611,8 @@ WVList
|
||||
0
|
||||
138
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
139
|
||||
WString
|
||||
4
|
||||
@ -629,8 +629,8 @@ WVList
|
||||
0
|
||||
142
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
143
|
||||
WString
|
||||
4
|
||||
@ -647,8 +647,8 @@ WVList
|
||||
0
|
||||
146
|
||||
MItem
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
147
|
||||
WString
|
||||
4
|
||||
@ -665,8 +665,8 @@ WVList
|
||||
0
|
||||
150
|
||||
MItem
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
151
|
||||
WString
|
||||
4
|
||||
@ -683,8 +683,8 @@ WVList
|
||||
0
|
||||
154
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pio.c
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
155
|
||||
WString
|
||||
4
|
||||
@ -701,8 +701,8 @@ WVList
|
||||
0
|
||||
158
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pma.c
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
159
|
||||
WString
|
||||
4
|
||||
@ -720,7 +720,7 @@ WVList
|
||||
162
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rbt.c
|
||||
../../../../../lib/cmn/pio.c
|
||||
163
|
||||
WString
|
||||
4
|
||||
@ -738,7 +738,7 @@ WVList
|
||||
166
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rex.c
|
||||
../../../../../lib/cmn/pma.c
|
||||
167
|
||||
WString
|
||||
4
|
||||
@ -756,7 +756,7 @@ WVList
|
||||
170
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
../../../../../lib/cmn/rbt.c
|
||||
171
|
||||
WString
|
||||
4
|
||||
@ -774,7 +774,7 @@ WVList
|
||||
174
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
../../../../../lib/cmn/rex.c
|
||||
175
|
||||
WString
|
||||
4
|
||||
@ -791,8 +791,8 @@ WVList
|
||||
0
|
||||
178
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
179
|
||||
WString
|
||||
4
|
||||
@ -809,8 +809,8 @@ WVList
|
||||
0
|
||||
182
|
||||
MItem
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
183
|
||||
WString
|
||||
4
|
||||
@ -827,8 +827,8 @@ WVList
|
||||
0
|
||||
186
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
187
|
||||
WString
|
||||
4
|
||||
@ -845,8 +845,8 @@ WVList
|
||||
0
|
||||
190
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
191
|
||||
WString
|
||||
4
|
||||
@ -864,7 +864,7 @@ WVList
|
||||
194
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
195
|
||||
WString
|
||||
4
|
||||
@ -882,7 +882,7 @@ WVList
|
||||
198
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
199
|
||||
WString
|
||||
4
|
||||
@ -900,7 +900,7 @@ WVList
|
||||
202
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
203
|
||||
WString
|
||||
4
|
||||
@ -918,7 +918,7 @@ WVList
|
||||
206
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
207
|
||||
WString
|
||||
4
|
||||
@ -936,7 +936,7 @@ WVList
|
||||
210
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
211
|
||||
WString
|
||||
4
|
||||
@ -954,7 +954,7 @@ WVList
|
||||
214
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
215
|
||||
WString
|
||||
4
|
||||
@ -971,8 +971,8 @@ WVList
|
||||
0
|
||||
218
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
219
|
||||
WString
|
||||
4
|
||||
@ -989,8 +989,8 @@ WVList
|
||||
0
|
||||
222
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
223
|
||||
WString
|
||||
4
|
||||
@ -1007,8 +1007,8 @@ WVList
|
||||
0
|
||||
226
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
227
|
||||
WString
|
||||
4
|
||||
@ -1026,7 +1026,7 @@ WVList
|
||||
230
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
231
|
||||
WString
|
||||
4
|
||||
@ -1043,8 +1043,8 @@ WVList
|
||||
0
|
||||
234
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
235
|
||||
WString
|
||||
4
|
||||
@ -1061,8 +1061,8 @@ WVList
|
||||
0
|
||||
238
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
239
|
||||
WString
|
||||
4
|
||||
@ -1080,7 +1080,7 @@ WVList
|
||||
242
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
243
|
||||
WString
|
||||
4
|
||||
@ -1097,8 +1097,8 @@ WVList
|
||||
0
|
||||
246
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
247
|
||||
WString
|
||||
4
|
||||
@ -1115,8 +1115,8 @@ WVList
|
||||
0
|
||||
250
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
251
|
||||
WString
|
||||
4
|
||||
@ -1133,8 +1133,8 @@ WVList
|
||||
0
|
||||
254
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
255
|
||||
WString
|
||||
4
|
||||
@ -1152,7 +1152,7 @@ WVList
|
||||
258
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-put.c
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
259
|
||||
WString
|
||||
4
|
||||
@ -1169,8 +1169,8 @@ WVList
|
||||
0
|
||||
262
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
263
|
||||
WString
|
||||
4
|
||||
@ -1188,7 +1188,7 @@ WVList
|
||||
266
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
../../../../../lib/cmn/str-put.c
|
||||
267
|
||||
WString
|
||||
4
|
||||
@ -1206,7 +1206,7 @@ WVList
|
||||
270
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-set.c
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
271
|
||||
WString
|
||||
4
|
||||
@ -1224,7 +1224,7 @@ WVList
|
||||
274
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
275
|
||||
WString
|
||||
4
|
||||
@ -1242,7 +1242,7 @@ WVList
|
||||
278
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
../../../../../lib/cmn/str-set.c
|
||||
279
|
||||
WString
|
||||
4
|
||||
@ -1260,7 +1260,7 @@ WVList
|
||||
282
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-str.c
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
283
|
||||
WString
|
||||
4
|
||||
@ -1277,8 +1277,8 @@ WVList
|
||||
0
|
||||
286
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
287
|
||||
WString
|
||||
4
|
||||
@ -1296,7 +1296,7 @@ WVList
|
||||
290
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
../../../../../lib/cmn/str-str.c
|
||||
291
|
||||
WString
|
||||
4
|
||||
@ -1313,8 +1313,8 @@ WVList
|
||||
0
|
||||
294
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
295
|
||||
WString
|
||||
4
|
||||
@ -1331,8 +1331,8 @@ WVList
|
||||
0
|
||||
298
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
299
|
||||
WString
|
||||
4
|
||||
@ -1349,8 +1349,8 @@ WVList
|
||||
0
|
||||
302
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
303
|
||||
WString
|
||||
4
|
||||
@ -1367,8 +1367,8 @@ WVList
|
||||
0
|
||||
306
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
307
|
||||
WString
|
||||
4
|
||||
@ -1385,8 +1385,8 @@ WVList
|
||||
0
|
||||
310
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
311
|
||||
WString
|
||||
4
|
||||
@ -1403,8 +1403,8 @@ WVList
|
||||
0
|
||||
314
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
315
|
||||
WString
|
||||
4
|
||||
@ -1421,8 +1421,8 @@ WVList
|
||||
0
|
||||
318
|
||||
MItem
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
319
|
||||
WString
|
||||
4
|
||||
@ -1439,8 +1439,8 @@ WVList
|
||||
0
|
||||
322
|
||||
MItem
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
323
|
||||
WString
|
||||
4
|
||||
@ -1457,8 +1457,8 @@ WVList
|
||||
0
|
||||
326
|
||||
MItem
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
327
|
||||
WString
|
||||
4
|
||||
@ -1475,8 +1475,8 @@ WVList
|
||||
0
|
||||
330
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
331
|
||||
WString
|
||||
4
|
||||
@ -1493,8 +1493,8 @@ WVList
|
||||
0
|
||||
334
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
335
|
||||
WString
|
||||
4
|
||||
@ -1511,8 +1511,8 @@ WVList
|
||||
0
|
||||
338
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tre.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
339
|
||||
WString
|
||||
4
|
||||
@ -1529,8 +1529,8 @@ WVList
|
||||
0
|
||||
342
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
343
|
||||
WString
|
||||
4
|
||||
@ -1548,7 +1548,7 @@ WVList
|
||||
346
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/xma.c
|
||||
../../../../../lib/cmn/tre.c
|
||||
347
|
||||
WString
|
||||
4
|
||||
@ -1565,44 +1565,44 @@ WVList
|
||||
0
|
||||
350
|
||||
MItem
|
||||
3
|
||||
*.h
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
351
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
352
|
||||
WVList
|
||||
0
|
||||
353
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
354
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
../../../../../lib/cmn/xma.c
|
||||
355
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
356
|
||||
WVList
|
||||
0
|
||||
357
|
||||
WVList
|
||||
0
|
||||
350
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
358
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
3
|
||||
*.h
|
||||
359
|
||||
WString
|
||||
3
|
||||
@ -1613,7 +1613,43 @@ WVList
|
||||
361
|
||||
WVList
|
||||
0
|
||||
350
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
362
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
363
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
364
|
||||
WVList
|
||||
0
|
||||
365
|
||||
WVList
|
||||
0
|
||||
358
|
||||
1
|
||||
1
|
||||
0
|
||||
366
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
367
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
368
|
||||
WVList
|
||||
0
|
||||
369
|
||||
WVList
|
||||
0
|
||||
358
|
||||
1
|
||||
1
|
||||
0
|
||||
|
185
qse/watcom/debug/os2/mod/awk/awk-dir.tgt
Executable file
185
qse/watcom/debug/os2/mod/awk/awk-dir.tgt
Executable file
@ -0,0 +1,185 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
ODLL
|
||||
3
|
||||
WString
|
||||
5
|
||||
o_2do
|
||||
1
|
||||
0
|
||||
1
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
0
|
||||
6
|
||||
MItem
|
||||
11
|
||||
awk-dir.dll
|
||||
7
|
||||
WString
|
||||
4
|
||||
ODLL
|
||||
8
|
||||
WVList
|
||||
4
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
11
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
12
|
||||
WString
|
||||
27
|
||||
../../lib/cmn ../../lib/awk
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
15
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
16
|
||||
WString
|
||||
13
|
||||
qsecmn qseawk
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
19
|
||||
WString
|
||||
21
|
||||
o????Export names(,):
|
||||
1
|
||||
20
|
||||
WString
|
||||
5
|
||||
load_
|
||||
0
|
||||
21
|
||||
MCState
|
||||
22
|
||||
WString
|
||||
5
|
||||
WLINK
|
||||
23
|
||||
WString
|
||||
24
|
||||
?????Eliminate dead code
|
||||
1
|
||||
1
|
||||
24
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
25
|
||||
WPickList
|
||||
2
|
||||
26
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
27
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
28
|
||||
WVList
|
||||
3
|
||||
29
|
||||
MVState
|
||||
30
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
31
|
||||
WString
|
||||
25
|
||||
o?2??Include directories:
|
||||
1
|
||||
32
|
||||
WString
|
||||
54
|
||||
"$(%watcom)/h;$(%watcom)/h/os2;../../../../../include"
|
||||
0
|
||||
33
|
||||
MVState
|
||||
34
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
35
|
||||
WString
|
||||
23
|
||||
?????Macro definitions:
|
||||
1
|
||||
36
|
||||
WString
|
||||
15
|
||||
QSE_BUILD_DEBUG
|
||||
0
|
||||
37
|
||||
MCState
|
||||
38
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
39
|
||||
WString
|
||||
33
|
||||
?????Disable stack depth checking
|
||||
1
|
||||
1
|
||||
40
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
41
|
||||
MItem
|
||||
28
|
||||
../../../../../mod/awk/dir.c
|
||||
42
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
43
|
||||
WVList
|
||||
0
|
||||
44
|
||||
WVList
|
||||
0
|
||||
26
|
||||
1
|
||||
1
|
||||
0
|
@ -113,7 +113,7 @@ WString
|
||||
COBJ
|
||||
28
|
||||
WVList
|
||||
1
|
||||
3
|
||||
29
|
||||
MVState
|
||||
30
|
||||
@ -131,24 +131,52 @@ WString
|
||||
"$(%watcom)/h;$(%watcom)/h/os2;../../../../../include"
|
||||
0
|
||||
33
|
||||
MVState
|
||||
34
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
35
|
||||
WString
|
||||
23
|
||||
?????Macro definitions:
|
||||
1
|
||||
36
|
||||
WString
|
||||
15
|
||||
QSE_BUILD_DEBUG
|
||||
0
|
||||
37
|
||||
MCState
|
||||
38
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
39
|
||||
WString
|
||||
33
|
||||
?????Disable stack depth checking
|
||||
1
|
||||
1
|
||||
40
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
34
|
||||
41
|
||||
MItem
|
||||
28
|
||||
../../../../../mod/awk/sys.c
|
||||
35
|
||||
42
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
36
|
||||
43
|
||||
WVList
|
||||
0
|
||||
37
|
||||
44
|
||||
WVList
|
||||
0
|
||||
26
|
||||
|
@ -4,8 +4,8 @@ projectIdent
|
||||
VpeMain
|
||||
1
|
||||
WRect
|
||||
520
|
||||
120
|
||||
530
|
||||
106
|
||||
9320
|
||||
9680
|
||||
2
|
||||
@ -16,7 +16,7 @@ MCommand
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
15
|
||||
17
|
||||
5
|
||||
WFileName
|
||||
30
|
||||
@ -78,11 +78,19 @@ WFileName
|
||||
29
|
||||
debug/os2/mod/awk/awk-sys.tgt
|
||||
20
|
||||
WVList
|
||||
15
|
||||
WFileName
|
||||
29
|
||||
debug/os2/mod/awk/awk-dir.tgt
|
||||
21
|
||||
VComponent
|
||||
WFileName
|
||||
31
|
||||
debug/dos32/mod/awk/awk-dir.tgt
|
||||
22
|
||||
WVList
|
||||
17
|
||||
23
|
||||
VComponent
|
||||
24
|
||||
WRect
|
||||
1070
|
||||
2520
|
||||
@ -90,15 +98,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
23
|
||||
25
|
||||
WFileName
|
||||
30
|
||||
release/os2/lib/cmn/qsecmn.tgt
|
||||
0
|
||||
5
|
||||
24
|
||||
26
|
||||
VComponent
|
||||
25
|
||||
27
|
||||
WRect
|
||||
90
|
||||
1240
|
||||
@ -106,15 +114,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
26
|
||||
28
|
||||
WFileName
|
||||
30
|
||||
release/os2/lib/sed/qsesed.tgt
|
||||
0
|
||||
0
|
||||
27
|
||||
29
|
||||
VComponent
|
||||
28
|
||||
30
|
||||
WRect
|
||||
2100
|
||||
1400
|
||||
@ -122,31 +130,31 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
29
|
||||
31
|
||||
WFileName
|
||||
30
|
||||
release/os2/cmd/sed/qsesed.tgt
|
||||
0
|
||||
1
|
||||
30
|
||||
32
|
||||
VComponent
|
||||
31
|
||||
33
|
||||
WRect
|
||||
780
|
||||
480
|
||||
2830
|
||||
346
|
||||
5700
|
||||
4240
|
||||
1
|
||||
0
|
||||
32
|
||||
34
|
||||
WFileName
|
||||
28
|
||||
debug/os2/lib/cmn/qsecmn.tgt
|
||||
45
|
||||
48
|
||||
33
|
||||
0
|
||||
22
|
||||
35
|
||||
VComponent
|
||||
34
|
||||
36
|
||||
WRect
|
||||
1050
|
||||
2360
|
||||
@ -154,31 +162,31 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
35
|
||||
37
|
||||
WFileName
|
||||
28
|
||||
debug/os2/lib/sed/qsesed.tgt
|
||||
0
|
||||
3
|
||||
36
|
||||
38
|
||||
VComponent
|
||||
37
|
||||
39
|
||||
WRect
|
||||
420
|
||||
333
|
||||
320
|
||||
5700
|
||||
4240
|
||||
1
|
||||
0
|
||||
38
|
||||
40
|
||||
WFileName
|
||||
28
|
||||
debug/os2/lib/awk/qseawk.tgt
|
||||
0
|
||||
0
|
||||
39
|
||||
41
|
||||
VComponent
|
||||
40
|
||||
42
|
||||
WRect
|
||||
330
|
||||
400
|
||||
@ -186,47 +194,47 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
41
|
||||
43
|
||||
WFileName
|
||||
28
|
||||
debug/os2/cmd/awk/qseawk.tgt
|
||||
0
|
||||
1
|
||||
42
|
||||
44
|
||||
VComponent
|
||||
43
|
||||
45
|
||||
WRect
|
||||
2670
|
||||
40
|
||||
5700
|
||||
4240
|
||||
1
|
||||
0
|
||||
44
|
||||
0
|
||||
46
|
||||
WFileName
|
||||
30
|
||||
debug/dos32/lib/cmn/qsecmn.tgt
|
||||
0
|
||||
0
|
||||
45
|
||||
2
|
||||
47
|
||||
VComponent
|
||||
46
|
||||
48
|
||||
WRect
|
||||
1620
|
||||
1360
|
||||
5700
|
||||
4240
|
||||
1
|
||||
0
|
||||
47
|
||||
0
|
||||
49
|
||||
WFileName
|
||||
30
|
||||
debug/dos32/lib/awk/qseawk.tgt
|
||||
0
|
||||
0
|
||||
48
|
||||
50
|
||||
VComponent
|
||||
49
|
||||
51
|
||||
WRect
|
||||
0
|
||||
200
|
||||
@ -234,15 +242,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
50
|
||||
52
|
||||
WFileName
|
||||
30
|
||||
debug/dos32/cmd/awk/qseawk.tgt
|
||||
0
|
||||
0
|
||||
51
|
||||
53
|
||||
VComponent
|
||||
52
|
||||
54
|
||||
WRect
|
||||
0
|
||||
0
|
||||
@ -250,15 +258,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
53
|
||||
55
|
||||
WFileName
|
||||
30
|
||||
debug/dos32/lib/sed/qsesed.tgt
|
||||
0
|
||||
5
|
||||
54
|
||||
56
|
||||
VComponent
|
||||
55
|
||||
57
|
||||
WRect
|
||||
580
|
||||
560
|
||||
@ -266,15 +274,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
56
|
||||
58
|
||||
WFileName
|
||||
30
|
||||
debug/dos32/cmd/sed/qsesed.tgt
|
||||
0
|
||||
1
|
||||
57
|
||||
59
|
||||
VComponent
|
||||
58
|
||||
60
|
||||
WRect
|
||||
0
|
||||
0
|
||||
@ -282,15 +290,15 @@ WRect
|
||||
4240
|
||||
1
|
||||
0
|
||||
59
|
||||
61
|
||||
WFileName
|
||||
28
|
||||
debug/os2/cmd/sed/qsesed.tgt
|
||||
0
|
||||
1
|
||||
60
|
||||
62
|
||||
VComponent
|
||||
61
|
||||
63
|
||||
WRect
|
||||
2610
|
||||
1080
|
||||
@ -298,26 +306,58 @@ WRect
|
||||
4240
|
||||
0
|
||||
0
|
||||
62
|
||||
64
|
||||
WFileName
|
||||
31
|
||||
debug/dos32/mod/awk/awk-sys.tgt
|
||||
0
|
||||
0
|
||||
63
|
||||
65
|
||||
VComponent
|
||||
64
|
||||
66
|
||||
WRect
|
||||
290
|
||||
280
|
||||
1140
|
||||
226
|
||||
5700
|
||||
4240
|
||||
1
|
||||
0
|
||||
0
|
||||
65
|
||||
67
|
||||
WFileName
|
||||
29
|
||||
debug/os2/mod/awk/awk-sys.tgt
|
||||
0
|
||||
0
|
||||
63
|
||||
68
|
||||
VComponent
|
||||
69
|
||||
WRect
|
||||
470
|
||||
3066
|
||||
5700
|
||||
4253
|
||||
1
|
||||
0
|
||||
70
|
||||
WFileName
|
||||
29
|
||||
debug/os2/mod/awk/awk-dir.tgt
|
||||
0
|
||||
1
|
||||
71
|
||||
VComponent
|
||||
72
|
||||
WRect
|
||||
580
|
||||
573
|
||||
5700
|
||||
4253
|
||||
0
|
||||
0
|
||||
73
|
||||
WFileName
|
||||
31
|
||||
debug/dos32/mod/awk/awk-dir.tgt
|
||||
0
|
||||
0
|
||||
71
|
||||
|
@ -42,7 +42,7 @@ WVList
|
||||
0
|
||||
10
|
||||
WPickList
|
||||
83
|
||||
85
|
||||
11
|
||||
MItem
|
||||
3
|
||||
@ -270,7 +270,7 @@ WVList
|
||||
63
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/dll.c
|
||||
../../../../../lib/cmn/dir.c
|
||||
64
|
||||
WString
|
||||
4
|
||||
@ -288,7 +288,7 @@ WVList
|
||||
67
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fio.c
|
||||
../../../../../lib/cmn/dll.c
|
||||
68
|
||||
WString
|
||||
4
|
||||
@ -306,7 +306,7 @@ WVList
|
||||
71
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fma.c
|
||||
../../../../../lib/cmn/fio.c
|
||||
72
|
||||
WString
|
||||
4
|
||||
@ -324,7 +324,7 @@ WVList
|
||||
75
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
../../../../../lib/cmn/fma.c
|
||||
76
|
||||
WString
|
||||
4
|
||||
@ -341,8 +341,8 @@ WVList
|
||||
0
|
||||
79
|
||||
MItem
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
28
|
||||
../../../../../lib/cmn/fmt.c
|
||||
80
|
||||
WString
|
||||
4
|
||||
@ -359,8 +359,8 @@ WVList
|
||||
0
|
||||
83
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
31
|
||||
../../../../../lib/cmn/fs-err.c
|
||||
84
|
||||
WString
|
||||
4
|
||||
@ -377,8 +377,8 @@ WVList
|
||||
0
|
||||
87
|
||||
MItem
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
32
|
||||
../../../../../lib/cmn/fs-move.c
|
||||
88
|
||||
WString
|
||||
4
|
||||
@ -395,8 +395,8 @@ WVList
|
||||
0
|
||||
91
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
27
|
||||
../../../../../lib/cmn/fs.c
|
||||
92
|
||||
WString
|
||||
4
|
||||
@ -413,8 +413,8 @@ WVList
|
||||
0
|
||||
95
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
28
|
||||
../../../../../lib/cmn/gdl.c
|
||||
96
|
||||
WString
|
||||
4
|
||||
@ -431,8 +431,8 @@ WVList
|
||||
0
|
||||
99
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
29
|
||||
../../../../../lib/cmn/glob.c
|
||||
100
|
||||
WString
|
||||
4
|
||||
@ -449,8 +449,8 @@ WVList
|
||||
0
|
||||
103
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
28
|
||||
../../../../../lib/cmn/htb.c
|
||||
104
|
||||
WString
|
||||
4
|
||||
@ -467,8 +467,8 @@ WVList
|
||||
0
|
||||
107
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
29
|
||||
../../../../../lib/cmn/ipad.c
|
||||
108
|
||||
WString
|
||||
4
|
||||
@ -485,8 +485,8 @@ WVList
|
||||
0
|
||||
111
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
28
|
||||
../../../../../lib/cmn/lda.c
|
||||
112
|
||||
WString
|
||||
4
|
||||
@ -503,8 +503,8 @@ WVList
|
||||
0
|
||||
115
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
29
|
||||
../../../../../lib/cmn/main.c
|
||||
116
|
||||
WString
|
||||
4
|
||||
@ -521,8 +521,8 @@ WVList
|
||||
0
|
||||
119
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
33
|
||||
../../../../../lib/cmn/mbwc-str.c
|
||||
120
|
||||
WString
|
||||
4
|
||||
@ -539,8 +539,8 @@ WVList
|
||||
0
|
||||
123
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
29
|
||||
../../../../../lib/cmn/mbwc.c
|
||||
124
|
||||
WString
|
||||
4
|
||||
@ -557,8 +557,8 @@ WVList
|
||||
0
|
||||
127
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwad.c
|
||||
28
|
||||
../../../../../lib/cmn/mem.c
|
||||
128
|
||||
WString
|
||||
4
|
||||
@ -575,8 +575,8 @@ WVList
|
||||
0
|
||||
131
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
28
|
||||
../../../../../lib/cmn/mux.c
|
||||
132
|
||||
WString
|
||||
4
|
||||
@ -594,7 +594,7 @@ WVList
|
||||
135
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
../../../../../lib/cmn/nwad.c
|
||||
136
|
||||
WString
|
||||
4
|
||||
@ -611,8 +611,8 @@ WVList
|
||||
0
|
||||
139
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
29
|
||||
../../../../../lib/cmn/nwif.c
|
||||
140
|
||||
WString
|
||||
4
|
||||
@ -629,8 +629,8 @@ WVList
|
||||
0
|
||||
143
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
29
|
||||
../../../../../lib/cmn/nwio.c
|
||||
144
|
||||
WString
|
||||
4
|
||||
@ -647,8 +647,8 @@ WVList
|
||||
0
|
||||
147
|
||||
MItem
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
28
|
||||
../../../../../lib/cmn/oht.c
|
||||
148
|
||||
WString
|
||||
4
|
||||
@ -665,8 +665,8 @@ WVList
|
||||
0
|
||||
151
|
||||
MItem
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
28
|
||||
../../../../../lib/cmn/opt.c
|
||||
152
|
||||
WString
|
||||
4
|
||||
@ -683,8 +683,8 @@ WVList
|
||||
0
|
||||
155
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pio.c
|
||||
38
|
||||
../../../../../lib/cmn/path-basename.c
|
||||
156
|
||||
WString
|
||||
4
|
||||
@ -701,8 +701,8 @@ WVList
|
||||
0
|
||||
159
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/pma.c
|
||||
35
|
||||
../../../../../lib/cmn/path-canon.c
|
||||
160
|
||||
WString
|
||||
4
|
||||
@ -720,7 +720,7 @@ WVList
|
||||
163
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rbt.c
|
||||
../../../../../lib/cmn/pio.c
|
||||
164
|
||||
WString
|
||||
4
|
||||
@ -738,7 +738,7 @@ WVList
|
||||
167
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/rex.c
|
||||
../../../../../lib/cmn/pma.c
|
||||
168
|
||||
WString
|
||||
4
|
||||
@ -756,7 +756,7 @@ WVList
|
||||
171
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
../../../../../lib/cmn/rbt.c
|
||||
172
|
||||
WString
|
||||
4
|
||||
@ -774,7 +774,7 @@ WVList
|
||||
175
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
../../../../../lib/cmn/rex.c
|
||||
176
|
||||
WString
|
||||
4
|
||||
@ -791,8 +791,8 @@ WVList
|
||||
0
|
||||
179
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
28
|
||||
../../../../../lib/cmn/sio.c
|
||||
180
|
||||
WString
|
||||
4
|
||||
@ -809,8 +809,8 @@ WVList
|
||||
0
|
||||
183
|
||||
MItem
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
28
|
||||
../../../../../lib/cmn/sll.c
|
||||
184
|
||||
WString
|
||||
4
|
||||
@ -827,8 +827,8 @@ WVList
|
||||
0
|
||||
187
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
29
|
||||
../../../../../lib/cmn/slmb.c
|
||||
188
|
||||
WString
|
||||
4
|
||||
@ -845,8 +845,8 @@ WVList
|
||||
0
|
||||
191
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
30
|
||||
../../../../../lib/cmn/stdio.c
|
||||
192
|
||||
WString
|
||||
4
|
||||
@ -864,7 +864,7 @@ WVList
|
||||
195
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
../../../../../lib/cmn/str-beg.c
|
||||
196
|
||||
WString
|
||||
4
|
||||
@ -882,7 +882,7 @@ WVList
|
||||
199
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
../../../../../lib/cmn/str-cat.c
|
||||
200
|
||||
WString
|
||||
4
|
||||
@ -900,7 +900,7 @@ WVList
|
||||
203
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
../../../../../lib/cmn/str-chr.c
|
||||
204
|
||||
WString
|
||||
4
|
||||
@ -918,7 +918,7 @@ WVList
|
||||
207
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
../../../../../lib/cmn/str-cmp.c
|
||||
208
|
||||
WString
|
||||
4
|
||||
@ -936,7 +936,7 @@ WVList
|
||||
211
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
../../../../../lib/cmn/str-cnv.c
|
||||
212
|
||||
WString
|
||||
4
|
||||
@ -954,7 +954,7 @@ WVList
|
||||
215
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
../../../../../lib/cmn/str-cpy.c
|
||||
216
|
||||
WString
|
||||
4
|
||||
@ -971,8 +971,8 @@ WVList
|
||||
0
|
||||
219
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
32
|
||||
../../../../../lib/cmn/str-del.c
|
||||
220
|
||||
WString
|
||||
4
|
||||
@ -989,8 +989,8 @@ WVList
|
||||
0
|
||||
223
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
32
|
||||
../../../../../lib/cmn/str-dup.c
|
||||
224
|
||||
WString
|
||||
4
|
||||
@ -1007,8 +1007,8 @@ WVList
|
||||
0
|
||||
227
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
33
|
||||
../../../../../lib/cmn/str-dynm.c
|
||||
228
|
||||
WString
|
||||
4
|
||||
@ -1026,7 +1026,7 @@ WVList
|
||||
231
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
../../../../../lib/cmn/str-dynw.c
|
||||
232
|
||||
WString
|
||||
4
|
||||
@ -1043,8 +1043,8 @@ WVList
|
||||
0
|
||||
235
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
32
|
||||
../../../../../lib/cmn/str-end.c
|
||||
236
|
||||
WString
|
||||
4
|
||||
@ -1061,8 +1061,8 @@ WVList
|
||||
0
|
||||
239
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
33
|
||||
../../../../../lib/cmn/str-excl.c
|
||||
240
|
||||
WString
|
||||
4
|
||||
@ -1080,7 +1080,7 @@ WVList
|
||||
243
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
../../../../../lib/cmn/str-fcpy.c
|
||||
244
|
||||
WString
|
||||
4
|
||||
@ -1097,8 +1097,8 @@ WVList
|
||||
0
|
||||
247
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
34
|
||||
../../../../../lib/cmn/str-fnmat.c
|
||||
248
|
||||
WString
|
||||
4
|
||||
@ -1115,8 +1115,8 @@ WVList
|
||||
0
|
||||
251
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
33
|
||||
../../../../../lib/cmn/str-incl.c
|
||||
252
|
||||
WString
|
||||
4
|
||||
@ -1133,8 +1133,8 @@ WVList
|
||||
0
|
||||
255
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
32
|
||||
../../../../../lib/cmn/str-len.c
|
||||
256
|
||||
WString
|
||||
4
|
||||
@ -1152,7 +1152,7 @@ WVList
|
||||
259
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-put.c
|
||||
../../../../../lib/cmn/str-pac.c
|
||||
260
|
||||
WString
|
||||
4
|
||||
@ -1169,8 +1169,8 @@ WVList
|
||||
0
|
||||
263
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
33
|
||||
../../../../../lib/cmn/str-pbrk.c
|
||||
264
|
||||
WString
|
||||
4
|
||||
@ -1188,7 +1188,7 @@ WVList
|
||||
267
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
../../../../../lib/cmn/str-put.c
|
||||
268
|
||||
WString
|
||||
4
|
||||
@ -1206,7 +1206,7 @@ WVList
|
||||
271
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-set.c
|
||||
../../../../../lib/cmn/str-rev.c
|
||||
272
|
||||
WString
|
||||
4
|
||||
@ -1224,7 +1224,7 @@ WVList
|
||||
275
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
../../../../../lib/cmn/str-rot.c
|
||||
276
|
||||
WString
|
||||
4
|
||||
@ -1242,7 +1242,7 @@ WVList
|
||||
279
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
../../../../../lib/cmn/str-set.c
|
||||
280
|
||||
WString
|
||||
4
|
||||
@ -1260,7 +1260,7 @@ WVList
|
||||
283
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-str.c
|
||||
../../../../../lib/cmn/str-spl.c
|
||||
284
|
||||
WString
|
||||
4
|
||||
@ -1277,8 +1277,8 @@ WVList
|
||||
0
|
||||
287
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
32
|
||||
../../../../../lib/cmn/str-spn.c
|
||||
288
|
||||
WString
|
||||
4
|
||||
@ -1296,7 +1296,7 @@ WVList
|
||||
291
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
../../../../../lib/cmn/str-str.c
|
||||
292
|
||||
WString
|
||||
4
|
||||
@ -1313,8 +1313,8 @@ WVList
|
||||
0
|
||||
295
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
34
|
||||
../../../../../lib/cmn/str-subst.c
|
||||
296
|
||||
WString
|
||||
4
|
||||
@ -1331,8 +1331,8 @@ WVList
|
||||
0
|
||||
299
|
||||
MItem
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
32
|
||||
../../../../../lib/cmn/str-tok.c
|
||||
300
|
||||
WString
|
||||
4
|
||||
@ -1349,8 +1349,8 @@ WVList
|
||||
0
|
||||
303
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
32
|
||||
../../../../../lib/cmn/str-trm.c
|
||||
304
|
||||
WString
|
||||
4
|
||||
@ -1367,8 +1367,8 @@ WVList
|
||||
0
|
||||
307
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
33
|
||||
../../../../../lib/cmn/str-word.c
|
||||
308
|
||||
WString
|
||||
4
|
||||
@ -1385,8 +1385,8 @@ WVList
|
||||
0
|
||||
311
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
29
|
||||
../../../../../lib/cmn/task.c
|
||||
312
|
||||
WString
|
||||
4
|
||||
@ -1403,8 +1403,8 @@ WVList
|
||||
0
|
||||
315
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
29
|
||||
../../../../../lib/cmn/time.c
|
||||
316
|
||||
WString
|
||||
4
|
||||
@ -1421,8 +1421,8 @@ WVList
|
||||
0
|
||||
319
|
||||
MItem
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
28
|
||||
../../../../../lib/cmn/tio.c
|
||||
320
|
||||
WString
|
||||
4
|
||||
@ -1439,8 +1439,8 @@ WVList
|
||||
0
|
||||
323
|
||||
MItem
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
32
|
||||
../../../../../lib/cmn/tre-ast.c
|
||||
324
|
||||
WString
|
||||
4
|
||||
@ -1457,8 +1457,8 @@ WVList
|
||||
0
|
||||
327
|
||||
MItem
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
36
|
||||
../../../../../lib/cmn/tre-compile.c
|
||||
328
|
||||
WString
|
||||
4
|
||||
@ -1475,8 +1475,8 @@ WVList
|
||||
0
|
||||
331
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
44
|
||||
../../../../../lib/cmn/tre-match-backtrack.c
|
||||
332
|
||||
WString
|
||||
4
|
||||
@ -1493,8 +1493,8 @@ WVList
|
||||
0
|
||||
335
|
||||
MItem
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
43
|
||||
../../../../../lib/cmn/tre-match-parallel.c
|
||||
336
|
||||
WString
|
||||
4
|
||||
@ -1511,8 +1511,8 @@ WVList
|
||||
0
|
||||
339
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/tre.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-parse.c
|
||||
340
|
||||
WString
|
||||
4
|
||||
@ -1529,8 +1529,8 @@ WVList
|
||||
0
|
||||
343
|
||||
MItem
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
34
|
||||
../../../../../lib/cmn/tre-stack.c
|
||||
344
|
||||
WString
|
||||
4
|
||||
@ -1548,7 +1548,7 @@ WVList
|
||||
347
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/xma.c
|
||||
../../../../../lib/cmn/tre.c
|
||||
348
|
||||
WString
|
||||
4
|
||||
@ -1565,44 +1565,44 @@ WVList
|
||||
0
|
||||
351
|
||||
MItem
|
||||
3
|
||||
*.h
|
||||
29
|
||||
../../../../../lib/cmn/utf8.c
|
||||
352
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
353
|
||||
WVList
|
||||
0
|
||||
354
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
355
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
../../../../../lib/cmn/xma.c
|
||||
356
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
4
|
||||
COBJ
|
||||
357
|
||||
WVList
|
||||
0
|
||||
358
|
||||
WVList
|
||||
0
|
||||
351
|
||||
11
|
||||
1
|
||||
1
|
||||
0
|
||||
359
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
3
|
||||
*.h
|
||||
360
|
||||
WString
|
||||
3
|
||||
@ -1613,7 +1613,43 @@ WVList
|
||||
362
|
||||
WVList
|
||||
0
|
||||
351
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
363
|
||||
MItem
|
||||
28
|
||||
../../../../../lib/cmn/mem.h
|
||||
364
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
365
|
||||
WVList
|
||||
0
|
||||
366
|
||||
WVList
|
||||
0
|
||||
359
|
||||
1
|
||||
1
|
||||
0
|
||||
367
|
||||
MItem
|
||||
32
|
||||
../../../../../lib/cmn/syscall.h
|
||||
368
|
||||
WString
|
||||
3
|
||||
NIL
|
||||
369
|
||||
WVList
|
||||
0
|
||||
370
|
||||
WVList
|
||||
0
|
||||
359
|
||||
1
|
||||
1
|
||||
0
|
||||
|
Loading…
x
Reference in New Issue
Block a user