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

Function sarrayJoin

deps/leptonica/src/sarray1.c:880–901  ·  view source on GitHub ↗

----------------------------------------------------------------------* * Join 2 sarrays * *----------------------------------------------------------------------*/ ! * \brief sarrayJoin() * * \param[in] sa1 to be added to * \param[in] sa2 append to sa1 * \return 0 if OK, 1 on error * * * Notes: * (1) Copies of

Source from the content-addressed store, hash-verified

878 * </pre>
879 */
880l_int32
881sarrayJoin(SARRAY *sa1,
882 SARRAY *sa2)
883{
884char *str;
885l_int32 n, i;
886
887 PROCNAME("sarrayJoin");
888
889 if (!sa1)
890 return ERROR_INT("sa1 not defined", procName, 1);
891 if (!sa2)
892 return ERROR_INT("sa2 not defined", procName, 1);
893
894 n = sarrayGetCount(sa2);
895 for (i = 0; i < n; i++) {
896 str = sarrayGetString(sa2, i, L_NOCOPY);
897 sarrayAddString(sa1, str, L_COPY);
898 }
899
900 return 0;
901}
902
903
904/*!

Callers 3

fmorphautogen2Function · 0.85
fhmtautogen2Function · 0.85
sarrayUnionByAsetFunction · 0.85

Calls 3

sarrayGetCountFunction · 0.85
sarrayGetStringFunction · 0.85
sarrayAddStringFunction · 0.85

Tested by

no test coverage detected