PHP_MBSTRING_ADD_INCLUDE([libmbfl])
PHP_MBSTRING_ADD_INCLUDE([libmbfl/mbfl])
PHP_MBSTRING_ADD_CONFIG_HEADER([libmbfl/config.h])
+ PHP_MBSTRING_ADD_CFLAG([-DHAVE_LIBMBFL_CONFIG_H=1])
PHP_MBSTRING_ADD_SOURCES([
libmbfl/filters/html_entities.c
* if not, write to the Free Software Foundation, Inc., 59 Temple Place,
* Suite 330, Boston, MA 02111-1307 USA
*
- * The author of this part: Marcus Boerger <marcus.boerger@t-online.de>
+ * The author of this part: Marcus Boerger <helly@php.net>
*
*/
/*
* if not, write to the Free Software Foundation, Inc., 59 Temple Place,
* Suite 330, Boston, MA 02111-1307 USA
*
- * The author of this part: Marcus Boerger <marcus.boerger@t-online.de>
+ * The author of this part: Marcus Boerger <helly@php.net>
*
*/
/*
* if not, write to the Free Software Foundation, Inc., 59 Temple Place,
* Suite 330, Boston, MA 02111-1307 USA
*
- * The author of this part: Marcus Boerger <marcus.boerger@t-online.de>
+ * The author of this part: Marcus Boerger <helly@php.net>
*
*/
/*
#include "mbfl_defs.h"
#include "mbfilter.h"
-MBFLAPI extern const mbfl_encoding mbfl_encoding_8bit;
+extern const mbfl_encoding mbfl_encoding_8bit;
#endif /* MBFL_MBFILTER_8BIT_H */
#include "mbfl_defs.h"
#include "mbfilter.h"
-MBFLAPI extern const mbfl_encoding mbfl_encoding_pass;
-MBFLAPI extern const struct mbfl_convert_vtbl vtbl_pass;
+extern const mbfl_encoding mbfl_encoding_pass;
+extern const struct mbfl_convert_vtbl vtbl_pass;
MBFLAPI extern int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter);
#include "mbfl_defs.h"
#include "mbfilter.h"
-MBFLAPI extern const mbfl_encoding mbfl_encoding_wchar;
+extern const mbfl_encoding mbfl_encoding_wchar;
#endif /* MBFL_MBFILTER_WCHAR_H */
MBFLAPI extern mbfl_allocators *__mbfl_allocators;
-#define mbfl_malloc __mbfl_allocators->malloc
-#define mbfl_realloc __mbfl_allocators->realloc
-#define mbfl_calloc __mbfl_allocators->calloc
-#define mbfl_free __mbfl_allocators->free
-#define mbfl_pmalloc __mbfl_allocators->pmalloc
-#define mbfl_prealloc __mbfl_allocators->preallloc
-#define mbfl_pfree __mbfl_allocators->pfree
+#define mbfl_malloc (__mbfl_allocators->malloc)
+#define mbfl_realloc (__mbfl_allocators->realloc)
+#define mbfl_calloc (__mbfl_allocators->calloc)
+#define mbfl_free (__mbfl_allocators->free)
+#define mbfl_pmalloc (__mbfl_allocators->pmalloc)
+#define mbfl_prealloc (__mbfl_allocators->preallloc)
+#define mbfl_pfree (__mbfl_allocators->pfree)
#endif /* MBFL_ALLOCATORS_H */
};
#endif
-#if defined(HAVE_MBSTR_CN) & !defined(HAVE_MBSTR_JA)
+#if defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
mbfl_no_encoding_ascii,
mbfl_no_encoding_utf8,
};
#endif
-#if defined(HAVE_MBSTR_TW) & !defined(HAVE_MBSTR_CN) & !defined(HAVE_MBSTR_JA)
+#if defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
mbfl_no_encoding_ascii,
mbfl_no_encoding_utf8,
};
#endif
-#if defined(HAVE_MBSTR_KR) & !defined(HAVE_MBSTR_TW) & !defined(HAVE_MBSTR_CN) & !defined(HAVE_MBSTR_JA)
+#if defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
mbfl_no_encoding_ascii,
mbfl_no_encoding_utf8,
};
#endif
-#if defined(HAVE_MBSTR_RU) & !defined(HAVE_MBSTR_KR) & !defined(HAVE_MBSTR_TW) & !defined(HAVE_MBSTR_CN) & !defined(HAVE_MBSTR_JA)
+#if defined(HAVE_MBSTR_RU) && !defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
mbfl_no_encoding_ascii,
mbfl_no_encoding_utf8,
};
#endif
-#if !defined(HAVE_MBSTR_RU) & !defined(HAVE_MBSTR_KR) & !defined(HAVE_MBSTR_TW) & !defined(HAVE_MBSTR_CN) & !defined(HAVE_MBSTR_JA)
+#if !defined(HAVE_MBSTR_RU) && !defined(HAVE_MBSTR_KR) && !defined(HAVE_MBSTR_TW) && !defined(HAVE_MBSTR_CN) && !defined(HAVE_MBSTR_JA)
static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
mbfl_no_encoding_ascii,
mbfl_no_encoding_utf8
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\php_mbregex.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\php_unicode.c\r
\r
!IF "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\php_mbregex.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\php_unicode.h\r
\r
!IF "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"\r
# PROP Default_Filter ""\r
# Begin Source File\r
\r
-SOURCE=.\libmbfl\config.h\r
+SOURCE=.\libmbfl\config.h.vc6\r
+\r
+!IF "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"\r
+\r
+# Begin Custom Build\r
+InputDir=.\libmbfl\r
+InputPath=.\libmbfl\config.h.vc6\r
+\r
+"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"\r
+\r
+# End Custom Build\r
+\r
+!ELSEIF "$(CFG)" == "mbstring - Win32 Debug_TS MBSTRING"\r
+\r
+# Begin Custom Build\r
+InputDir=.\libmbfl\r
+InputPath=.\libmbfl\config.h.vc6\r
+\r
+"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"\r
+\r
+# End Custom Build\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
# End Source File\r
# End Group\r
# End Group\r
+# Begin Group "oniguruma"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Group "Source Files No. 2"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regcomp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regerror.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regexec.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\reggnu.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regparse.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regposerr.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files No. 2"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\win32\config.h\r
+\r
+!IF "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"\r
+\r
+# Begin Custom Build\r
+InputDir=.\oniguruma\win32\r
+InputPath=.\oniguruma\win32\config.h\r
+\r
+"$(InputDir)\..\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ copy $(InputDir)\config.h "$(InputDir)\..\config.h"\r
+\r
+# End Custom Build\r
+\r
+!ELSEIF "$(CFG)" == "mbstring - Win32 Debug_TS MBSTRING"\r
+\r
+# Begin Custom Build\r
+InputDir=.\oniguruma\win32\r
+InputPath=.\oniguruma\win32\config.h\r
+\r
+"$(InputDir)\..\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
+ copy $(InputDir)\config.h "$(InputDir)\..\config.h"\r
+\r
+# End Custom Build\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\onigposix.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\oniguruma.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\php_compat.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regint.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\oniguruma\regparse.h\r
+# End Source File\r
+# End Group\r
+# End Group\r
# End Target\r
# End Project\r
}
} else { /* nomatch */
/* stick that last bit of string on our output */
- smart_str_appendl(&out_buf, pos, (size_t)((UChar *)(string + string_len) - pos));
+ if ((UChar *)(string + string_len) > pos)
+ smart_str_appendl(&out_buf, pos, (size_t)((UChar *)(string + string_len) - pos));
}
php_mb_regex_region_free(regs, 0);
}
#endif /* HAVE_MBREGEX */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: noet sw=4 ts=4
+ */