fixed build files and renamed std.h to be more specific

This commit is contained in:
hyung-hwan 2013-02-22 03:18:42 +00:00
parent 779d7bc375
commit 394cb34c04
38 changed files with 213 additions and 44 deletions

View File

@ -18,8 +18,7 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qse/awk/awk.h>
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/sll.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/chr.h>

View File

@ -1,6 +1,6 @@
#include <qse/http/std.h>
#include <qse/xli/std.h>
#include <qse/http/stdhttpd.h>
#include <qse/xli/stdxli.h>
#include <qse/cmn/stdio.h>
#include <qse/cmn/main.h>
#include <qse/cmn/str.h>

View File

@ -18,7 +18,7 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qse/sed/std.h>
#include <qse/sed/stdsed.h>
#include <qse/cmn/str.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/chr.h>

View File

@ -18,7 +18,7 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qse/xli/std.h>
#include <qse/xli/stdxli.h>
#include <qse/cmn/str.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/chr.h>

View File

@ -1,4 +1,4 @@
SUBDIRS = cmn awk sed http
SUBDIRS = cmn awk sed xli http
pkgincludedir = $(includedir)/qse

View File

@ -306,7 +306,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = cmn awk sed http
SUBDIRS = cmn awk sed xli http
pkginclude_HEADERS = conf-msw.h conf-os2.h conf-dos.h conf-vms.h \
conf-mac.h conf-inf.h types.h macros.h pack1.h unpack.h \
$(am__append_1)

View File

@ -1,6 +1,6 @@
pkgincludedir = $(includedir)/qse/awk
pkginclude_HEADERS = awk.h std.h
pkginclude_HEADERS = awk.h stdawk.h
if ENABLE_CXX
pkginclude_HEADERS += Awk.hpp StdAwk.hpp

View File

@ -58,7 +58,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__pkginclude_HEADERS_DIST = awk.h std.h Awk.hpp StdAwk.hpp
am__pkginclude_HEADERS_DIST = awk.h stdawk.h Awk.hpp StdAwk.hpp
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -266,7 +266,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = awk.h std.h $(am__append_1)
pkginclude_HEADERS = awk.h stdawk.h $(am__append_1)
all: all-am
.SUFFIXES:

View File

@ -18,8 +18,8 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _QSE_AWK_STD_H_
#define _QSE_AWK_STD_H_
#ifndef _QSE_AWK_STDAWK_H_
#define _QSE_AWK_STDAWK_H_
#include <qse/awk/awk.h>
#include <qse/cmn/sio.h>

View File

@ -1,4 +1,4 @@
pkgincludedir= $(includedir)/qse/http
pkginclude_HEADERS = http.h htre.h htrd.h httpd.h std.h upxd.h
pkginclude_HEADERS = http.h htre.h htrd.h httpd.h stdhttpd.h upxd.h

View File

@ -264,7 +264,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = http.h htre.h htrd.h httpd.h std.h upxd.h
pkginclude_HEADERS = http.h htre.h htrd.h httpd.h stdhttpd.h upxd.h
all: all-am
.SUFFIXES:

View File

