changed robodoc configuration.

This commit is contained in:
hyung-hwan 2009-02-21 23:06:45 +00:00
parent 70b517578e
commit 770cff61c5
8 changed files with 151 additions and 75 deletions

View File

@ -12,4 +12,4 @@ Cross compiling for WIN32 with MINGW32
Generate the API documents with robodoc. Generate the API documents with robodoc.
robodoc --rc doc/robodoc.rc --css doc/robodoc.css --src . --doc ./doc/qse --multidoc --index --html robodoc --rc doc/robodoc.rc --css doc/robodoc.css --src . --doc ./doc/qse

View File

@ -731,7 +731,6 @@ static struct
{ QSE_T("rio"), TestAwk::OPT_RIO }, { QSE_T("rio"), TestAwk::OPT_RIO },
{ QSE_T("rwpipe"), TestAwk::OPT_RWPIPE }, { QSE_T("rwpipe"), TestAwk::OPT_RWPIPE },
{ QSE_T("newline"), TestAwk::OPT_NEWLINE }, { QSE_T("newline"), TestAwk::OPT_NEWLINE },
{ QSE_T("baseone"), TestAwk::OPT_BASEONE },
{ QSE_T("stripspaces"), TestAwk::OPT_STRIPSPACES }, { QSE_T("stripspaces"), TestAwk::OPT_STRIPSPACES },
{ QSE_T("nextofile"), TestAwk::OPT_NEXTOFILE }, { QSE_T("nextofile"), TestAwk::OPT_NEXTOFILE },
{ QSE_T("crlf"), TestAwk::OPT_CRLF }, { QSE_T("crlf"), TestAwk::OPT_CRLF },

View File

