summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 18:44:56 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 18:44:56 +0000
commit8fb6a68bea8dfa077919fd899f9e86ab6d0ed7ee (patch)
tree074cf4cab2ac5ffda903b7dcf0f237887b35a030 /lib
parenta60180faa7df861ce273cc63846a05f2407c34c4 (diff)
Import freetype 2.2.1
Diffstat (limited to 'lib')
-rw-r--r--lib/freetype/src/base/ftutil.c58
-rw-r--r--lib/freetype/src/tools/cordic.py2
2 files changed, 4 insertions, 56 deletions
diff --git a/lib/freetype/src/base/ftutil.c b/lib/freetype/src/base/ftutil.c
index 5f77be557..7ad780d38 100644
--- a/lib/freetype/src/base/ftutil.c
+++ b/lib/freetype/src/base/ftutil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for memory and list management (body). */
/* */
-/* Copyright 2002, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,16 +120,12 @@
FT_Error error = FT_Err_Ok;
- /* Note that we now accept `item_size == 0' as a valid parameter, in
- * order to cover very weird cases where an ALLOC_MULT macro would be
- * called.
- */
- if ( cur_count < 0 || new_count < 0 || item_size < 0 )
+ if ( cur_count < 0 || new_count < 0 || item_size <= 0 )
{
/* may help catch/prevent nasty security issues */
error = FT_Err_Invalid_Argument;
}
- else if ( new_count == 0 || item_size == 0 )
+ else if ( new_count == 0 )
{
ft_mem_free( memory, block );
block = NULL;
@@ -172,54 +168,6 @@
}
- FT_BASE_DEF( FT_Pointer )
- ft_mem_dup( FT_Memory memory,
- const void* address,
- FT_ULong size,
- FT_Error *p_error )
- {
- FT_Error error;
- FT_Pointer p = ft_mem_qalloc( memory, size, &error );
-
-
- if ( !error && address )
- ft_memcpy( p, address, size );
-
- *p_error = error;
- return p;
- }
-
-
- FT_BASE_DEF( FT_Pointer )
- ft_mem_strdup( FT_Memory memory,
- const char* str,
- FT_Error *p_error )
- {
- FT_ULong len = str ? (FT_ULong)ft_strlen( str ) + 1
- : 0;
-
-
- return ft_mem_dup( memory, str, len, p_error );
- }
-
-
- FT_BASE_DEF( FT_Int )
- ft_mem_strcpyn( char* dst,
- const char* src,
- FT_ULong size )
- {
- while ( size > 1 && *src != 0 )
- {
- *dst++ = *src++;
- size--;
- }
-
- *dst = 0; /* always zero-terminate */
-
- return *src != 0;
- }
-
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
diff --git a/lib/freetype/src/tools/cordic.py b/lib/freetype/src/tools/cordic.py
index 3f80c5f09..1906b6b1f 100644
--- a/lib/freetype/src/tools/cordic.py
+++ b/lib/freetype/src/tools/cordic.py
@@ -76,4 +76,4 @@ print "shrink factor = " + repr( shrink )
print "shrink factor 2 = " + repr( shrink * (2.0**32) )
print "expansion factor = " + repr(1/shrink)
print ""
-
+ \ No newline at end of file