touched up code a bit

This commit is contained in:
hyung-hwan 2009-12-22 06:44:33 +00:00
parent d418e651e5
commit 200a3f6656
7 changed files with 18 additions and 13 deletions

View File

@ -35,7 +35,6 @@ static int g_infile_end = 0;
static const qse_char_t* g_infile = QSE_NULL; static const qse_char_t* g_infile = QSE_NULL;
static const qse_char_t* g_outfile = QSE_NULL; static const qse_char_t* g_outfile = QSE_NULL;
static int g_option = 0; static int g_option = 0;
static int g_infile_index = 0;
static qse_cint_t g_din = QSE_CHAR_EOF; static qse_cint_t g_din = QSE_CHAR_EOF;
static qse_cint_t g_dout = QSE_CHAR_EOF; static qse_cint_t g_dout = QSE_CHAR_EOF;

View File

@ -58,6 +58,7 @@ public:
class Stream: public Types class Stream: public Types
{ {
public: public:
/// The Mode type defines I/O operation mode.
enum Mode enum Mode
{ {
READ, ///< open for read READ, ///< open for read

View File

@ -26,7 +26,7 @@
#include <qse/cmn/str.h> #include <qse/cmn/str.h>
/** @file /** @file
* cut utility * This file defines a text cutter utility.
* *
* @todo QSE_CUT_ORDEREDSEL - A selector 5,3,1 is ordered to 1,3,5 * @todo QSE_CUT_ORDEREDSEL - A selector 5,3,1 is ordered to 1,3,5
*/ */
@ -37,6 +37,7 @@
*/ */
/** @struct qse_cut_t /** @struct qse_cut_t
* The qes_cut_t type defines a text cutter.
*/ */
typedef struct qse_cut_t qse_cut_t; typedef struct qse_cut_t qse_cut_t;

View File

@ -61,8 +61,8 @@ int qse_cut_compstd (
/** /**
* The qse_cut_execstd() function executes the compiled script * The qse_cut_execstd() function executes the compiled script
* over an input file @a infile and an output file @a outfile. * over an input file @a infile and an output file @a outfile.
* If @infile is QSE_NULL, the standard console input is used. * If @a infile is QSE_NULL, the standard console input is used.
* If @outfile is QSE_NULL, the standard console output is used.. * If @a outfile is QSE_NULL, the standard console output is used..
*/ */
int qse_cut_execstd ( int qse_cut_execstd (
qse_cut_t* cut, qse_cut_t* cut,

View File

@ -1,5 +1,5 @@
/* /*
* $Id: Sed.hpp 320 2009-12-21 12:29:52Z hyunghwan.chung $ * $Id: Sed.hpp 321 2009-12-21 12:44:33Z hyunghwan.chung $
* *
Copyright 2006-2009 Chung, Hyung-Hwan. Copyright 2006-2009 Chung, Hyung-Hwan.
This file is part of QSE. This file is part of QSE.
@ -93,7 +93,7 @@ public:
void setHandle (void* handle) { arg->handle = handle; } void setHandle (void* handle) { arg->handle = handle; }
/// The getName() function returns an I/O name. /// The getName() function returns an I/O name.
/// @return QSE_NULL for the main data stream, /// @return #QSE_NULL for the main data stream,
/// file path for explicit file stream /// file path for explicit file stream
const char_t* getName () const { return arg->path; } const char_t* getName () const { return arg->path; }

View File

@ -25,6 +25,10 @@
/** @file /** @file
* This file defines a simple stream editor. * This file defines a simple stream editor.
*
* @example sed01.c
* This example shows how to write a simple stream editor using easy API
* functions.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -59,8 +63,8 @@ int qse_sed_compstd (
/** /**
* The qse_sed_execstd() function executes the compiled script * The qse_sed_execstd() function executes the compiled script
* over an input file @a infile and an output file @a outfile. * over an input file @a infile and an output file @a outfile.
* If @infile is QSE_NULL, the standard console input is used. * If @a infile is QSE_NULL, the standard console input is used.
* If @outfile is QSE_NULL, the standard console output is used. * If @a outfile is QSE_NULL, the standard console output is used.
*/ */
int qse_sed_execstd ( int qse_sed_execstd (
qse_sed_t* sed, qse_sed_t* sed,

View File

@ -1,5 +1,5 @@
/* /*
* $Id: sed01.c 316 2009-12-14 12:50:11Z hyunghwan.chung $ * $Id$
* *
Copyright 2006-2009 Chung, Hyung-Hwan. Copyright 2006-2009 Chung, Hyung-Hwan.
This file is part of QSE. This file is part of QSE.
@ -25,15 +25,15 @@
int sed_main (int argc, qse_char_t* argv[]) int sed_main (int argc, qse_char_t* argv[])
{ {
qse_sed_t* sed = QSE_NULL; qse_sed_t* sed = QSE_NULL;
qse_char_t* infile; qse_char_t* infile;
qse_char_t* outfile; qse_char_t* outfile;
int ret = -1; int ret = -1;
if (argc < 2 || argc > 4) if (argc < 2 || argc > 4)
{ {
qse_fprintf (QSE_STDERR, QSE_T("USAGE: %s command-string [input-file [output-file]]\n"), argv[0]); qse_fprintf (QSE_STDERR, QSE_T("USAGE: %s command-string [input-file [output-file]]\n"), argv[0]);
return -1; return -1;
} }
sed = qse_sed_openstd (0); sed = qse_sed_openstd (0);
if (sed == QSE_NULL) if (sed == QSE_NULL)