@ -53,6 +53,7 @@ struct argout_t
void* isp; /* input source files or string */ void* isp; /* input source files or string */
int ist; /* input source type */ int ist; /* input source type */
qse_size_t isfl; /* the number of input source files */ qse_size_t isfl; /* the number of input source files */
int ost; /* output source type */
qse_char_t* osf; /* output source file */ qse_char_t* osf; /* output source file */
qse_char_t** icf; /* input console files */ qse_char_t** icf; /* input console files */
qse_size_t icfl; /* the number of input console files */ qse_size_t icfl; /* the number of input console files */
@ -487,14 +488,14 @@ static int handle_args (int argc, qse_char_t* argv[], struct argout_t* ao)
} }
/* the source code is the string, not from the file */ /* the source code is the string, not from the file */
ao->ist = QSE_AWK_SOURCE_STRING; ao->ist = QSE_AWK_PARSESIMPLE_STRING;
ao->isp = argv[opt.ind++]; ao->isp = argv[opt.ind++];
free (isf); free (isf);
} }
else else
{ {
ao->ist = QSE_AWK_SOURCE_FILES; ao->ist = QSE_AWK_PARSESIMPLE_FILE;
ao->isp = isf; ao->isp = isf;
} }
@ -519,7 +520,9 @@ static int handle_args (int argc, qse_char_t* argv[], struct argout_t* ao)
} }
icf[icfl] = QSE_NULL; icf[icfl] = QSE_NULL;
ao->ost = QSE_AWK_PARSESIMPLE_FILE;
ao->osf = osf; ao->osf = osf;
ao->icf = icf; ao->icf = icf;
ao->icfl = icfl; ao->icfl = icfl;
ao->vm = vm; ao->vm = vm;
@ -599,7 +602,6 @@ static int awk_main (int argc, qse_char_t* argv[])
awk = open_awk (); awk = open_awk ();
if (awk == QSE_NULL) return -1; if (awk == QSE_NULL) return -1;
if (qse_awk_parsesimple (awk, ao.ist, ao.isp, ao.osf) == -1) if (qse_awk_parsesimple (awk, ao.ist, ao.isp, ao.osf) == -1)
{ {
qse_printf ( qse_printf (
@ -618,7 +620,8 @@ static int awk_main (int argc, qse_char_t* argv[])
rcb.on_exit = on_run_exit; rcb.on_exit = on_run_exit;
rcb.data = &ao; rcb.data = &ao;
rtx = qse_awk_rtx_opensimple (awk, ao.icf, QSE_AWK_CONSOLE_STDIO); rtx = qse_awk_rtx_opensimple (
awk, ao.icf, QSE_AWK_RTX_OPENSIMPLE_STDIO);
if (rtx == QSE_NULL) if (rtx == QSE_NULL)
{ {
qse_printf ( qse_printf (

View File

@ -1,38 +1,9 @@
/****h* ROBODoc/ROBODoc Cascading Style Sheet
* FUNCTION
* This is the default cascading style sheet for documentation
* generated with ROBODoc.
* You can edit this file to your own liking and then use
* it with the option
* --css <filename>
*
* This style-sheet defines the following layout
* +----------------------------------------+
* | logo |
* +----------------------------------------+
* | extra |
* +----------------------------------------+
* | | navi- |
* | | gation |
* | content | |
* | | |
* +----------------------------------------+
* | footer |
* +----------------------------------------+
*
* This style-sheet is based on a style-sheet that was automatically
* generated with the Strange Banana stylesheet generator.
* See http://www.strangebanana.com/generator.aspx
*
******
* $Id: html_generator.c,v 1.93 2008/03/13 10:34:50 thuffir Exp $
*/
body body
{ {
background-color: rgb(255,255,255); background-color: rgb(255,255,255);
color: rgb(98,84,55); color: rgb(98,84,55);
//font-family: Arial, serif; font-family: Arial, serif;
border-color: rgb(226,199,143); border-color: rgb(226,199,143);
} }
@ -85,7 +56,8 @@ p.item_name
{ {
background-color: rgb(98,84,55); background-color: rgb(98,84,55);
color: rgb(230,221,202); color: rgb(230,221,202);
font-family: "Times New Roman", serif; //font-family: "Times New Roman", serif;
font-family: Georgia, serif;
font-style: normal; font-style: normal;
border-color: rgb(0,0,0); border-color: rgb(0,0,0);
} }

View File

@ -39,17 +39,30 @@ remark begin markers:
remark end markers: remark end markers:
*/ */
ignore files: ignore files:
.svn autoconf
autom4te.cache
.*
accept files:
*.c
*.h
headertypes: headertypes:
o "Overview" robo_overview 10 o "Overview" robo_overview 10
d "Definitions" robo_definitions 6 d "Definitions" robo_definitions 6
t "Types" robo_types 5 t "Types" robo_types 5
s "Structures" robo_structures 5 e "Enumerations" robo_enumerations 6
f "Functions" robo_functions 4 s "Structures" robo_structures 5
S "Samples" robo_samples 0 f "Functions" robo_functions 4
S "Samples" robo_samples 0
options: options:
--cmode --cmode
--nopre --nopre
--documenttitle "QSE" --documenttitle "QSE"
--source_line_numbers --source_line_numbers
--tabsize 4 --tabsize 4
--sections
--toc "no"
--tell
--nosort
--index
--multidoc
--html

View File

@ -296,7 +296,11 @@ enum qse_awk_option_t
QSE_AWK_NEWLINE | QSE_AWK_PABLOCK QSE_AWK_NEWLINE | QSE_AWK_PABLOCK
}; };
/* error code */ /****e* AWK/qse_awk_errnum_t
* NAME
* qse_awk_errnum_t - define an error code
* SYNOPSIS
*/
enum qse_awk_errnum_t enum qse_awk_errnum_t
{ {
QSE_AWK_ENOERR, /* no error */ QSE_AWK_ENOERR, /* no error */
@ -312,7 +316,7 @@ enum qse_awk_errnum_t
QSE_AWK_EMFILE, /* too many open files */ QSE_AWK_EMFILE, /* too many open files */
QSE_AWK_EMLINK, /* too many links */ QSE_AWK_EMLINK, /* too many links */
QSE_AWK_EAGAIN, /* resource temporarily unavailable */ QSE_AWK_EAGAIN, /* resource temporarily unavailable */
QSE_AWK_ENOENT, /* "'%.*s' not existing */ QSE_AWK_ENOENT, /* '${1}' not existing */
QSE_AWK_EEXIST, /* file or data exists */ QSE_AWK_EEXIST, /* file or data exists */
QSE_AWK_EFTBIG, /* file or data too big */ QSE_AWK_EFTBIG, /* file or data too big */
QSE_AWK_ETBUSY, /* system too busy */ QSE_AWK_ETBUSY, /* system too busy */
@ -330,13 +334,13 @@ enum qse_awk_errnum_t
QSE_AWK_EBLKNST, /* blocke nested too deeply */ QSE_AWK_EBLKNST, /* blocke nested too deeply */
QSE_AWK_EEXPRNST, /* expression nested too deeply */ QSE_AWK_EEXPRNST, /* expression nested too deeply */
QSE_AWK_ESINOP, QSE_AWK_ESINOP, /* failed to open source input */
QSE_AWK_ESINCL, QSE_AWK_ESINCL, /* failed to close source output */
QSE_AWK_ESINRD, QSE_AWK_ESINRD, /* failed to read source input */
QSE_AWK_ESOUTOP, QSE_AWK_ESOUTOP, /* failed to open source output */
QSE_AWK_ESOUTCL, QSE_AWK_ESOUTCL, /* failed to close source output */
QSE_AWK_ESOUTWR, QSE_AWK_ESOUTWR, /* failed to write source output */
QSE_AWK_ELXCHR, /* lexer came accross an wrong character */ QSE_AWK_ELXCHR, /* lexer came accross an wrong character */
QSE_AWK_ELXDIG, /* invalid digit */ QSE_AWK_ELXDIG, /* invalid digit */
@ -400,7 +404,7 @@ enum qse_awk_errnum_t
QSE_AWK_EPOSIDX, /* wrong position index */ QSE_AWK_EPOSIDX, /* wrong position index */
QSE_AWK_EARGTF, /* too few arguments */ QSE_AWK_EARGTF, /* too few arguments */
QSE_AWK_EARGTM, /* too many arguments */ QSE_AWK_EARGTM, /* too many arguments */
QSE_AWK_EFUNNONE, /* "function '%.*s' not found" */ QSE_AWK_EFUNNONE, /* function '${1}' not found */
QSE_AWK_ENOTIDX, /* variable not indexable */ QSE_AWK_ENOTIDX, /* variable not indexable */
QSE_AWK_ENOTDEL, /* variable not deletable */ QSE_AWK_ENOTDEL, /* variable not deletable */
QSE_AWK_ENOTMAP, /* value not a map */ QSE_AWK_ENOTMAP, /* value not a map */
@ -448,6 +452,9 @@ enum qse_awk_errnum_t
/* the number of error numbers, internal use only */ /* the number of error numbers, internal use only */
QSE_AWK_NUMERRNUM QSE_AWK_NUMERRNUM
}; };
/******/
typedef enum qse_awk_errnum_t qse_awk_errnum_t;
/* depth types */ /* depth types */
enum qse_awk_depth_t enum qse_awk_depth_t
@ -554,7 +561,6 @@ enum qse_awk_rtx_valtostr_opt_t
QSE_AWK_VALTOSTR_PRINT = (1 << 2) QSE_AWK_VALTOSTR_PRINT = (1 << 2)
}; };
typedef enum qse_awk_errnum_t qse_awk_errnum_t;
typedef struct qse_awk_val_nil_t qse_awk_val_nil_t; typedef struct qse_awk_val_nil_t qse_awk_val_nil_t;
typedef struct qse_awk_val_int_t qse_awk_val_int_t; typedef struct qse_awk_val_int_t qse_awk_val_int_t;
@ -647,14 +653,24 @@ struct qse_awk_val_ref_t
qse_awk_val_t** adr; qse_awk_val_t** adr;
}; };
enum qse_awk_parse_ist_t /****e* AWK/qse_awk_parsesimple_type_t
* NAME
* qse_awk_parsesimple_type_t - define a source type
* SYNOPSIS
*/
enum qse_awk_parsesimple_type_t
{ {
QSE_AWK_SOURCE_FILES = 0, QSE_AWK_PARSESIMPLE_NONE = 0,
QSE_AWK_SOURCE_STRING = 1 QSE_AWK_PARSESIMPLE_FILE = 1,
QSE_AWK_PARSESIMPLE_STR = 2,
QSE_AWK_PARSESIMPLE_STRL = 3
}; };
/******/
#define QSE_AWK_CONSOLE_STDIO (qse_awk_console_stdio) typedef enum qse_awk_parsesimple_type_t qse_awk_parsesimple_type_t;
extern const qse_char_t* qse_awk_console_stdio[];
#define QSE_AWK_RTX_OPENSIMPLE_STDIO (qse_awk_rtx_opensimple_stdio)
extern const qse_char_t* qse_awk_rtx_opensimple_stdio[];
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -812,7 +828,7 @@ int qse_awk_clear (
/****f* AWK/qse_awk_geterrstr /****f* AWK/qse_awk_geterrstr
* NAME * NAME
* qse_awk_geterrstr - get a format string for an error * qse_awk_geterrstr - get a format string for an error code
* DESCRIPTION * DESCRIPTION
* The qse_awk_geterrstr() function returns a pointer to a format string for * The qse_awk_geterrstr() function returns a pointer to a format string for
* the error number num. * the error number num.
@ -1578,18 +1594,49 @@ qse_awk_t* qse_awk_opensimple (
/****f* AWK/qse_awk_parsesimple /****f* AWK/qse_awk_parsesimple
* NAME * NAME
* qse_awk_parsesimple - parse source code * qse_awk_parsesimple - parse source code
*
* DESCRIPTION * DESCRIPTION
* If 'ist' is QSE_AWK_PARSE_STRING, 'isp' should be a null-terminated string * If 'ist' is QSE_AWK_PARSESIMPLE_STR, 'isp' should be a null-terminated
* of the type 'const qse_char_t*'; If 'ist' is QSE_AWK_PARSE_FILES, 'isp' * string of the type 'const qse_char_t*' holding the source code; If 'ist'
* should be an array of null-terminated strings whose last element is a * is QSE_AWK_PARSESIMPLE_FILE, 'isp' should be a null-terminated string of
* null pointer. * the type 'const qse_char_t*' holding the file name to read the source code
* from; If 'ist' is QSE_AWK_PARSESIMPLE_STRL, 'isp' should be a const pointer
* to a variable of the type 'qse_cstr_t'. It holds the pointer to the source
* code and its length.
*
* If 'ost' is QSE_AWK_PARSESIMPLE_STR, 'osp' should be a pointer to a
* 'qse_char_t' buffer whose end is marked with a null character. that is
* the buffer should not contain a null character before its end; If 'ost'
* is QSE_AWK_PARSESIMPLE_FILE, the deparsed source code is written to a file
* indicated by 'osp' of the type 'const qse_char_t*';
* If 'ost' is QSE_AWK_PARSESIMPLE_STRL, the buffer to be written is indicated
* in the parameter 'osp' of the type 'qse_xstr_t*'.
*
* You can set 'ost' to QSE_AWK_PARSESIMPLE_NONE not to produce deparsed
* source code while setting 'ist' TO QSE_AWK_PARSESIMPLE_NONE is an error.
*
* EXAMPLE
* The following example parses the literal string 'BEGIN { print 10; }' and
* deparses it out to a buffer 'buf'.
* int n;
* qse_char_t buf[1000];
* qse_memset (buf, QSE_T(' '), QSE_COUNTOF(buf));
* buf[QSE_COUNTOF(buf)-1] = QSE_T('\0');
* n = qse_awk_parsesimple (
* awk,
* QSE_AWK_PARSESIMPLE_STR,
* QSE_T("BEGIN { print 10; }"),
* QSE_AWK_PARSESIMPLE_STR,
* buf
* );
* SYNOPSIS * SYNOPSIS
*/ */
int qse_awk_parsesimple ( int qse_awk_parsesimple (
qse_awk_t* awk, qse_awk_t* awk,
int ist /* QSE_AWK_PARSE_FILES, QSE_AWK_PARSE_STRING */, qse_awk_parsesimple_type_t ist,
const void* isp /* source file names or source string */, const void* isp,
const qse_char_t* osf /* an output source file name */ qse_awk_parsesimple_type_t ost,
const void* osp
); );
/******/ /******/

View File

@ -22,6 +22,15 @@
#include <qse/types.h> #include <qse/types.h>
#include <qse/macros.h> #include <qse/macros.h>
/****o* LISP/LISP Interpreter
* DESCRIPTION
* The library includes a LISP interpreter that can be embedded into other
* applications or can run stand-alone.
*
* #include <qse/lsp/lsp.h>
******
*/
typedef struct qse_lsp_t qse_lsp_t; typedef struct qse_lsp_t qse_lsp_t;
typedef struct qse_lsp_obj_t qse_lsp_obj_t; typedef struct qse_lsp_obj_t qse_lsp_obj_t;
typedef struct qse_lsp_prmfns_t qse_lsp_prmfns_t; typedef struct qse_lsp_prmfns_t qse_lsp_prmfns_t;

View File

@ -38,6 +38,7 @@ typedef struct xtn_t
{ {
const qse_char_t*const* files; const qse_char_t*const* files;
const qse_char_t* str; const qse_char_t* str;
qse_cstr_t cstr;
} u; } u;
qse_size_t index; /* current file index */ qse_size_t index; /* current file index */
qse_sio_t* handle; /* the handle to an open file */ qse_sio_t* handle; /* the handle to an open file */
@ -45,7 +46,12 @@ typedef struct xtn_t
struct struct
{ {
const qse_char_t* file; union
{
const qse_char_t* file;
qse_char_t* str;
qse_cstr_t cstr;
} u;
qse_sio_t* handle; qse_sio_t* handle;
} out; } out;
@ -73,7 +79,7 @@ typedef struct rxtn_t
} rxtn_t; } rxtn_t;
const qse_char_t* qse_awk_console_stdio[] = const qse_char_t* qse_awk_rtx_opensimple_stdio[] =
{ {
QSE_T(""), QSE_T(""),
QSE_NULL QSE_NULL
@ -164,7 +170,7 @@ static qse_ssize_t sf_in (
if (cmd == QSE_AWK_SIO_OPEN) if (cmd == QSE_AWK_SIO_OPEN)
{ {
if (xtn->s.in.type == QSE_AWK_SOURCE_FILES) if (xtn->s.in.type == QSE_AWK_PARSESIMPLE_FILE)
{ {
if (xtn->s.in.u.files == QSE_NULL) return -1; if (xtn->s.in.u.files == QSE_NULL) return -1;
if (xtn->s.in.u.files[xtn->s.in.index] == QSE_NULL) return 0; if (xtn->s.in.u.files[xtn->s.in.index] == QSE_NULL) return 0;
@ -205,7 +211,7 @@ static qse_ssize_t sf_in (
{ {
qse_ssize_t n = 0; qse_ssize_t n = 0;
if (xtn->s.in.type == QSE_AWK_SOURCE_FILES) if (xtn->s.in.type == QSE_AWK_PARSESIMPLE_FILE)
{ {
qse_sio_t* sio; qse_sio_t* sio;
@ -302,7 +308,11 @@ static qse_ssize_t sf_out (
} }
int qse_awk_parsesimple ( int qse_awk_parsesimple (
qse_awk_t* awk, int ist, const void* isp, const qse_char_t* osf) qse_awk_t* awk,
qse_awk_parsesimple_type_t ist,
const void* isp,
qse_awk_parsesimple_type_t ost,
const void* osp)
{ {
qse_awk_sio_t sio; qse_awk_sio_t sio;
xtn_t* xtn = (xtn_t*) QSE_XTN (awk); xtn_t* xtn = (xtn_t*) QSE_XTN (awk);
@ -313,14 +323,37 @@ int qse_awk_parsesimple (
return -1; return -1;
} }
if (ist == QSE_AWK_SOURCE_FILES) if (ist == QSE_AWK_PARSESIMPLE_FILE)
{ {
xtn->s.in.u.files = (const qse_char_t*const*)isp; xtn->s.in.u.files = (const qse_char_t*const*)isp;
} }
else if (ist == QSE_AWK_SOURCE_STRING) else if (ist == QSE_AWK_PARSESIMPLE_STR)
{ {
xtn->s.in.u.str = (const qse_char_t*)isp; xtn->s.in.u.str = (const qse_char_t*)isp;
} }
else if (ist == QSE_AWK_PARSESIMPLE_STRL)
{
xtn->s.in.u.cstr.ptr = (const qse_cstr_t*)isp->ptr;
xtn->s.in.u.cstr.len = (const qse_cstr_t*)isp->len;
}
else
{
qse_awk_seterrnum (awk, QSE_AWK_EINVAL);
return -1;
}
if (ost == QSE_AWK_PARSESIMPLE_FILE)
{
}
else if (ost == QSE_AWK_PARSESIMPLE_STR)
{
}
else if (ost == QSE_AWK_PARSESIMPLE_STRL)
{
}
else if (ost == QSE_AWK_PARSESIMPLE_NONE)
{
}
else else
{ {
qse_awk_seterrnum (awk, QSE_AWK_EINVAL); qse_awk_seterrnum (awk, QSE_AWK_EINVAL);