Lines Matching full:err

22 #define CHECK_ERR(err, msg) { \  argument
23 if (err != Z_OK) { \
24 fprintf(stderr, "%s error: %d\n", msg, err); \
62 int err; in test_compress() local
65 err = compress(compr, &comprLen, (const Bytef*)hello, len); in test_compress()
66 CHECK_ERR(err, "compress"); in test_compress()
70 err = uncompress(uncompr, &uncomprLen, compr, comprLen); in test_compress()
71 CHECK_ERR(err, "uncompress"); in test_compress()
88 int err; in test_gzio()
100 fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); in test_gzio()
104 fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); in test_gzio()
118 fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); in test_gzio()
147 fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); in test_gzio()
168 int err; in test_deflate() local
175 err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); in test_deflate()
176 CHECK_ERR(err, "deflateInit"); in test_deflate()
183 err = deflate(&c_stream, Z_NO_FLUSH); in test_deflate()
184 CHECK_ERR(err, "deflate"); in test_deflate()
189 err = deflate(&c_stream, Z_FINISH); in test_deflate()
190 if (err == Z_STREAM_END) break; in test_deflate()
191 CHECK_ERR(err, "deflate"); in test_deflate()
194 err = deflateEnd(&c_stream); in test_deflate()
195 CHECK_ERR(err, "deflateEnd"); in test_deflate()
203 int err; in test_inflate() local
216 err = inflateInit(&d_stream); in test_inflate()
217 CHECK_ERR(err, "inflateInit"); in test_inflate()
221 err = inflate(&d_stream, Z_NO_FLUSH); in test_inflate()
222 if (err == Z_STREAM_END) break; in test_inflate()
223 CHECK_ERR(err, "inflate"); in test_inflate()
226 err = inflateEnd(&d_stream); in test_inflate()
227 CHECK_ERR(err, "inflateEnd"); in test_inflate()
243 int err; in test_large_deflate() local
249 err = deflateInit(&c_stream, Z_BEST_SPEED); in test_large_deflate()
250 CHECK_ERR(err, "deflateInit"); in test_large_deflate()
260 err = deflate(&c_stream, Z_NO_FLUSH); in test_large_deflate()
261 CHECK_ERR(err, "deflate"); in test_large_deflate()
271 err = deflate(&c_stream, Z_NO_FLUSH); in test_large_deflate()
272 CHECK_ERR(err, "deflate"); in test_large_deflate()
278 err = deflate(&c_stream, Z_NO_FLUSH); in test_large_deflate()
279 CHECK_ERR(err, "deflate"); in test_large_deflate()
281 err = deflate(&c_stream, Z_FINISH); in test_large_deflate()
282 if (err != Z_STREAM_END) { in test_large_deflate()
286 err = deflateEnd(&c_stream); in test_large_deflate()
287 CHECK_ERR(err, "deflateEnd"); in test_large_deflate()
295 int err; in test_large_inflate() local
307 err = inflateInit(&d_stream); in test_large_inflate()
308 CHECK_ERR(err, "inflateInit"); in test_large_inflate()
313 err = inflate(&d_stream, Z_NO_FLUSH); in test_large_inflate()
314 if (err == Z_STREAM_END) break; in test_large_inflate()
315 CHECK_ERR(err, "large inflate"); in test_large_inflate()
318 err = inflateEnd(&d_stream); in test_large_inflate()
319 CHECK_ERR(err, "inflateEnd"); in test_large_inflate()
334 int err; in test_flush() local
341 err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); in test_flush()
342 CHECK_ERR(err, "deflateInit"); in test_flush()
348 err = deflate(&c_stream, Z_FULL_FLUSH); in test_flush()
349 CHECK_ERR(err, "deflate"); in test_flush()
354 err = deflate(&c_stream, Z_FINISH); in test_flush()
355 if (err != Z_STREAM_END) { in test_flush()
356 CHECK_ERR(err, "deflate"); in test_flush()
358 err = deflateEnd(&c_stream); in test_flush()
359 CHECK_ERR(err, "deflateEnd"); in test_flush()
369 int err; in test_sync() local
381 err = inflateInit(&d_stream); in test_sync()
382 CHECK_ERR(err, "inflateInit"); in test_sync()
387 err = inflate(&d_stream, Z_NO_FLUSH); in test_sync()
388 CHECK_ERR(err, "inflate"); in test_sync()
391 err = inflateSync(&d_stream); /* but skip the damaged part */ in test_sync()
392 CHECK_ERR(err, "inflateSync"); in test_sync()
394 err = inflate(&d_stream, Z_FINISH); in test_sync()
395 if (err != Z_STREAM_END) { in test_sync()
399 err = inflateEnd(&d_stream); in test_sync()
400 CHECK_ERR(err, "inflateEnd"); in test_sync()
410 int err; in test_dict_deflate() local
416 err = deflateInit(&c_stream, Z_BEST_COMPRESSION); in test_dict_deflate()
417 CHECK_ERR(err, "deflateInit"); in test_dict_deflate()
419 err = deflateSetDictionary(&c_stream, in test_dict_deflate()
421 CHECK_ERR(err, "deflateSetDictionary"); in test_dict_deflate()
430 err = deflate(&c_stream, Z_FINISH); in test_dict_deflate()
431 if (err != Z_STREAM_END) { in test_dict_deflate()
435 err = deflateEnd(&c_stream); in test_dict_deflate()
436 CHECK_ERR(err, "deflateEnd"); in test_dict_deflate()
444 int err; in test_dict_inflate() local
456 err = inflateInit(&d_stream); in test_dict_inflate()
457 CHECK_ERR(err, "inflateInit"); in test_dict_inflate()
463 err = inflate(&d_stream, Z_NO_FLUSH); in test_dict_inflate()
464 if (err == Z_STREAM_END) break; in test_dict_inflate()
465 if (err == Z_NEED_DICT) { in test_dict_inflate()
470 err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, in test_dict_inflate()
473 CHECK_ERR(err, "inflate with dict"); in test_dict_inflate()
476 err = inflateEnd(&d_stream); in test_dict_inflate()
477 CHECK_ERR(err, "inflateEnd"); in test_dict_inflate()