[devel] Removed string/memory macros that are no longer used

and are not necessarily fully supportable, particularly png_strncpy and
png_snprintf.
This commit is contained in:
John Bowler 2011-06-11 06:58:46 -05:00 committed by Glenn Randers-Pehrson
parent 59a6c379dd
commit 6a1dc2329a
3 changed files with 4 additions and 9 deletions

View File

@ -175,6 +175,8 @@ Version 1.5.3beta11 [June 11, 2011]
Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows
pngvalid to build when ALPHA_MODE is not supported, which is required if
it is to build on libpng 1.4.
Removed string/memory macros that are no longer used and are not
necessarily fully supportable, particularly png_strncpy and png_snprintf.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -3438,6 +3438,8 @@ Version 1.5.3beta11 [June 11, 2011]
Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows
pngvalid to build when ALPHA_MODE is not supported, which is required if
it is to build on libpng 1.4.
Removed string/memory macros that are no longer used and are not
necessarily fully supportable, particularly png_strncpy and png_snprintf.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -222,34 +222,25 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
# define NOCHECK 0
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
# define png_strcpy _fstrcpy
# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
# define png_strlen _fstrlen
# define png_memcmp _fmemcmp /* SJT: added */
# define png_memcpy _fmemcpy
# define png_memset _fmemset
# define png_sprintf sprintf
#else
# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
# define CVT_PTR(ptr) (ptr)
# define CVT_PTR_NOCHECK(ptr) (ptr)
# define png_strcpy lstrcpyA
# define png_strncpy lstrcpynA
# define png_strlen lstrlenA
# define png_memcmp memcmp
# define png_memcpy CopyMemory
# define png_memset memset
# define png_sprintf wsprintfA
# else
# define CVT_PTR(ptr) (ptr)
# define CVT_PTR_NOCHECK(ptr) (ptr)
# define png_strcpy strcpy
# define png_strncpy strncpy /* Added to v 1.2.6 */
# define png_strlen strlen
# define png_memcmp memcmp /* SJT: added */
# define png_memcpy memcpy
# define png_memset memset
# define png_sprintf sprintf
# endif
#endif
/* End of memory model/platform independent support */