From e49c59038c927c0224f4fb51d86795427431ac97 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 25 Aug 2003 01:44:17 +0000 Subject: [PATCH] Sync with original --- ext/mbstring/libmbfl/mbfl.rc | 2 +- ext/mbstring/libmbfl/mbfl/Makefile.am | 2 +- ext/mbstring/libmbfl/mbfl/mbfilter.h | 87 +++-- ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h | 3 +- ext/mbstring/libmbfl/mbfl/mbfilter_pass.h | 7 +- ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h | 3 +- ext/mbstring/libmbfl/mbfl/mbfl_allocators.h | 4 +- ext/mbstring/libmbfl/mbfl/mbfl_convert.h | 31 +- ext/mbstring/libmbfl/mbfl/mbfl_defs.h | 52 +++ ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 14 +- .../libmbfl/mbfl/mbfl_filter_output.h | 4 +- ext/mbstring/libmbfl/mbfl/mbfl_ident.h | 21 +- ext/mbstring/libmbfl/mbfl/mbfl_language.h | 9 +- .../libmbfl/mbfl/mbfl_memory_device.h | 29 +- ext/mbstring/libmbfl/mbfl/mbfl_string.h | 7 +- ext/mbstring/libmbfl/missing | 336 ------------------ ext/mbstring/libmbfl/rules.mak.bcc32 | 2 +- 17 files changed, 168 insertions(+), 445 deletions(-) create mode 100755 ext/mbstring/libmbfl/mbfl/mbfl_defs.h delete mode 100755 ext/mbstring/libmbfl/missing diff --git a/ext/mbstring/libmbfl/mbfl.rc b/ext/mbstring/libmbfl/mbfl.rc index d6cf7d1436..655e61893a 100644 --- a/ext/mbstring/libmbfl/mbfl.rc +++ b/ext/mbstring/libmbfl/mbfl.rc @@ -1,4 +1,4 @@ -/* $Id: mbfl.rc,v 1.2.2.1 2003/08/14 08:22:47 hirokawa Exp */ +/* $Id$ */ 1 VERSIONINFO FILEVERSION 1,1,0,0 PRODUCTVERSION 1,1,0,0 diff --git a/ext/mbstring/libmbfl/mbfl/Makefile.am b/ext/mbstring/libmbfl/mbfl/Makefile.am index d26d6cd9cf..1b9bdcada1 100644 --- a/ext/mbstring/libmbfl/mbfl/Makefile.am +++ b/ext/mbstring/libmbfl/mbfl/Makefile.am @@ -4,7 +4,7 @@ libmbfl_filters_la=../filters/libmbfl_filters.la libmbfl_nls_la=../nls/libmbfl_nls.la libmbfl_la_LIBADD=$(libmbfl_filters_la) $(libmbfl_nls_la) libmbfl_includedir=$(includedir)/mbfl -libmbfl_include_HEADERS=mbfilter.h mbfl_consts.h mbfl_encoding.h mbfl_language.h mbfl_string.h mbfl_convert.h mbfl_ident.h mbfl_memory_device.h mbfl_allocators.h +libmbfl_include_HEADERS=mbfilter.h mbfl_consts.h mbfl_encoding.h mbfl_language.h mbfl_string.h mbfl_convert.h mbfl_ident.h mbfl_memory_device.h mbfl_allocators.h mbfl_defs.h $(libmbfl_filters_la): $(MAKE) -C `dirname $(libmbfl_filters_la)` diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index 6dab193d6e..949a5e626c 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -89,6 +89,7 @@ #ifndef MBFL_MBFILTER_H #define MBFL_MBFILTER_H +#include "mbfl_defs.h" #include "mbfl_consts.h" #include "mbfl_allocators.h" #include "mbfl_encoding.h" @@ -97,14 +98,6 @@ #include "mbfl_convert.h" #include "mbfl_ident.h" -#ifndef NULL -#ifdef __cplusplus -#define NULL (0L) -#else -#define NULL (void *)(0L) -#endif -#endif - /* * convert filter */ @@ -125,17 +118,17 @@ struct _mbfl_buffer_converter { const mbfl_encoding *to; }; -mbfl_buffer_converter * mbfl_buffer_converter_new(enum mbfl_no_encoding from, enum mbfl_no_encoding to, int buf_initsz); -void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd); -void mbfl_buffer_converter_reset(mbfl_buffer_converter *convd); -int mbfl_buffer_converter_illegal_mode(mbfl_buffer_converter *convd, int mode); -int mbfl_buffer_converter_illegal_substchar(mbfl_buffer_converter *convd, int substchar); -int mbfl_buffer_converter_strncat(mbfl_buffer_converter *convd, const unsigned char *p, int n); -int mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string); -int mbfl_buffer_converter_flush(mbfl_buffer_converter *convd); -mbfl_string * mbfl_buffer_converter_getbuffer(mbfl_buffer_converter *convd, mbfl_string *result); -mbfl_string * mbfl_buffer_converter_result(mbfl_buffer_converter *convd, mbfl_string *result); -mbfl_string * mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string, mbfl_string *result); +MBFLAPI extern mbfl_buffer_converter * mbfl_buffer_converter_new(enum mbfl_no_encoding from, enum mbfl_no_encoding to, int buf_initsz); +MBFLAPI extern void mbfl_buffer_converter_delete(mbfl_buffer_converter *convd); +MBFLAPI extern void mbfl_buffer_converter_reset(mbfl_buffer_converter *convd); +MBFLAPI extern int mbfl_buffer_converter_illegal_mode(mbfl_buffer_converter *convd, int mode); +MBFLAPI extern int mbfl_buffer_converter_illegal_substchar(mbfl_buffer_converter *convd, int substchar); +MBFLAPI extern int mbfl_buffer_converter_strncat(mbfl_buffer_converter *convd, const unsigned char *p, int n); +MBFLAPI extern int mbfl_buffer_converter_feed(mbfl_buffer_converter *convd, mbfl_string *string); +MBFLAPI extern int mbfl_buffer_converter_flush(mbfl_buffer_converter *convd); +MBFLAPI extern mbfl_string * mbfl_buffer_converter_getbuffer(mbfl_buffer_converter *convd, mbfl_string *result); +MBFLAPI extern mbfl_string * mbfl_buffer_converter_result(mbfl_buffer_converter *convd, mbfl_string *result); +MBFLAPI extern mbfl_string * mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *string, mbfl_string *result); /* * encoding detector @@ -147,78 +140,78 @@ struct _mbfl_encoding_detector { int filter_list_size; }; -mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz); -void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); -int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); -enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); +MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int eliztsz); +MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); +MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); +MBFLAPI extern enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); /* * encoding converter */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_convert_encoding(mbfl_string *string, mbfl_string *result, enum mbfl_no_encoding toenc); /* * identify encoding */ -const mbfl_encoding * +MBFLAPI extern const mbfl_encoding * mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict); -const char * +MBFLAPI extern const char * mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz, int strict); -const enum mbfl_no_encoding +MBFLAPI extern const enum mbfl_no_encoding mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int eliztsz); /* * strlen */ -int +MBFLAPI extern int mbfl_strlen(mbfl_string *string); /* * oddlen */ -int +MBFLAPI extern int mbfl_oddlen(mbfl_string *string); /* * strpos */ -int +MBFLAPI extern int mbfl_strpos(mbfl_string *haystack, mbfl_string *needle, int offset, int reverse); /* * substr_count */ -int +MBFLAPI extern int mbfl_substr_count(mbfl_string *haystack, mbfl_string *needle); /* * substr */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_substr(mbfl_string *string, mbfl_string *result, int from, int length); /* * strcut */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_strcut(mbfl_string *string, mbfl_string *result, int from, int length); /* * strwidth */ -int +MBFLAPI extern int mbfl_strwidth(mbfl_string *string); /* * strimwidth */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_strimwidth(mbfl_string *string, mbfl_string *marker, mbfl_string *result, int from, int width); /* @@ -226,22 +219,22 @@ mbfl_strimwidth(mbfl_string *string, mbfl_string *marker, mbfl_string *result, i */ struct mime_header_encoder_data; /* forward declaration */ -struct mime_header_encoder_data * +MBFLAPI extern struct mime_header_encoder_data * mime_header_encoder_new( enum mbfl_no_encoding incode, enum mbfl_no_encoding outcode, enum mbfl_no_encoding encoding); -void +MBFLAPI extern void mime_header_encoder_delete(struct mime_header_encoder_data *pe); -int +MBFLAPI extern int mime_header_encoder_feed(int c, struct mime_header_encoder_data *pe); -mbfl_string * +MBFLAPI extern mbfl_string * mime_header_encoder_result(struct mime_header_encoder_data *pe, mbfl_string *result); -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_mime_header_encode( mbfl_string *string, mbfl_string *result, enum mbfl_no_encoding outcode, @@ -254,19 +247,19 @@ mbfl_mime_header_encode( */ struct mime_header_decoder_data; /* forward declaration */ -struct mime_header_decoder_data * +MBFLAPI extern struct mime_header_decoder_data * mime_header_decoder_new(enum mbfl_no_encoding outcode); -void +MBFLAPI extern void mime_header_decoder_delete(struct mime_header_decoder_data *pd); -int +MBFLAPI extern int mime_header_decoder_feed(int c, struct mime_header_decoder_data *pd); -mbfl_string * +MBFLAPI extern mbfl_string * mime_header_decoder_result(struct mime_header_decoder_data *pd, mbfl_string *result); -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_mime_header_decode( mbfl_string *string, mbfl_string *result, @@ -276,14 +269,14 @@ mbfl_mime_header_decode( /* * convert HTML numeric entity */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_html_numeric_entity(mbfl_string *string, mbfl_string *result, int *convmap, int mapsize, int type); /* * convert of harfwidth and fullwidth for japanese */ -mbfl_string * +MBFLAPI extern mbfl_string * mbfl_ja_jp_hantozen(mbfl_string *string, mbfl_string *result, int mode); /* diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h index 57bd4b7932..a87c564616 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h @@ -31,8 +31,9 @@ #ifndef MBFL_MBFILTER_8BIT_H #define MBFL_MBFILTER_8BIT_H +#include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_8bit; +MBFLAPI extern const mbfl_encoding mbfl_encoding_8bit; #endif /* MBFL_MBFILTER_8BIT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h index 587b5d642d..49d169c668 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h @@ -30,11 +30,12 @@ #ifndef MBFL_MBFILTER_PASS_H #define MBFL_MBFILTER_PASS_H +#include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_pass; -extern const struct mbfl_convert_vtbl vtbl_pass; +MBFLAPI extern const mbfl_encoding mbfl_encoding_pass; +MBFLAPI extern const struct mbfl_convert_vtbl vtbl_pass; -int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter); +MBFLAPI extern int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_PASS_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h index e7c9563b75..9e9396a77f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h @@ -31,8 +31,9 @@ #ifndef MBFL_MBFILTER_WCHAR_H #define MBFL_MBFILTER_WCHAR_H +#include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_wchar; +MBFLAPI extern const mbfl_encoding mbfl_encoding_wchar; #endif /* MBFL_MBFILTER_WCHAR_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h index 47f8397104..abad719936 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h @@ -31,6 +31,8 @@ #ifndef MBFL_ALLOCATORS_H #define MBFL_ALLOCATORS_H +#include "mbfl_defs.h" + typedef struct _mbfl_allocators { void *(*malloc)(unsigned int); void *(*realloc)(void *, unsigned int); @@ -41,7 +43,7 @@ typedef struct _mbfl_allocators { void (*pfree)(void *); } mbfl_allocators; -extern mbfl_allocators *__mbfl_allocators; +MBFLAPI extern mbfl_allocators *__mbfl_allocators; #define mbfl_malloc __mbfl_allocators->malloc #define mbfl_realloc __mbfl_allocators->realloc diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h index 7265467127..9499448677 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h @@ -31,6 +31,7 @@ #ifndef MBFL_CONVERT_H #define MBFL_CONVERT_H +#include "mbfl_defs.h" #include "mbfl_encoding.h" #include "mbfl_memory_device.h" @@ -61,28 +62,28 @@ struct mbfl_convert_vtbl { int (*filter_flush)(mbfl_convert_filter *filter); }; -extern const struct mbfl_convert_vtbl *mbfl_convert_filter_list[]; +MBFLAPI extern const struct mbfl_convert_vtbl *mbfl_convert_filter_list[]; -mbfl_convert_filter *mbfl_convert_filter_new( +MBFLAPI extern mbfl_convert_filter *mbfl_convert_filter_new( enum mbfl_no_encoding from, enum mbfl_no_encoding to, int (*output_function)(int, void *), int (*flush_function)(void *), void *data ); -void mbfl_convert_filter_delete(mbfl_convert_filter *filter); -int mbfl_convert_filter_feed(int c, mbfl_convert_filter *filter); -int mbfl_convert_filter_flush(mbfl_convert_filter *filter); -void mbfl_convert_filter_reset(mbfl_convert_filter *filter, enum mbfl_no_encoding from, enum mbfl_no_encoding to); -void mbfl_convert_filter_copy(mbfl_convert_filter *src, mbfl_convert_filter *dist); -int mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter); -void mbfl_convert_filter_select_vtbl(mbfl_convert_filter *filter); -const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encoding from, enum mbfl_no_encoding to); +MBFLAPI extern void mbfl_convert_filter_delete(mbfl_convert_filter *filter); +MBFLAPI extern int mbfl_convert_filter_feed(int c, mbfl_convert_filter *filter); +MBFLAPI extern int mbfl_convert_filter_flush(mbfl_convert_filter *filter); +MBFLAPI extern void mbfl_convert_filter_reset(mbfl_convert_filter *filter, enum mbfl_no_encoding from, enum mbfl_no_encoding to); +MBFLAPI extern void mbfl_convert_filter_copy(mbfl_convert_filter *src, mbfl_convert_filter *dist); +MBFLAPI extern int mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter); +MBFLAPI extern void mbfl_convert_filter_select_vtbl(mbfl_convert_filter *filter); +MBFLAPI extern const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encoding from, enum mbfl_no_encoding to); -void mbfl_filt_conv_common_ctor(mbfl_convert_filter *filter); -int mbfl_filt_conv_common_flush(mbfl_convert_filter *filter); -void mbfl_filt_conv_common_dtor(mbfl_convert_filter *filter); +MBFLAPI extern void mbfl_filt_conv_common_ctor(mbfl_convert_filter *filter); +MBFLAPI extern int mbfl_filt_conv_common_flush(mbfl_convert_filter *filter); +MBFLAPI extern void mbfl_filt_conv_common_dtor(mbfl_convert_filter *filter); -int mbfl_convert_filter_devcat(mbfl_convert_filter *filter, mbfl_memory_device *src); -int mbfl_convert_filter_strcat(mbfl_convert_filter *filter, const unsigned char *p); +MBFLAPI extern int mbfl_convert_filter_devcat(mbfl_convert_filter *filter, mbfl_memory_device *src); +MBFLAPI extern int mbfl_convert_filter_strcat(mbfl_convert_filter *filter, const unsigned char *p); #endif /* MBFL_CONVERT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_defs.h b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h new file mode 100755 index 0000000000..6816bd39f7 --- /dev/null +++ b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h @@ -0,0 +1,52 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software 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 "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * The source code included in this files was separated from mbfilter.h + * by Moriyoshi Koizumi on 20 Dec 2002. The file + * mbfilter.h is included in this package . + * + */ + +#ifndef MBFL_DEFS_H +#define MBFL_DEFS_H + +#ifndef NULL +#ifdef __cplusplus +#define NULL (0L) +#else +#define NULL (void *)(0L) +#endif +#endif + +#ifdef WIN32 +#ifdef MBFL_DLL_EXPORT +#define MBFLAPI __declspec(dllexport) +#else +#define MBFLAPI __declspec(dllimport) +#endif +#else +#define MBFLAPI +#endif + +#endif /* MBFL_DEFS_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index 4d038a13c8..d8df593e7d 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -31,6 +31,8 @@ #ifndef MBFL_ENCODING_H #define MBFL_ENCODING_H +#include "mbfl_defs.h" + enum mbfl_no_encoding { mbfl_no_encoding_invalid = -1, mbfl_no_encoding_pass, @@ -112,12 +114,12 @@ typedef struct _mbfl_encoding { unsigned int flag; } mbfl_encoding; -const mbfl_encoding * mbfl_name2encoding(const char *name); -const mbfl_encoding * mbfl_no2encoding(enum mbfl_no_encoding no_encoding); -enum mbfl_no_encoding mbfl_name2no_encoding(const char *name); -const char * mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding); -const char * mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding); -int mbfl_is_support_encoding(const char *name); +MBFLAPI extern const mbfl_encoding * mbfl_name2encoding(const char *name); +MBFLAPI extern const mbfl_encoding * mbfl_no2encoding(enum mbfl_no_encoding no_encoding); +MBFLAPI extern enum mbfl_no_encoding mbfl_name2no_encoding(const char *name); +MBFLAPI extern const char * mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding); +MBFLAPI extern const char * mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding); +MBFLAPI extern int mbfl_is_support_encoding(const char *name); #endif /* MBFL_ENCODING_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h index 127ca7a419..ce5192935e 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h @@ -31,7 +31,7 @@ #ifndef MBFL_FILTER_OUTPUT_H #define MBFL_FILTER_OUTPUT_H -int mbfl_filter_output_pipe(int c, void* data); -int mbfl_filter_output_null(int c, void* data); +MBFLAPI extern int mbfl_filter_output_pipe(int c, void* data); +MBFLAPI extern int mbfl_filter_output_null(int c, void* data); #endif /* MBFL_FILTER_OUTPUT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h index b876f80d95..e66513bd71 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.h @@ -31,6 +31,7 @@ #ifndef MBFL_IDENT_H #define MBFL_IDENT_H +#include "mbfl_defs.h" #include "mbfl_encoding.h" /* @@ -55,17 +56,17 @@ struct mbfl_identify_vtbl { int (*filter_function)(int c, mbfl_identify_filter *filter); }; -void mbfl_identify_filter_set_vtbl(mbfl_identify_filter *filter, const struct mbfl_identify_vtbl *vtbl); -const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_encoding encoding); -void mbfl_identify_filter_select_vtbl(mbfl_identify_filter *filter); -mbfl_identify_filter * mbfl_identify_filter_new(enum mbfl_no_encoding encoding); -void mbfl_identify_filter_delete(mbfl_identify_filter *filter); +MBFLAPI extern void mbfl_identify_filter_set_vtbl(mbfl_identify_filter *filter, const struct mbfl_identify_vtbl *vtbl); +MBFLAPI extern const struct mbfl_identify_vtbl * mbfl_identify_filter_get_vtbl(enum mbfl_no_encoding encoding); +MBFLAPI extern void mbfl_identify_filter_select_vtbl(mbfl_identify_filter *filter); +MBFLAPI extern mbfl_identify_filter * mbfl_identify_filter_new(enum mbfl_no_encoding encoding); +MBFLAPI extern void mbfl_identify_filter_delete(mbfl_identify_filter *filter); -void mbfl_filt_ident_common_ctor(mbfl_identify_filter *filter); -void mbfl_filt_ident_common_dtor(mbfl_identify_filter *filter); -void mbfl_filt_ident_false_ctor(mbfl_identify_filter *filter); +MBFLAPI extern void mbfl_filt_ident_common_ctor(mbfl_identify_filter *filter); +MBFLAPI extern void mbfl_filt_ident_common_dtor(mbfl_identify_filter *filter); +MBFLAPI extern void mbfl_filt_ident_false_ctor(mbfl_identify_filter *filter); -int mbfl_filt_ident_false(int c, mbfl_identify_filter *filter); -int mbfl_filt_ident_true(int c, mbfl_identify_filter *filter); +MBFLAPI extern int mbfl_filt_ident_false(int c, mbfl_identify_filter *filter); +MBFLAPI extern int mbfl_filt_ident_true(int c, mbfl_identify_filter *filter); #endif /* MBFL_IDENT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.h b/ext/mbstring/libmbfl/mbfl/mbfl_language.h index e5a1237ce0..7a6dfde4b3 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.h @@ -31,6 +31,7 @@ #ifndef MBFL_LANGUAGE_H #define MBFL_LANGUAGE_H +#include "mbfl_defs.h" #include "mbfl_encoding.h" enum mbfl_no_language { @@ -74,10 +75,10 @@ typedef struct _mbfl_language { enum mbfl_no_encoding mail_body_encoding; } mbfl_language; -const mbfl_language * mbfl_name2language(const char *name); -const mbfl_language * mbfl_no2language(enum mbfl_no_language no_language); -enum mbfl_no_language mbfl_name2no_language(const char *name); -const char * mbfl_no_language2name(enum mbfl_no_language no_language); +MBFLAPI extern const mbfl_language * mbfl_name2language(const char *name); +MBFLAPI extern const mbfl_language * mbfl_no2language(enum mbfl_no_language no_language); +MBFLAPI extern enum mbfl_no_language mbfl_name2no_language(const char *name); +MBFLAPI extern const char * mbfl_no_language2name(enum mbfl_no_language no_language); #endif /* MBFL_LANGUAGE_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.h b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.h index b87e4907c7..a2c1c4089f 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.h @@ -31,6 +31,7 @@ #ifndef MBFL_MEMORY_DEVICE_H #define MBFL_MEMORY_DEVICE_H +#include "mbfl_defs.h" #include "mbfl_string.h" #define MBFL_MEMORY_DEVICE_ALLOC_SIZE 64 @@ -49,20 +50,22 @@ typedef struct _mbfl_wchar_device { int allocsz; } mbfl_wchar_device; -void mbfl_memory_device_init(mbfl_memory_device *device, int initsz, int allocsz); -void mbfl_memory_device_realloc(mbfl_memory_device *device, int initsz, int allocsz); -void mbfl_memory_device_clear(mbfl_memory_device *device); -void mbfl_memory_device_reset(mbfl_memory_device *device); -mbfl_string * mbfl_memory_device_result(mbfl_memory_device *device, mbfl_string *result); -int mbfl_memory_device_output(int c, void *data); -int mbfl_memory_device_output2(int c, void *data); -int mbfl_memory_device_output4(int c, void *data); -int mbfl_memory_device_strcat(mbfl_memory_device *device, const char *psrc); -int mbfl_memory_device_strncat(mbfl_memory_device *device, const char *psrc, int len); -int mbfl_memory_device_devcat(mbfl_memory_device *dest, mbfl_memory_device *src); +MBFLAPI extern void mbfl_memory_device_init(mbfl_memory_device *device, int initsz, int allocsz); +MBFLAPI extern void mbfl_memory_device_realloc(mbfl_memory_device *device, int initsz, int allocsz); +MBFLAPI extern void mbfl_memory_device_clear(mbfl_memory_device *device); +MBFLAPI extern void mbfl_memory_device_reset(mbfl_memory_device *device); +MBFLAPI extern mbfl_string * mbfl_memory_device_result(mbfl_memory_device *device, mbfl_string *result); +MBFLAPI extern void mbfl_memory_device_unput(mbfl_memory_device *device); +MBFLAPI extern int mbfl_memory_device_output(int c, void *data); +MBFLAPI extern int mbfl_memory_device_output2(int c, void *data); +MBFLAPI extern int mbfl_memory_device_output4(int c, void *data); +MBFLAPI extern int mbfl_memory_device_strcat(mbfl_memory_device *device, const char *psrc); +MBFLAPI extern int mbfl_memory_device_strncat(mbfl_memory_device *device, const char *psrc, int len); +MBFLAPI extern int mbfl_memory_device_devcat(mbfl_memory_device *dest, mbfl_memory_device *src); -void mbfl_wchar_device_init(mbfl_wchar_device *device); -int mbfl_wchar_device_output(int c, void *data); +MBFLAPI extern void mbfl_wchar_device_init(mbfl_wchar_device *device); +MBFLAPI extern int mbfl_wchar_device_output(int c, void *data); +MBFLAPI extern void mbfl_wchar_device_clear(mbfl_wchar_device *device); diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_string.h b/ext/mbstring/libmbfl/mbfl/mbfl_string.h index 27c7ad1d9c..d1121319a3 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_string.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_string.h @@ -31,6 +31,7 @@ #ifndef MBFL_STRING_H #define MBFL_STRING_H +#include "mbfl_defs.h" #include "mbfl_encoding.h" #include "mbfl_language.h" @@ -44,9 +45,9 @@ typedef struct _mbfl_string { unsigned int len; } mbfl_string; -void mbfl_string_init(mbfl_string *string); -void mbfl_string_init_set(mbfl_string *string, mbfl_language_id no_language, mbfl_encoding_id no_encoding); -void mbfl_string_clear(mbfl_string *string); +MBFLAPI extern void mbfl_string_init(mbfl_string *string); +MBFLAPI extern void mbfl_string_init_set(mbfl_string *string, mbfl_language_id no_language, mbfl_encoding_id no_encoding); +MBFLAPI extern void mbfl_string_clear(mbfl_string *string); #ifndef NULL #define NULL 0 diff --git a/ext/mbstring/libmbfl/missing b/ext/mbstring/libmbfl/missing deleted file mode 100755 index 6a37006e8f..0000000000 --- a/ext/mbstring/libmbfl/missing +++ /dev/null @@ -1,336 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program 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 General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.4 - GNU automake" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. - You can get \`$1Help2man' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/ext/mbstring/libmbfl/rules.mak.bcc32 b/ext/mbstring/libmbfl/rules.mak.bcc32 index 506b1bc40e..50fafa96b1 100644 --- a/ext/mbstring/libmbfl/rules.mak.bcc32 +++ b/ext/mbstring/libmbfl/rules.mak.bcc32 @@ -1,5 +1,5 @@ .suffixes .c -CFLAGS=-DHAVE_CONFIG_H -DMBFL_DLL_EXPORT -u +CFLAGS=-DHAVE_CONFIG_H -DMBFL_DLL_EXPORT -DWIN32 INCLUDES=-I. -I.. LIBS=import32.lib cw32mt.lib c0d32.obj LDFLAGS=-c -Tpd -Gn -- 2.40.0