|
|
|
@ -606,25 +606,27 @@ void FAR *out_desc; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case DONE: |
|
|
|
|
/* inflate stream terminated properly -- write leftover output */ |
|
|
|
|
/* inflate stream terminated properly */ |
|
|
|
|
ret = Z_STREAM_END; |
|
|
|
|
if (left < state->wsize) { |
|
|
|
|
if (out(out_desc, state->window, state->wsize - left)) |
|
|
|
|
ret = Z_BUF_ERROR; |
|
|
|
|
} |
|
|
|
|
goto inf_leave; |
|
|
|
|
|
|
|
|
|
case BAD: |
|
|
|
|
ret = Z_DATA_ERROR; |
|
|
|
|
goto inf_leave; |
|
|
|
|
|
|
|
|
|
default: /* can't happen, but makes compilers happy */ |
|
|
|
|
default: |
|
|
|
|
/* can't happen, but makes compilers happy */ |
|
|
|
|
ret = Z_STREAM_ERROR; |
|
|
|
|
goto inf_leave; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Return unused input */ |
|
|
|
|
/* Write leftover output and return unused input */ |
|
|
|
|
inf_leave: |
|
|
|
|
if (left < state->wsize) { |
|
|
|
|
if (out(out_desc, state->window, state->wsize - left) && |
|
|
|
|
ret == Z_STREAM_END) |
|
|
|
|
ret = Z_BUF_ERROR; |
|
|
|
|
} |
|
|
|
|
strm->next_in = next; |
|
|
|
|
strm->avail_in = have; |
|
|
|
|
return ret; |
|
|
|
|