added more documentation
This commit is contained in:
parent
a1bec8936b
commit
2bd2f30828
@ -38,25 +38,9 @@ $ make install
|
|||||||
|
|
||||||
@subsection build_mchar BUILING FOR MULTI-BYTE CHARACTER MODE
|
@subsection build_mchar BUILING FOR MULTI-BYTE CHARACTER MODE
|
||||||
|
|
||||||
The library can be built for two different character modes:
|
While the library is built for wide character mode by default, you can build
|
||||||
- multi-byte character mode
|
it for multi-byte character mode by running @b configure with the
|
||||||
- wide character mode
|
@b --disable-wchar option specified explicitly.
|
||||||
|
|
||||||
Under the multi-byte character mode:
|
|
||||||
- #QSE_CHAR_IS_MCHAR is defined.
|
|
||||||
- #qse_char_t maps to #qse_mchar_t.
|
|
||||||
- #QSE_T("x") becomes "x".
|
|
||||||
|
|
||||||
Under the wide character mode:
|
|
||||||
- #QSE_CHAR_IS_WCHAR is defined.
|
|
||||||
- #qse_char_t maps to #qse_wchar_t.
|
|
||||||
- #QSE_T("x") becomes L"x".
|
|
||||||
|
|
||||||
Typically, #qse_mchar_t maps char and #qse_wchar_t is maps to wchar_t in both modes.
|
|
||||||
|
|
||||||
By default, the library is built for the wide character mode. To compile it
|
|
||||||
for the multi-byte character mode, run configure with the @b --disable-wchar option
|
|
||||||
specified explicitly.
|
|
||||||
|
|
||||||
@code
|
@code
|
||||||
$ ./configure --disable-wchar
|
$ ./configure --disable-wchar
|
||||||
@ -64,6 +48,20 @@ $ make
|
|||||||
$ make install
|
$ make install
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
Under the multi-byte character mode:
|
||||||
|
- #QSE_CHAR_IS_MCHAR is defined
|
||||||
|
- #qse_char_t maps to #qse_mchar_t.
|
||||||
|
- #QSE_T("x") becomes "x"
|
||||||
|
|
||||||
|
Under the wide character mode:
|
||||||
|
- #QSE_CHAR_IS_WCHAR is defined
|
||||||
|
- #qse_char_t maps to #qse_wchar_t
|
||||||
|
- #QSE_T("x") becomes L"x"
|
||||||
|
|
||||||
|
Typically, #qse_mchar_t maps @b char and #qse_wchar_t maps to @b wchar_t or
|
||||||
|
equivalent. It is not advised to build the library for both modes and have
|
||||||
|
them installed on the same system as doing so results in name collision.
|
||||||
|
|
||||||
@section MODULES
|
@section MODULES
|
||||||
QSE includes various modules:
|
QSE includes various modules:
|
||||||
- @subpage awk "AWK"
|
- @subpage awk "AWK"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: macros.h 150 2009-05-21 06:17:17Z hyunghwan.chung $
|
* $Id: macros.h 175 2009-06-02 07:42:30Z hyunghwan.chung $
|
||||||
*
|
*
|
||||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||||
|
|
||||||
@ -140,14 +140,25 @@
|
|||||||
#define QSE_MQ(val) QSE_MQ_I(val)
|
#define QSE_MQ(val) QSE_MQ_I(val)
|
||||||
#define QSE_MC(ch) ((qse_mchar_t)ch)
|
#define QSE_MC(ch) ((qse_mchar_t)ch)
|
||||||
#define QSE_MS(str) ((const qse_mchar_t*)str)
|
#define QSE_MS(str) ((const qse_mchar_t*)str)
|
||||||
|
/**
|
||||||
|
* The #QSE_MT macro maps a multi-byte literal string literal as it is.
|
||||||
|
*/
|
||||||
#define QSE_MT(txt) (txt)
|
#define QSE_MT(txt) (txt)
|
||||||
|
|
||||||
#define QSE_WQ_I(val) (L ## #val)
|
#define QSE_WQ_I(val) (L ## #val)
|
||||||
#define QSE_WQ(val) QSE_WQ_I(val)
|
#define QSE_WQ(val) QSE_WQ_I(val)
|
||||||
#define QSE_WC(ch) ((qse_wchar_t)L ## ch)
|
#define QSE_WC(ch) ((qse_wchar_t)L ## ch)
|
||||||
#define QSE_WS(str) ((const qse_wchar_t*)L ## str)
|
#define QSE_WS(str) ((const qse_wchar_t*)L ## str)
|
||||||
|
/**
|
||||||
|
* The #QSE_WT macro maps a multi-byte literal string to a wide character
|
||||||
|
* string by prefixing it with @b L.
|
||||||
|
*/
|
||||||
#define QSE_WT(txt) (L ## txt)
|
#define QSE_WT(txt) (L ## txt)
|
||||||
|
|
||||||
|
/** @def QSE_T
|
||||||
|
* The #QSE_T macro maps to #QSE_MT if #QSE_CHAR_IS_MCHAR is defined, and to
|
||||||
|
* #QSE_WT if #QSE_CHAR_IS_WCHAR is defined.
|
||||||
|
*/
|
||||||
#if defined(QSE_CHAR_IS_MCHAR)
|
#if defined(QSE_CHAR_IS_MCHAR)
|
||||||
# define QSE_Q(val) QSE_MQ(val)
|
# define QSE_Q(val) QSE_MQ(val)
|
||||||
# define QSE_C(ch) QSE_MC(ch)
|
# define QSE_C(ch) QSE_MC(ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user