Changeset 133 for smplayer/vendor/current/zlib/gzread.c
- Timestamp:
- Oct 24, 2012, 7:56:20 PM (13 years ago)
- Location:
- smplayer/vendor/current/zlib
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/zlib/gzread.c
r121 r133 1 1 /* gzread.c -- zlib functions for reading gzip files 2 * Copyright (C) 2004, 2005, 2010, 2011 Mark Adler2 * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler 3 3 * For conditions of distribution and use, see copyright notice in zlib.h 4 4 */ … … 58 58 return -1; 59 59 if (state->eof == 0) { 60 if (strm->avail_in) 61 memmove(state->in, strm->next_in, strm->avail_in); 60 if (strm->avail_in) { /* copy what's there to the start */ 61 unsigned char *p = state->in, *q = strm->next_in; 62 unsigned n = strm->avail_in; 63 do { 64 *p++ = *q++; 65 } while (--n); 66 } 62 67 if (gz_load(state, state->in + strm->avail_in, 63 68 state->size - strm->avail_in, &got) == -1) … … 341 346 if (gz_fetch(state) == -1) 342 347 return -1; 343 continue; /* no progress yet -- go back to memcpy()above */348 continue; /* no progress yet -- go back to copy above */ 344 349 /* the copy above assures that we will leave with space in the 345 350 output buffer, allowing at least one gzungetc() to succeed */ … … 374 379 375 380 /* -- see zlib.h -- */ 376 int ZEXPORT gzgetc_(file) 381 #undef gzgetc 382 int ZEXPORT gzgetc(file) 377 383 gzFile file; 378 384 { … … 403 409 } 404 410 405 #undef gzgetc 406 int ZEXPORT gzgetc(file) 411 int ZEXPORT gzgetc_(file) 407 412 gzFile file; 408 413 { 409 return gzgetc _(file);410 } 414 return gzgetc(file); 415 } 411 416 412 417 /* -- see zlib.h -- */
Note:
See TracChangeset
for help on using the changeset viewer.