revised docs
This commit is contained in:
parent
121ed07cf0
commit
07d38add5d
@ -1552,6 +1552,8 @@ PREDEFINED = "QSE_BEGIN_NAMESPACE(x)=namespace x {" \
|
||||
"QSE_SIZEOF_OFF_T=@QSE_SIZEOF_OFF_T@" \
|
||||
"QSE_SIZEOF_OFF64_T=@QSE_SIZEOF_OFF64_T@" \
|
||||
"QSE_EXPORT=" \
|
||||
"QSE_ENABLE_XCMGRS=" \
|
||||
"QSE_ENABLE_BUNDLED_UNICODE=" \
|
||||
"QSE_ENABLE_SEDTRACER=" \
|
||||
"@CHAR_MODE@"
|
||||
|
||||
|
@ -84,9 +84,9 @@ string literals and regular expressions.
|
||||
Tokens
|
||||
------
|
||||
|
||||
When QSEAWK parses a program, it classifies the a series of input charcters
|
||||
When QSEAWK parses a program, it classifies a series of input characters
|
||||
into meaningful tokens. It can extract the smallest meaningful unit through
|
||||
this tokenization process. There are
|
||||
this tokenization process.
|
||||
|
||||
### Numbers ###
|
||||
|
||||
@ -650,18 +650,26 @@ of *r* causes the function to close the read-end of the pipe and the value of
|
||||
The function returns 0 on success and -1 on failure.
|
||||
|
||||
Though not so useful, it is possible to create more than 1 streams of different
|
||||
kinds under the same name. It is undefined which stream *close*
|
||||
should close in the following program.
|
||||
kinds under the same name. The following program generates a shell script
|
||||
/tmp/x containing a command *ls -laF* and executes it without closing the
|
||||
script file being generated. It reads the execution output via a pipe and
|
||||
prints it to the console. It is undefined which stream the last *close*
|
||||
should close assuming the first *close* is commented out and the program works.
|
||||
|
||||
~~~~~{.awk}
|
||||
BEGIN {
|
||||
"/tmp/x" || getline y; # rwpipe stream
|
||||
print 1 | "/tmp/x"; # pipe stream
|
||||
print 1 > "/tmp/x"; # file stream
|
||||
close ("/tmp/x");
|
||||
BEGIN {
|
||||
print "ls -laF" > "/tmp/x"; # file stream
|
||||
system ("chmod ugo+x /tmp/x");
|
||||
#close ("/tmp/x");
|
||||
while(("/tmp/x" | getline y) > 0) print y; # pipe stream
|
||||
close ("/tmp/x"); # which stream to close?
|
||||
}
|
||||
~~~~~
|
||||
|
||||
Note that the execution of generated script fails if the script file is
|
||||
open on some platforms. That's what the first *close* commented out is
|
||||
actually for.
|
||||
|
||||
### fflush (io-name) ###
|
||||
|
||||
The *fflush* function flushes the output stream indicated by *io-name*.
|
||||
|
@ -35,14 +35,26 @@ typedef qse_cmgr_t* (*qse_cmgr_finder_t) (const qse_char_t* name);
|
||||
*/
|
||||
enum qse_cmgr_id_t
|
||||
{
|
||||
/** The slmb cmgr relies on the locale routnines in the underlying
|
||||
* platforms. You should initialize locale properly before using this.
|
||||
*/
|
||||
QSE_CMGR_SLMB,
|
||||
|
||||
/**
|
||||
* The utf cmgr converts between utf8 and unicode characters.
|
||||
*/
|
||||
QSE_CMGR_UTF8,
|
||||
|
||||
/**
|
||||
* The mb8 cmgr is used to convert raw bytes to wide characters and
|
||||
* vice versa.
|
||||
*/
|
||||
QSE_CMGR_MB8
|
||||
|
||||
#if defined(QSE_ENABLE_XCMGRS)
|
||||
,
|
||||
QSE_CMGR_CP949,
|
||||
QSE_CMGR_CP950
|
||||
QSE_CMGR_CP949, /**< cp949 */
|
||||
QSE_CMGR_CP950 /**< cp950 */
|
||||
#endif
|
||||
};
|
||||
typedef enum qse_cmgr_id_t qse_cmgr_id_t;
|
||||
|
Loading…
Reference in New Issue
Block a user