* added QSE_PIO_MBSCMD

* added qse_env_insertsys() and related functions
This commit is contained in:
2011-08-11 10:18:35 +00:00
parent 93f8bfca65
commit cfe85ecc60
8 changed files with 395 additions and 156 deletions

View File

@ -93,8 +93,13 @@ void qse_env_clear (
qse_env_t* env
);
#define qse_env_getstr(env) ((env)->str.ptr)
#define qse_env_getarr(env) ((env)->arr.ptr)
const qse_env_char_t* qse_env_getstr (
qse_env_t* env
);
qse_env_char_t** qse_env_getarr (
qse_env_t* env
);
int qse_env_insertw (
qse_env_t* env,
@ -118,12 +123,26 @@ int qse_env_deletem (
const qse_mchar_t* name
);
int qse_env_insertsysw (
qse_env_t* env,
const qse_wchar_t* name
);
int qse_env_insertsysm (
qse_env_t* env,
const qse_mchar_t* name
);
#if defined(QSE_CHAR_IS_WCHAR)
# define qse_env_insert(env,name,value) qse_env_insertw(env,name,value)
# define qse_env_delete(env,name) qse_env_deletew(env,name)
# define qse_env_insertsys(env,name) qse_env_insertsysw(env,name)
#else
# define qse_env_insert(env,name,value) qse_env_insertm(env,name,value)
# define qse_env_delete(env,name) qse_env_deletem(env,name)
# define qse_env_insertsys(env,name) qse_env_insertsysm(env,name)
#endif
#ifdef __cplusplus

View File

@ -1,5 +1,5 @@
/*
* $Id: pio.h 538 2011-08-09 16:08:26Z hyunghwan.chung $
* $Id: pio.h 539 2011-08-10 16:18:35Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -44,6 +44,10 @@ enum qse_pio_oflag_t
* (/bin/sh on *nix, cmd.exe on windows) */
QSE_PIO_SHELL = (1 << 1),
/** indicate that the command to qse_pio_open() is a multi-byte string.
* it is useful if #QSE_CHAR_IS_WCHAR is defined. */
QSE_PIO_MBSCMD = (1 << 2),
/** write to stdin of a child process */
QSE_PIO_WRITEIN = (1 << 8),
/** read stdout of a child process */
@ -51,9 +55,9 @@ enum qse_pio_oflag_t
/** read stderr of a child process */
QSE_PIO_READERR = (1 << 10),
/** redirect stderr to stdout (2>&1, require QSE_PIO_READOUT) */
/** redirect stderr to stdout (2>&1, require #QSE_PIO_READOUT) */
QSE_PIO_ERRTOOUT = (1 << 11),
/** redirect stdout to stderr (1>&2, require QSE_PIO_READERR) */
/** redirect stdout to stderr (1>&2, require #QSE_PIO_READERR) */
QSE_PIO_OUTTOERR = (1 << 12),
/** redirect stdin to the null device (</dev/null, <NUL) */
@ -192,7 +196,10 @@ QSE_DEFINE_COMMON_FUNCTIONS (pio)
* the default shell of an underlying system: /bin/sh on *nix, cmd.exe on win32.
* On *nix systems, a full path to the command is needed if it is not specified.
* If @a env is #QSE_NULL, the environment of @a cmd inherits that of the
* calling process.
* calling process. If you want to pass an empty environment, you can pass
* an empty @a env object with no items inserted. If #QSE_PIO_MBSCMD is
* specified in @a oflags, @a cmd is treated as a multi-byte string whose
* character type is #qse_mchar_t.
* @return #qse_pio_t object on success, #QSE_NULL on failure
*/
qse_pio_t* qse_pio_open (

View File

@ -213,8 +213,8 @@ qse_httpd_task_t* qse_httpd_entaskcgi (
qse_httpd_t* httpd,
qse_httpd_client_t* client,
const qse_httpd_task_t* pred,
const qse_char_t* path,
const qse_http_version_t* version
const qse_mchar_t* path,
const qse_htre_t* req
);
void* qse_httpd_allocmem (