source:
trunk/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch@
858
Last change on this file since 858 was 2, checked in by , 16 years ago | |
---|---|
File size: 15.9 KB |
-
compress.c
old new 59 59 60 60 /* =========================================================================== 61 61 */ 62 int ZEXPORT compress (dest, destLen, source, sourceLen)62 int ZEXPORT compress (dest, destLen, source, sourceLen) 63 63 Bytef *dest; 64 64 uLongf *destLen; 65 65 const Bytef *source; -
gzio.c
old new 205 205 /* =========================================================================== 206 206 Opens a gzip (.gz) file for reading or writing. 207 207 */ 208 gzFile ZEXPORT gzopen (path, mode)208 gzFile ZEXPORT gzopen (path, mode) 209 209 const char *path; 210 210 const char *mode; 211 211 { … … 391 391 Reads the given number of uncompressed bytes from the compressed file. 392 392 gzread returns the number of bytes actually read (0 for end of file). 393 393 */ 394 int ZEXPORT gzread (file, buf, len)394 int ZEXPORT gzread (file, buf, len) 395 395 gzFile file; 396 396 voidp buf; 397 397 unsigned len; … … 600 600 #ifdef STDC 601 601 #include <stdarg.h> 602 602 603 int ZEXPORTVAgzprintf (gzFile file, const char *format, /* args */ ...)603 int gzprintf (gzFile file, const char *format, /* args */ ...) 604 604 { 605 605 char buf[Z_PRINTF_BUFSIZE]; 606 606 va_list va; … … 634 634 } 635 635 #else /* not ANSI C */ 636 636 637 int ZEXPORTVAgzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,637 int gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, 638 638 a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) 639 639 gzFile file; 640 640 const char *format; … … 950 950 Flushes all pending output if necessary, closes the compressed file 951 951 and deallocates all the (de)compression state. 952 952 */ 953 int ZEXPORT gzclose (file)953 int ZEXPORT gzclose (file) 954 954 gzFile file; 955 955 { 956 956 gz_stream *s = (gz_stream*)file; -
uncompr.c
old new 23 23 enough memory, Z_BUF_ERROR if there was not enough room in the output 24 24 buffer, or Z_DATA_ERROR if the input data was corrupted. 25 25 */ 26 int ZEXPORT uncompress (dest, destLen, source, sourceLen)26 int ZEXPORT uncompress (dest, destLen, source, sourceLen) 27 27 Bytef *dest; 28 28 uLongf *destLen; 29 29 const Bytef *source; -
zlib.h
old new 32 32 #define ZLIB_H 33 33 34 34 #include "zconf.h" 35 35 36 36 37 #ifdef __cplusplus 37 38 extern "C" { … … 40 41 #define ZLIB_VERSION "1.2.3" 41 42 #define ZLIB_VERNUM 0x1230 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 43 57 /* 44 58 The 'zlib' compression library provides in-memory compression and 45 59 decompression functions, including integrity checks of the uncompressed … … 209 223 210 224 /* basic functions */ 211 225 212 ZEXTERN const char * ZEXPORTzlibVersion OF((void));226 ZEXTERN zlibVersion OF((void)); 213 227 /* The application can compare zlibVersion and ZLIB_VERSION for consistency. 214 228 If the first character differs, the library code actually used is 215 229 not compatible with the zlib.h header file used by the application. … … 239 253 */ 240 254 241 255 242 ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));256 ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); 243 257 /* 244 258 deflate compresses as much data as possible, and stops when the input 245 259 buffer becomes empty or the output buffer becomes full. It may introduce some … … 325 339 */ 326 340 327 341 328 ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));342 ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); 329 343 /* 330 344 All dynamically allocated data structures for this stream are freed. 331 345 This function discards any unprocessed input and does not flush any … … 360 374 */ 361 375 362 376 363 ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));377 ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); 364 378 /* 365 379 inflate decompresses as much data as possible, and stops when the input 366 380 buffer becomes empty or the output buffer becomes full. It may introduce … … 459 473 */ 460 474 461 475 462 ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));476 ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); 463 477 /* 464 478 All dynamically allocated data structures for this stream are freed. 465 479 This function discards any unprocessed input and does not flush any … … 535 549 not perform any compression: this will be done by deflate(). 536 550 */ 537 551 538 ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,552 ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, 539 553 const Bytef *dictionary, 540 554 uInt dictLength)); 541 555 /* … … 574 588 perform any compression: this will be done by deflate(). 575 589 */ 576 590 577 ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,591 ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, 578 592 z_streamp source)); 579 593 /* 580 594 Sets the destination stream as a complete copy of the source stream. … … 592 606 destination. 593 607 */ 594 608 595 ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));609 ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); 596 610 /* 597 611 This function is equivalent to deflateEnd followed by deflateInit, 598 612 but does not free and reallocate all the internal compression state. … … 603 617 stream state was inconsistent (such as zalloc or state being NULL). 604 618 */ 605 619 606 ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,620 ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, 607 621 int level, 608 622 int strategy)); 609 623 /* … … 733 747 and avail_out are unchanged.) 734 748 */ 735 749 736 ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,750 ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, 737 751 const Bytef *dictionary, 738 752 uInt dictLength)); 739 753 /* … … 755 769 inflate(). 756 770 */ 757 771 758 ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));772 ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); 759 773 /* 760 774 Skips invalid compressed data until a full flush point (see above the 761 775 description of deflate with Z_FULL_FLUSH) can be found, or until all … … 786 800 destination. 787 801 */ 788 802 789 ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));803 ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); 790 804 /* 791 805 This function is equivalent to inflateEnd followed by inflateInit, 792 806 but does not free and reallocate all the internal decompression state. … … 1006 1020 utility functions can easily be modified if you need special options. 1007 1021 */ 1008 1022 1009 ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,1023 ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, 1010 1024 const Bytef *source, uLong sourceLen)); 1011 1025 /* 1012 1026 Compresses the source buffer into the destination buffer. sourceLen is … … 1021 1035 buffer. 1022 1036 */ 1023 1037 1024 ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,1038 ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, 1025 1039 const Bytef *source, uLong sourceLen, 1026 1040 int level)); 1027 1041 /* … … 1044 1058 a compress() or compress2() call to allocate the destination buffer. 1045 1059 */ 1046 1060 1047 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,1061 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, 1048 1062 const Bytef *source, uLong sourceLen)); 1049 1063 /* 1050 1064 Decompresses the source buffer into the destination buffer. sourceLen is … … 1065 1079 1066 1080 typedef voidp gzFile; 1067 1081 1068 ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));1082 ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); 1069 1083 /* 1070 1084 Opens a gzip (.gz) file for reading or writing. The mode parameter 1071 1085 is as in fopen ("rb" or "wb") but can also include a compression level … … 1082 1096 can be checked to distinguish the two cases (if errno is zero, the 1083 1097 zlib error is Z_MEM_ERROR). */ 1084 1098 1085 ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));1099 ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); 1086 1100 /* 1087 1101 gzdopen() associates a gzFile with the file descriptor fd. File 1088 1102 descriptors are obtained from calls like open, dup, creat, pipe or … … 1095 1109 the (de)compression state. 1096 1110 */ 1097 1111 1098 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));1112 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); 1099 1113 /* 1100 1114 Dynamically update the compression level or strategy. See the description 1101 1115 of deflateInit2 for the meaning of these parameters. … … 1103 1117 opened for writing. 1104 1118 */ 1105 1119 1106 ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));1120 ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); 1107 1121 /* 1108 1122 Reads the given number of uncompressed bytes from the compressed file. 1109 1123 If the input file was not in gzip format, gzread copies the given number … … 1111 1125 gzread returns the number of uncompressed bytes actually read (0 for 1112 1126 end of file, -1 for error). */ 1113 1127 1114 ZEXTERN int ZEXPORT gzwrite OF((gzFile file,1128 ZEXTERN int ZEXPORT gzwrite OF((gzFile file, 1115 1129 voidpc buf, unsigned len)); 1116 1130 /* 1117 1131 Writes the given number of uncompressed bytes into the compressed file. … … 1119 1133 (0 in case of error). 1120 1134 */ 1121 1135 1122 ZEXTERN int ZEXPORTVAgzprintf OF((gzFile file, const char *format, ...));1136 ZEXTERN int gzprintf OF((gzFile file, const char *format, ...)); 1123 1137 /* 1124 1138 Converts, formats, and writes the args to the compressed file under 1125 1139 control of the format string, as in fprintf. gzprintf returns the number of … … 1132 1146 because the secure snprintf() or vsnprintf() functions were not available. 1133 1147 */ 1134 1148 1135 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));1149 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); 1136 1150 /* 1137 1151 Writes the given null-terminated string to the compressed file, excluding 1138 1152 the terminating null character. 1139 1153 gzputs returns the number of characters written, or -1 in case of error. 1140 1154 */ 1141 1155 1142 ZEXTERN char * ZEXPORTgzgets OF((gzFile file, char *buf, int len));1156 ZEXTERN gzgets OF((gzFile file, char *buf, int len)); 1143 1157 /* 1144 1158 Reads bytes from the compressed file until len-1 characters are read, or 1145 1159 a newline character is read and transferred to buf, or an end-of-file … … 1148 1162 gzgets returns buf, or Z_NULL in case of error. 1149 1163 */ 1150 1164 1151 ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));1165 ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); 1152 1166 /* 1153 1167 Writes c, converted to an unsigned char, into the compressed file. 1154 1168 gzputc returns the value that was written, or -1 in case of error. 1155 1169 */ 1156 1170 1157 ZEXTERN int ZEXPORT gzgetc OF((gzFile file));1171 ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); 1158 1172 /* 1159 1173 Reads one byte from the compressed file. gzgetc returns this byte 1160 1174 or -1 in case of end of file or error. … … 1170 1184 or gzrewind(). 1171 1185 */ 1172 1186 1173 ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));1187 ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); 1174 1188 /* 1175 1189 Flushes all pending output into the compressed file. The parameter 1176 1190 flush is as in the deflate() function. The return value is the zlib … … 1180 1194 degrade compression. 1181 1195 */ 1182 1196 1183 ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,1197 ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, 1184 1198 z_off_t offset, int whence)); 1185 1199 /* 1186 1200 Sets the starting position for the next gzread or gzwrite on the … … 1198 1212 would be before the current position. 1199 1213 */ 1200 1214 1201 ZEXTERN int ZEXPORT gzrewind OF((gzFile file));1215 ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); 1202 1216 /* 1203 1217 Rewinds the given file. This function is supported only for reading. 1204 1218 1205 1219 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) 1206 1220 */ 1207 1221 1208 ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));1222 ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); 1209 1223 /* 1210 1224 Returns the starting position for the next gzread or gzwrite on the 1211 1225 given compressed file. This position represents a number of bytes in the … … 1214 1228 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) 1215 1229 */ 1216 1230 1217 ZEXTERN int ZEXPORT gzeof OF((gzFile file));1231 ZEXTERN int ZEXPORT gzeof OF((gzFile file)); 1218 1232 /* 1219 1233 Returns 1 when EOF has previously been detected reading the given 1220 1234 input stream, otherwise zero. … … 1226 1240 zero. 1227 1241 */ 1228 1242 1229 ZEXTERN int ZEXPORT gzclose OF((gzFile file));1243 ZEXTERN int ZEXPORT gzclose OF((gzFile file)); 1230 1244 /* 1231 1245 Flushes all pending output if necessary, closes the compressed file 1232 1246 and deallocates all the (de)compression state. The return value is the zlib 1233 1247 error number (see function gzerror below). 1234 1248 */ 1235 1249 1236 ZEXTERN const char * ZEXPORTgzerror OF((gzFile file, int *errnum));1250 ZEXTERN gzerror OF((gzFile file, int *errnum)); 1237 1251 /* 1238 1252 Returns the error message for the last error which occurred on the 1239 1253 given compressed file. errnum is set to zlib error number. If an … … 1257 1271 compression library. 1258 1272 */ 1259 1273 1260 ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));1274 ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); 1261 1275 /* 1262 1276 Update a running Adler-32 checksum with the bytes buf[0..len-1] and 1263 1277 return the updated checksum. If buf is NULL, this function returns … … 1282 1296 seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. 1283 1297 */ 1284 1298 1285 ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));1299 ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); 1286 1300 /* 1287 1301 Update a running CRC-32 with the bytes buf[0..len-1] and return the 1288 1302 updated CRC-32. If buf is NULL, this function returns the required initial … … 1314 1328 /* deflateInit and inflateInit are macros to allow checking the zlib version 1315 1329 * and the compiler's view of z_stream: 1316 1330 */ 1317 ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,1331 ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, 1318 1332 const char *version, int stream_size)); 1319 ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,1333 ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, 1320 1334 const char *version, int stream_size)); 1321 ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,1335 ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, 1322 1336 int windowBits, int memLevel, 1323 1337 int strategy, const char *version, 1324 1338 int stream_size)); 1325 ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,1339 ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, 1326 1340 const char *version, int stream_size)); 1327 1341 ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, 1328 1342 unsigned char FAR *window, … … 1346 1360 struct internal_state {int dummy;}; /* hack for buggy compilers */ 1347 1361 #endif 1348 1362 1349 ZEXTERN const char * ZEXPORTzError OF((int));1350 ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));1351 ZEXTERN const uLongf * ZEXPORTget_crc_table OF((void));1363 ZEXTERN zError OF((int)); 1364 ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); 1365 ZEXTERN get_crc_table OF((void)); 1352 1366 1353 1367 #ifdef __cplusplus 1354 1368 }
Note:
See TracBrowser
for help on using the repository browser.