@ -0,0 +1,170 @@
/*
* $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 <htrd://www.gnu.org/licenses/>.
*/
#ifndef _QSE_HTTP_STDHTTPD_H_
#define _QSE_HTTP_STDHTTPD_H_
#include <qse/http/httpd.h>
typedef int (*qse_httpd_serverstd_makersrc_t) (
qse_httpd_t* httpd,
qse_httpd_client_t* client,
qse_htre_t* req,
qse_httpd_rsrc_t* rsrc
);
typedef void (*qse_httpd_serverstd_freersrc_t) (
qse_httpd_t* httpd,
qse_httpd_client_t* client,
qse_htre_t* req,
qse_httpd_rsrc_t* rsrc
);
enum qse_httpd_serverstd_root_type_t
{
QSE_HTTPD_SERVERSTD_ROOT_PATH,
QSE_HTTPD_SERVERSTD_ROOT_NWAD
};
typedef enum qse_httpd_serverstd_root_type_t qse_httpd_serverstd_root_type_t;
typedef struct qse_httpd_serverstd_root_t qse_httpd_serverstd_root_t;
struct qse_httpd_serverstd_root_t
{
qse_httpd_serverstd_root_type_t type;
union
{
const qse_mchar_t* path;
qse_nwad_t nwad;
} u;
};
typedef struct qse_httpd_serverstd_cgi_t qse_httpd_serverstd_cgi_t;
struct qse_httpd_serverstd_cgi_t
{
int cgi: 1;
int nph: 1;
const qse_mchar_t* shebang; /* optional, can be #QSE_NULL */
};
typedef struct qse_httpd_serverstd_index_t qse_httpd_serverstd_index_t;
struct qse_httpd_serverstd_index_t
{
qse_size_t count;
const qse_mchar_t* files; /* "value1\0value2\0" */
};
enum qse_httpd_serverstd_query_code_t
{
QSE_HTTPD_SERVERSTD_NAME, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_ROOT, /* qse_httpd_serverstd_root_t */
QSE_HTTPD_SERVERSTD_REALM, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_AUTH, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_DIRCSS, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_ERRCSS, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_INDEX, /* qse_httpd_serverstd_index_t */
QSE_HTTPD_SERVERSTD_CGI, /* qse_httpd_serverstd_cgi_t */
QSE_HTTPD_SERVERSTD_MIME, /* const qse_mchar_t* */
QSE_HTTPD_SERVERSTD_DIRACC, /* int (http error code) */
QSE_HTTPD_SERVERSTD_FILEACC /* int (http error code) */
};
typedef enum qse_httpd_serverstd_query_code_t qse_httpd_serverstd_query_code_t;
typedef int (*qse_httpd_serverstd_query_t) (
qse_httpd_t* httpd,
qse_httpd_server_t* server,
qse_htre_t* req,
const qse_mchar_t* xpath,
qse_httpd_serverstd_query_code_t code,
void* result
);
enum qse_httpd_serverstd_opt_t
{
QSE_HTTPD_SERVERSTD_QUERY, /* qse_httpd_serverstd_query_t */
QSE_HTTPD_SERVERSTD_MAKERSRC, /* qse_httpd_serverstd_makersrc_t* */
QSE_HTTPD_SERVERSTD_FREERSRC /* qse_httpd_serverstd_freersrc_t* */
};
typedef enum qse_httpd_serverstd_opt_t qse_httpd_serverstd_opt_t;
#if defined(__cplusplus)
extern "C" {
#endif
QSE_EXPORT qse_httpd_t* qse_httpd_openstd (
qse_size_t xtnsize
);
QSE_EXPORT qse_httpd_t* qse_httpd_openstdwithmmgr (
qse_mmgr_t* mmgr,
qse_size_t xtnsize
);
QSE_EXPORT void* qse_httpd_getxtnstd (
qse_httpd_t* httpd
);
QSE_EXPORT qse_httpd_server_t* qse_httpd_attachserverstd (
qse_httpd_t* httpd,
const qse_httpd_server_dope_t* dope,
qse_size_t xtnsize
);
#if 0
QSE_EXPORT qse_httpd_server_t* qse_httpd_attachserverstdwithuri (
qse_httpd_t* httpd,
const qse_char_t* uri,
qse_httpd_server_detach_t detach,
qse_httpd_server_impede_t impede,
qse_httpd_serverstd_query_t query,
qse_size_t xtnsize
);
#endif
QSE_EXPORT int qse_httpd_getserverstdopt (
qse_httpd_t* httpd,
qse_httpd_server_t* server,
qse_httpd_serverstd_opt_t id,
void* value
);
QSE_EXPORT int qse_httpd_setserverstdopt (
qse_httpd_t* httpd,
qse_httpd_server_t* server,
qse_httpd_serverstd_opt_t id,
const void* value
);
QSE_EXPORT void* qse_httpd_getserverstdxtn (
qse_httpd_t* httpd,
qse_httpd_server_t* server
);
QSE_EXPORT int qse_httpd_loopstd (
qse_httpd_t* httpd
);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,6 +1,6 @@
pkgincludedir= $(includedir)/qse/sed
pkginclude_HEADERS = sed.h std.h
pkginclude_HEADERS = sed.h stdsed.h
if ENABLE_CXX
pkginclude_HEADERS += Sed.hpp StdSed.hpp

View File

@ -58,7 +58,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__pkginclude_HEADERS_DIST = sed.h std.h Sed.hpp StdSed.hpp
am__pkginclude_HEADERS_DIST = sed.h stdsed.h Sed.hpp StdSed.hpp
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -266,7 +266,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = sed.h std.h $(am__append_1)
pkginclude_HEADERS = sed.h stdsed.h $(am__append_1)
all: all-am
.SUFFIXES:

View File

@ -18,8 +18,8 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _QSE_SED_STD_H_
#define _QSE_SED_STD_H_
#ifndef _QSE_SED_STDSED_H_
#define _QSE_SED_STDSED_H_
#include <qse/sed/sed.h>
#include <qse/cmn/sio.h>

View File

@ -1,4 +1,4 @@
pkgincludedir= $(includedir)/qse/xli
pkginclude_HEADERS = xli.h std.h
pkginclude_HEADERS = xli.h stdxli.h

View File

@ -264,7 +264,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = xli.h std.h
pkginclude_HEADERS = xli.h stdxli.h
all: all-am
.SUFFIXES:

View File

@ -18,8 +18,8 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _QSE_XLI_STD_H_
#define _QSE_XLI_STD_H_
#ifndef _QSE_XLI_STDXLI_H_
#define _QSE_XLI_STDXLI_H_
#include <qse/xli/xli.h>
#include <qse/cmn/sio.h>

View File

@ -19,7 +19,7 @@
*/
#include "awk.h"
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/sio.h>
#include <qse/cmn/pio.h>
#include <qse/cmn/nwio.h>

View File

@ -19,7 +19,7 @@
*/
#include "sed.h"
#include <qse/sed/std.h>
#include <qse/sed/stdsed.h>
#include <qse/cmn/str.h>
#include <qse/cmn/sio.h>
#include "../cmn/mem.h"

View File

@ -1 +1 @@
SUBDIRS = cmn awk sed net
SUBDIRS = cmn awk sed http

View File

@ -271,7 +271,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = cmn awk sed net
SUBDIRS = cmn awk sed http
all: all-recursive
.SUFFIXES:

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/stdio.h>
static const qse_char_t* script = QSE_T("BEGIN { print \"hello, world\"; }");

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/str.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/str.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "awk00.h"

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "awk00.h"

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "awk00.h"

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "awk00.h"

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "awk00.h"

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/path.h>

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/main.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/path.h>

View File

@ -18,7 +18,7 @@
License along with QSE. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/stdio.h>
const qse_char_t* src = QSE_T("BEGIN { print \"hello, world\" | \"dir\"; }");

View File

@ -1,4 +1,4 @@
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/stdio.h>
/* this sample produces 8 text files containing multiplication chart. */

View File

@ -19,7 +19,7 @@
*/
#include <qse/awk/awk.h>
#include <qse/awk/std.h>
#include <qse/awk/stdawk.h>
#include <qse/cmn/mem.h>
#include <qse/cmn/stdio.h>

View File

@ -1,4 +1,4 @@
#include <qse/sed/std.h>
#include <qse/sed/stdsed.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "sed00.h"

View File

@ -1,4 +1,4 @@
#include <qse/sed/std.h>
#include <qse/sed/stdsed.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "sed00.h"

View File

@ -1,4 +1,4 @@
#include <qse/sed/std.h>
#include <qse/sed/stdsed.h>
#include <qse/cmn/main.h>
#include <qse/cmn/stdio.h>
#include "sed00.h"