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

Function boxaWrite

deps/leptonica/src/boxbasic.c:2224–2246  ·  view source on GitHub ↗

! * \brief boxaWrite() * * \param[in] filename * \param[in] boxa * \return 0 if OK, 1 on error */

Source from the content-addressed store, hash-verified

2222 * \return 0 if OK, 1 on error
2223 */
2224l_int32
2225boxaWrite(const char *filename,
2226 BOXA *boxa)
2227{
2228l_int32 ret;
2229FILE *fp;
2230
2231 PROCNAME("boxaWrite");
2232
2233 if (!filename)
2234 return ERROR_INT("filename not defined", procName, 1);
2235 if (!boxa)
2236 return ERROR_INT("boxa not defined", procName, 1);
2237
2238 if ((fp = fopenWriteStream(filename, "w")) == NULL)
2239 return ERROR_INT("stream not opened", procName, 1);
2240 ret = boxaWriteStream(fp, boxa);
2241 fclose(fp);
2242 if (ret)
2243 return ERROR_INT("boxa not written to stream", procName, 1);
2244
2245 return 0;
2246}
2247
2248
2249/*!

Callers 1

boxaWriteDebugFunction · 0.85

Calls 2

fopenWriteStreamFunction · 0.85
boxaWriteStreamFunction · 0.85

Tested by

no test coverage detected