diff options
Diffstat (limited to 'ext/mbstring')
| -rw-r--r-- | ext/mbstring/config.m4 | 1 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/filters/html_entities.h | 2 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_htmlent.c | 2 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_htmlent.h | 2 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h | 2 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter_pass.h | 4 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h | 2 | ||||
| -rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfl_allocators.h | 14 | ||||
| -rw-r--r-- | ext/mbstring/mbstring.c | 10 | ||||
| -rw-r--r-- | ext/mbstring/mbstring.dsp | 120 | ||||
| -rw-r--r-- | ext/mbstring/php_mbregex.c | 11 | 
11 files changed, 149 insertions, 21 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 3c68accd14..737d53adef 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -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 diff --git a/ext/mbstring/libmbfl/filters/html_entities.h b/ext/mbstring/libmbfl/filters/html_entities.h index e571356da0..99dbfe2630 100644 --- a/ext/mbstring/libmbfl/filters/html_entities.h +++ b/ext/mbstring/libmbfl/filters/html_entities.h @@ -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>   *   */  /* diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index a53a87e597..c9c5390799 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -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>   *   */  /* diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.h b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.h index bf9e9e305e..99827c2303 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.h @@ -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>   *   */  /* diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h index a87c564616..4fc8922605 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h @@ -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 */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h index 49d169c668..087aa2c3be 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h @@ -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); diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h index 9e9396a77f..24bf7473c1 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h @@ -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 */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h index abad719936..a1539f0f37 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h @@ -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 */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 281d41e04d..5170d490d2 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -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 diff --git a/ext/mbstring/mbstring.dsp b/ext/mbstring/mbstring.dsp index d9c7fcc1f3..d3625d4af8 100644 --- a/ext/mbstring/mbstring.dsp +++ b/ext/mbstring/mbstring.dsp @@ -124,6 +124,10 @@ SOURCE=.\mbstring.c  # End Source File
  # Begin Source File
 +SOURCE=.\php_mbregex.c
 +# End Source File
 +# Begin Source File
 +
  SOURCE=.\php_unicode.c
  !IF  "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"
 @@ -173,6 +177,10 @@ SOURCE=.\mbstring.h  # End Source File
  # Begin Source File
 +SOURCE=.\php_mbregex.h
 +# End Source File
 +# Begin Source File
 +
  SOURCE=.\php_unicode.h
  !IF  "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"
 @@ -478,7 +486,32 @@ SOURCE=.\libmbfl\nls\nls_zh.c  # PROP Default_Filter ""
  # Begin Source File
 -SOURCE=.\libmbfl\config.h
 +SOURCE=.\libmbfl\config.h.vc6
 +
 +!IF  "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"
 +
 +# Begin Custom Build
 +InputDir=.\libmbfl
 +InputPath=.\libmbfl\config.h.vc6
 +
 +"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
 +	copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
 +
 +# End Custom Build
 +
 +!ELSEIF  "$(CFG)" == "mbstring - Win32 Debug_TS MBSTRING"
 +
 +# Begin Custom Build
 +InputDir=.\libmbfl
 +InputPath=.\libmbfl\config.h.vc6
 +
 +"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
 +	copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
 +
 +# End Custom Build
 +
 +!ENDIF 
 +
  # End Source File
  # Begin Source File
 @@ -850,5 +883,90 @@ SOURCE=.\libmbfl\filters\unicode_table_uhc.h  # End Source File
  # End Group
  # End Group
 +# Begin Group "oniguruma"
 +
 +# PROP Default_Filter ""
 +# Begin Group "Source Files No. 2"
 +
 +# PROP Default_Filter ""
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regcomp.c
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regerror.c
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regexec.c
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\reggnu.c
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regparse.c
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regposerr.c
 +# End Source File
 +# End Group
 +# Begin Group "Header Files No. 2"
 +
 +# PROP Default_Filter ""
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\win32\config.h
 +
 +!IF  "$(CFG)" == "mbstring - Win32 Release_TS MBSTRING"
 +
 +# Begin Custom Build
 +InputDir=.\oniguruma\win32
 +InputPath=.\oniguruma\win32\config.h
 +
 +"$(InputDir)\..\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
 +	copy $(InputDir)\config.h "$(InputDir)\..\config.h"
 +
 +# End Custom Build
 +
 +!ELSEIF  "$(CFG)" == "mbstring - Win32 Debug_TS MBSTRING"
 +
 +# Begin Custom Build
 +InputDir=.\oniguruma\win32
 +InputPath=.\oniguruma\win32\config.h
 +
 +"$(InputDir)\..\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
 +	copy $(InputDir)\config.h "$(InputDir)\..\config.h"
 +
 +# End Custom Build
 +
 +!ENDIF 
 +
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\onigposix.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\oniguruma.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\php_compat.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regint.h
 +# End Source File
 +# Begin Source File
 +
 +SOURCE=.\oniguruma\regparse.h
 +# End Source File
 +# End Group
 +# End Group
  # End Target
  # End Project
 diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 81a07bc752..18687f7477 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -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 + */  | 
