MCPcopy Create free account
hub / github.com/creatale/node-dv / boxaaRead

Function boxaaRead

deps/leptonica/src/boxbasic.c:1867–1885  ·  view source on GitHub ↗

! * \brief boxaaRead() * * \param[in] filename * \return boxaa, or NULL on error */

Source from the content-addressed store, hash-verified

1865 * \return boxaa, or NULL on error
1866 */
1867BOXAA *
1868boxaaRead(const char *filename)
1869{
1870FILE *fp;
1871BOXAA *baa;
1872
1873 PROCNAME("boxaaRead");
1874
1875 if (!filename)
1876 return (BOXAA *)ERROR_PTR("filename not defined", procName, NULL);
1877
1878 if ((fp = fopenReadStream(filename)) == NULL)
1879 return (BOXAA *)ERROR_PTR("stream not opened", procName, NULL);
1880 baa = boxaaReadStream(fp);
1881 fclose(fp);
1882 if (!baa)
1883 return (BOXAA *)ERROR_PTR("boxaa not read", procName, NULL);
1884 return baa;
1885}
1886
1887
1888/*!

Callers

nothing calls this directly

Calls 2

fopenReadStreamFunction · 0.85
boxaaReadStreamFunction · 0.85

Tested by

no test coverage detected