! * \brief boxaaReadMem() * * \param[in] data serialization of boxaa; in ascii * \param[in] size of data in bytes; can use strlen to get it * \return baa, or NULL on error */
| 1937 | * \return baa, or NULL on error |
| 1938 | */ |
| 1939 | BOXAA * |
| 1940 | boxaaReadMem(const l_uint8 *data, |
| 1941 | size_t size) |
| 1942 | { |
| 1943 | FILE *fp; |
| 1944 | BOXAA *baa; |
| 1945 | |
| 1946 | PROCNAME("boxaaReadMem"); |
| 1947 | |
| 1948 | if (!data) |
| 1949 | return (BOXAA *)ERROR_PTR("data not defined", procName, NULL); |
| 1950 | if ((fp = fopenReadFromMemory(data, size)) == NULL) |
| 1951 | return (BOXAA *)ERROR_PTR("stream not opened", procName, NULL); |
| 1952 | |
| 1953 | baa = boxaaReadStream(fp); |
| 1954 | fclose(fp); |
| 1955 | if (!baa) L_ERROR("baa not read\n", procName); |
| 1956 | return baa; |
| 1957 | } |
| 1958 | |
| 1959 | |
| 1960 | /*! |
nothing calls this directly
no test coverage detected