summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-01-06 12:26:30 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-01-09 23:33:28 +0900
commit09fe3e314bd92cf03adaab2bc6e807345d0419c9 (patch)
treede56060dc69c84a40d3f73c988c26e84c3411657
parent2acbc01f749b1bcdff94e5f8a91089fc99587bfc (diff)
downloadfreetype2-09fe3e314bd92cf03adaab2bc6e807345d0419c9.tar.gz
use ft_strchr() instead of index()
-rw-r--r--include/freetype/config/ftstdlib.h1
-rw-r--r--src/base/ftdbgmem.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index 30ec14e74..db6b2650a 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -81,6 +81,7 @@
#define ft_memmove memmove
#define ft_memset memset
#define ft_strcat strcat
+#define ft_strchr strchr
#define ft_strcmp strcmp
#define ft_strcpy strcpy
#define ft_strlen strlen
diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c
index 3658a0b29..2bea2ff2f 100644
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -525,7 +525,7 @@
return -1;
/* basename not found */
- if ( NULL == ( c = strstr( c, source_basename ) ) )
+ if ( NULL == ( c = ft_strstr( c, source_basename ) ) )
return -1;
/* found position was substring */
@@ -542,9 +542,9 @@
return -1;
/* invalid syntax without max memory space */
- if ( NULL == index( c + 1, ':' ) )
+ if ( NULL == ft_strchr( c + 1, ':' ) )
return -1;
- c = index( c + 1, ':' );
+ c = ft_strchr( c + 1, ':' );
if ( !ft_isdigit( c[1] ) )
return -1;