fixed a bug in awk's built-in function fflush().
added the mb8 conversion routines for raw byte conversion
This commit is contained in:
@ -20,6 +20,7 @@ pkginclude_HEADERS = \
|
||||
lda.h \
|
||||
main.h \
|
||||
map.h \
|
||||
mb8.h \
|
||||
mbwc.h \
|
||||
mem.h \
|
||||
mux.h \
|
||||
|
@ -54,10 +54,10 @@ SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dir.h dll.h \
|
||||
env.h fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h \
|
||||
lda.h main.h map.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h \
|
||||
oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
stdio.h str.h task.h time.h tio.h tre.h uni.h uri.h utf8.h \
|
||||
xma.h Mmgr.hpp StdMmgr.hpp Mmged.hpp
|
||||
lda.h main.h map.h mb8.h mbwc.h mem.h mux.h nwad.h nwif.h \
|
||||
nwio.h oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h \
|
||||
slmb.h stdio.h str.h task.h time.h tio.h tre.h uni.h uri.h \
|
||||
utf8.h xma.h Mmgr.hpp StdMmgr.hpp Mmged.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,8 +266,8 @@ top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
pkginclude_HEADERS = alg.h chr.h cp949.h cp950.h dir.h dll.h env.h \
|
||||
fio.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h \
|
||||
main.h map.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h oht.h \
|
||||
opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
main.h map.h mb8.h mbwc.h mem.h mux.h nwad.h nwif.h nwio.h \
|
||||
oht.h opt.h path.h pio.h pma.h rbt.h rex.h sio.h sll.h slmb.h \
|
||||
stdio.h str.h task.h time.h tio.h tre.h uni.h uri.h utf8.h \
|
||||
xma.h $(am__append_1)
|
||||
all: all-am
|
||||
|
70
qse/include/qse/cmn/mb8.h
Normal file
70
qse/include/qse/cmn/mb8.h
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* $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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_CMN_MB8_H_
|
||||
#define _QSE_CMN_MB8_H_
|
||||
|
||||
#include <qse/types.h>
|
||||
#include <qse/macros.h>
|
||||
|
||||
/** \file
|
||||
* This file provides functions, types, macros for mb8 conversion.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The qse_wctomb8() function converts a wide character to a mb8 sequence.
|
||||
* \return
|
||||
* - 0 is returned if \a wc is invalid.
|
||||
* - An integer greater than \a size is returned if the \a mb8 sequence buffer
|
||||
* is not #QSE_NULL and not large enough. This integer is actually the number
|
||||
* of bytes needed.
|
||||
* - If \a mb8 is #QSE_NULL, the number of bytes that would have been stored
|
||||
* into \a mb8 if it had not been #QSE_NULL is returned.
|
||||
* - An integer between 1 and size inclusive is returned in all other cases.
|
||||
*/
|
||||
qse_size_t qse_wctomb8 (
|
||||
qse_wchar_t wc,
|
||||
qse_mchar_t* mb8,
|
||||
qse_size_t size
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_mb8towc() function converts a mb8 sequence to a wide character.
|
||||
* \return
|
||||
* - 0 is returned if the \a mb8 sequence is invalid.
|
||||
* - An integer greater than \a size is returned if the \a mb8 sequence is
|
||||
* not complete.
|
||||
* - An integer between 1 and size inclusive is returned in all other cases.
|
||||
*/
|
||||
qse_size_t qse_mb8towc (
|
||||
const qse_mchar_t* mb8,
|
||||
qse_size_t size,
|
||||
qse_wchar_t* wc
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -21,7 +21,7 @@
|
||||
#ifndef _QSE_CMN_MBWC_H_
|
||||
#define _QSE_CMN_MBWC_H_
|
||||
|
||||
/** @file
|
||||
/** \file
|
||||
* This file provides functions and definitions needed for
|
||||
* multibyte/wide-characer conversion.
|
||||
*/
|
||||
@ -36,7 +36,9 @@ typedef qse_cmgr_t* (*qse_cmgr_finder_t) (const qse_char_t* name);
|
||||
enum qse_cmgr_id_t
|
||||
{
|
||||
QSE_CMGR_SLMB,
|
||||
QSE_CMGR_UTF8
|
||||
QSE_CMGR_UTF8,
|
||||
QSE_CMGR_MB8
|
||||
|
||||
#if defined(QSE_ENABLE_XCMGRS)
|
||||
,
|
||||
QSE_CMGR_CP949,
|
||||
@ -59,7 +61,7 @@ QSE_EXPORT qse_cmgr_t* qse_findcmgrbyid (
|
||||
/**
|
||||
* The qse_getfindcmgr() function find a built-in cmgr matching a given
|
||||
* @a name and returns it. It returns #QSE_NULL if no match is found.
|
||||
* The @a name can be one of "utf8", "slmb", "cp949", "cp950", and an
|
||||
* The @a name can be one of "slmb", "utf8", "mb8", "cp949", "cp950", and an
|
||||
* empty string. Calling this function with an empty string is the same
|
||||
* as calling qse_getdflcmgr().
|
||||
*/
|
||||
|
Reference in New Issue
Block a user