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

Function l_genDescrString

deps/leptonica/src/stringcode.c:783–802  ·  view source on GitHub ↗

! * \brief l_genDescrString() * * \param[in] filein input file of serialized data * \param[in] ifunc index into set of functions in generated file * \param[in] itype index into type of function to be used * \return description string for this decoding function */

Source from the content-addressed store, hash-verified

781 * \return description string for this decoding function
782 */
783static char *
784l_genDescrString(const char *filein,
785 l_int32 ifunc,
786 l_int32 itype)
787{
788char buf[256];
789char *tail;
790
791 PROCNAME("l_genDescrString");
792
793 if (!filein)
794 return (char *)ERROR_PTR("filein not defined", procName, NULL);
795
796 splitPathAtDirectory(filein, NULL, &tail);
797 snprintf(buf, sizeof(buf), " * %-2d %-10s %-14s %s",
798 ifunc, l_assoc[itype].type, l_assoc[itype].reader, tail);
799
800 LEPT_FREE(tail);
801 return stringNew(buf);
802}

Callers 1

strcodeGenerateFunction · 0.85

Calls 2

splitPathAtDirectoryFunction · 0.85
stringNewFunction · 0.85

Tested by

no test coverage detected