| 1861 | } |
| 1862 | |
| 1863 | const char *mz_error(int err) { |
| 1864 | static struct { |
| 1865 | int m_err; |
| 1866 | const char *m_pDesc; |
| 1867 | } s_error_descs[] = {{MZ_OK, ""}, |
| 1868 | {MZ_STREAM_END, "stream end"}, |
| 1869 | {MZ_NEED_DICT, "need dictionary"}, |
| 1870 | {MZ_ERRNO, "file error"}, |
| 1871 | {MZ_STREAM_ERROR, "stream error"}, |
| 1872 | {MZ_DATA_ERROR, "data error"}, |
| 1873 | {MZ_MEM_ERROR, "out of memory"}, |
| 1874 | {MZ_BUF_ERROR, "buf error"}, |
| 1875 | {MZ_VERSION_ERROR, "version error"}, |
| 1876 | {MZ_PARAM_ERROR, "parameter error"}}; |
| 1877 | mz_uint i; |
| 1878 | for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) |
| 1879 | if (s_error_descs[i].m_err == err) |
| 1880 | return s_error_descs[i].m_pDesc; |
| 1881 | return NULL; |
| 1882 | } |
| 1883 | |
| 1884 | #endif // MINIZ_NO_ZLIB_APIS |
| 1885 |
nothing calls this directly
no outgoing calls
no test coverage detected