diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2012-06-27 06:34:27 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2012-06-27 06:34:27 +0000 |
commit | 65aa190617d32e4778c2b553e0f069028cf975d9 (patch) | |
tree | 62444b28932769046054f1c2733b43f1f0e6d009 /xdelta3/xdelta3-internal.h | |
parent | 682e6c256ce25420951faf89ec104abb856deea8 (diff) |
remove strcat, sprintf
Diffstat (limited to 'xdelta3/xdelta3-internal.h')
-rw-r--r-- | xdelta3/xdelta3-internal.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xdelta3/xdelta3-internal.h b/xdelta3/xdelta3-internal.h index fd01208..871bcfb 100644 --- a/xdelta3/xdelta3-internal.h +++ b/xdelta3/xdelta3-internal.h | |||
@@ -95,11 +95,19 @@ struct _main_file | |||
95 | * absence of the '_' prefix) but they were initially buggy. So, | 95 | * absence of the '_' prefix) but they were initially buggy. So, |
96 | * always use the native '_'-prefixed version with Win32. */ | 96 | * always use the native '_'-prefixed version with Win32. */ |
97 | #ifdef _WIN32 | 97 | #ifdef _WIN32 |
98 | #define vsnprintf_func _vsnprintf | 98 | #define vsnprintf_func(str,size,fmt,args) \ |
99 | _vsnprintf_s(str,size,size-1,fmt,args) | ||
99 | #else | 100 | #else |
100 | #define vsnprintf_func vsnprintf | 101 | #define vsnprintf_func vsnprintf |
102 | #define short_sprintf(sb,fmt,...) \ | ||
103 | snprintf((sb).buf,sizeof((sb).buf),fmt,__VA_ARGS__) | ||
101 | #endif | 104 | #endif |
102 | 105 | ||
106 | /* Type used for short snprintf calls. */ | ||
107 | typedef struct { | ||
108 | char buf[48]; | ||
109 | } shortbuf; | ||
110 | |||
103 | /* Prior to SVN 303 this function was only defined in DJGPP and WIN32 | 111 | /* Prior to SVN 303 this function was only defined in DJGPP and WIN32 |
104 | * environments and other platforms would use the builtin snprintf() | 112 | * environments and other platforms would use the builtin snprintf() |
105 | * with an arrangement of macros below. In OS X 10.6, Apply made | 113 | * with an arrangement of macros below. In OS X 10.6, Apply made |