| 1664 | // nothing |
| 1665 | #else |
| 1666 | static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) |
| 1667 | { |
| 1668 | if (s->io.read) { |
| 1669 | int blen = (int) (s->img_buffer_end - s->img_buffer); |
| 1670 | if (blen < n) { |
| 1671 | int res, count; |
| 1672 | |
| 1673 | memcpy(buffer, s->img_buffer, blen); |
| 1674 | |
| 1675 | count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); |
| 1676 | res = (count == (n-blen)); |
| 1677 | s->img_buffer = s->img_buffer_end; |
| 1678 | return res; |
| 1679 | } |
| 1680 | } |
| 1681 | |
| 1682 | if (s->img_buffer+n <= s->img_buffer_end) { |
| 1683 | memcpy(buffer, s->img_buffer, n); |
| 1684 | s->img_buffer += n; |
| 1685 | return 1; |
| 1686 | } else |
| 1687 | return 0; |
| 1688 | } |
| 1689 | #endif |
| 1690 | |
| 1691 | #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) |
no outgoing calls
no test coverage detected