]> granicus.if.org Git - php/commitdiff
fixed win32-build and update e-mail address in mbstring.
authorRui Hirokawa <hirokawa@php.net>
Tue, 23 Sep 2003 02:43:04 +0000 (02:43 +0000)
committerRui Hirokawa <hirokawa@php.net>
Tue, 23 Sep 2003 02:43:04 +0000 (02:43 +0000)
ext/mbstring/config.m4
ext/mbstring/libmbfl/filters/html_entities.h
ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
ext/mbstring/libmbfl/filters/mbfilter_htmlent.h
ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h
ext/mbstring/libmbfl/mbfl/mbfilter_pass.h
ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h
ext/mbstring/libmbfl/mbfl/mbfl_allocators.h
ext/mbstring/mbstring.c
ext/mbstring/mbstring.dsp
ext/mbstring/php_mbregex.c

index 3c68accd144d5b4fc2aad320cb0165f4ddae6d22..737d53adef159565a8666ff789c96124c42febeb 100644 (file)
@@ -98,6 +98,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [
     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
index e571356da02a77d4808d46b11f02524b8a3c98ba..99dbfe263075b08206556bad27d4618780f7db44 100644 (file)
@@ -18,7 +18,7 @@
  * 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>
  *
  */
 /*
index a53a87e59790520399d16fa2a892046232f1ec33..c9c5390799a5a7868263f2167db24e84b1b83b8d 100644 (file)
@@ -18,7 +18,7 @@
  * 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>
  *
  */
 /*
index bf9e9e305e0e68c4d3daf61f0ae06b7bed722bf1..99827c2303a3c6bfdb4fbceafc32a33060ac5200 100644 (file)
@@ -18,7 +18,7 @@
  * 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>
  *
  */
 /*
index a87c5646162ce97f0f3ac14ca50b34051043e385..4fc89226059e3b8c82f6f9257c57bb8e59fc733e 100644 (file)
@@ -34,6 +34,6 @@
 #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 */
index 49d169c66899d6a86b3b5861b1abfc65ec5e0abf..087aa2c3be5aaab6251db2770e42544197abbb49 100644 (file)
@@ -33,8 +33,8 @@
 #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);
 
index 9e9396a77f716662586a7097cc0247c1a557538c..24bf7473c134f1f393db30fef84fea0a3266a46f 100644 (file)
@@ -34,6 +34,6 @@
 #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 */
index abad71993695f44ec5cd6d789b9abbd907f6e6cf..a1539f0f37bd0ef378a897dbba6189a0014819db 100644 (file)
@@ -45,12 +45,12 @@ typedef struct _mbfl_allocators {
 
 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 */
index 281d41e04d84af97d032532809b43f6e5910970d..5170d490d24b316da83f8d23e856a887bb4d8a1e 100644 (file)
@@ -95,7 +95,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
 };
 #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,
@@ -104,7 +104,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
 };
 #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,
@@ -113,7 +113,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
 };
 #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,
@@ -122,7 +122,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
 };
 #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,
@@ -132,7 +132,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = {
 };
 #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
index d9c7fcc1f3ae7c01ed04d7c19cc2a2e81f8fd8d4..d3625d4af8521879ef3c68afb4a08e33bf436e88 100644 (file)
@@ -124,6 +124,10 @@ SOURCE=.\mbstring.c
 # 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
@@ -173,6 +177,10 @@ SOURCE=.\mbstring.h
 # 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
@@ -478,7 +486,32 @@ SOURCE=.\libmbfl\nls\nls_zh.c
 # 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
@@ -850,5 +883,90 @@ SOURCE=.\libmbfl\filters\unicode_table_uhc.h
 # 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
index 81a07bc752d4183c5013911580bf9fae726fe975..18687f747702d64e5b571d59f2bcfc7180824fb2 100644 (file)
@@ -653,7 +653,8 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, int op
                        }
                } 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);
        }
@@ -1124,3 +1125,11 @@ PHP_FUNCTION(mb_regex_set_options)
 
 #endif /* HAVE_MBREGEX */
 
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: noet sw=4 ts=4
+ */