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

Function boxaaWrite

deps/leptonica/src/boxbasic.c:1967–1988  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1965 * \return 0 if OK, 1 on error
1966 */
1967l_int32
1968boxaaWrite(const char *filename,
1969 BOXAA *baa)
1970{
1971l_int32 ret;
1972FILE *fp;
1973
1974 PROCNAME("boxaaWrite");
1975
1976 if (!filename)
1977 return ERROR_INT("filename not defined", procName, 1);
1978 if (!baa)
1979 return ERROR_INT("baa not defined", procName, 1);
1980
1981 if ((fp = fopenWriteStream(filename, "w")) == NULL)
1982 return ERROR_INT("stream not opened", procName, 1);
1983 ret = boxaaWriteStream(fp, baa);
1984 fclose(fp);
1985 if (ret)
1986 return ERROR_INT("baa not written to stream", procName, 1);
1987 return 0;
1988}
1989
1990
1991/*!

Callers

nothing calls this directly

Calls 2

fopenWriteStreamFunction · 0.85
boxaaWriteStreamFunction · 0.85

Tested by

no test coverage detected