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