| 48 | /* --------------------------------------------------------------- read --- */ |
| 49 | |
| 50 | static int checkbuffer (ZIO *z) { |
| 51 | if (z->n == 0) { /* no bytes in buffer? */ |
| 52 | if (luaZ_fill(z) == EOZ) /* try to read more */ |
| 53 | return 0; /* no more input */ |
| 54 | else { |
| 55 | z->n++; /* luaZ_fill consumed first byte; put it back */ |
| 56 | z->p--; |
| 57 | } |
| 58 | } |
| 59 | return 1; /* now buffer has something */ |
| 60 | } |
| 61 | |
| 62 | |
| 63 | size_t luaZ_read (ZIO *z, void *b, size_t n) { |
no test coverage detected