diff options
Diffstat (limited to 'xdelta3/xdelta3-internal.h')
-rw-r--r-- | xdelta3/xdelta3-internal.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/xdelta3/xdelta3-internal.h b/xdelta3/xdelta3-internal.h index e0c561f..ed5ca2a 100644 --- a/xdelta3/xdelta3-internal.h +++ b/xdelta3/xdelta3-internal.h | |||
@@ -136,41 +136,6 @@ struct _main_file | |||
136 | int seek_failed; /* after seek fails once, try FIFO */ | 136 | int seek_failed; /* after seek fails once, try FIFO */ |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #ifdef _WIN32 | ||
140 | #define vsnprintf_func _vsnprintf | ||
141 | #define snprintf_func _snprintf | ||
142 | #else | ||
143 | #define vsnprintf_func vsnprintf | ||
144 | #define snprintf_func snprintf | ||
145 | #endif | ||
146 | #define short_sprintf(sb,fmt,...) \ | ||
147 | snprintf_func((sb).buf,sizeof((sb).buf),fmt,__VA_ARGS__) | ||
148 | |||
149 | /* Type used for short snprintf calls. */ | ||
150 | typedef struct { | ||
151 | char buf[48]; | ||
152 | } shortbuf; | ||
153 | |||
154 | /* Prior to SVN 303 this function was only defined in DJGPP and WIN32 | ||
155 | * environments and other platforms would use the builtin snprintf() | ||
156 | * with an arrangement of macros below. In OS X 10.6, Apple made | ||
157 | * snprintf() a macro, which defeated those macros (since snprintf | ||
158 | * would be evaluated before its argument macros were expanded, | ||
159 | * therefore always define xsnprintf_func. */ | ||
160 | #ifndef PRINTF_ATTRIBUTE | ||
161 | #define PRINTF_ATTRIBUTE(x,y) __attribute__ ((__format__ (__printf__, x, y))) | ||
162 | #endif | ||
163 | |||
164 | /* Underlying xprintf() */ | ||
165 | int xsnprintf_func (char *str, size_t n, const char *fmt, ...) | ||
166 | PRINTF_ATTRIBUTE(3,4); | ||
167 | |||
168 | /* XPR(NT "", ...) (used by main) prefixes an "xdelta3: " to the output. */ | ||
169 | void xprintf(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); | ||
170 | #define XPR xprintf | ||
171 | #define NT "xdelta3: " | ||
172 | #define NTR "" | ||
173 | |||
174 | #ifndef UINT32_MAX | 139 | #ifndef UINT32_MAX |
175 | #define UINT32_MAX 4294967295U | 140 | #define UINT32_MAX 4294967295U |
176 | #endif | 141 | #endif |