// stringcode.c (336, 1) // strcodeFinalize(pstrcode, outdir) as int // strcodeFinalize(L_STRCODE **, const char *) as l_int32 /// <summary> /// strcodeFinalize() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/strcodeFinalize/*"/> /// <param name="pstrcode">[in,out] - destroys after .c and .h files have been generated</param> /// <param name="outdir">[in][optional] - if NULL, files are made in /tmp/lept/auto</param> /// <returns>void</returns> public static int strcodeFinalize( ref L_StrCode pstrcode, String outdir = "") { IntPtr pstrcodePtr = IntPtr.Zero; if (pstrcode != null) { pstrcodePtr = pstrcode.Pointer; } int _Result = Natives.strcodeFinalize(ref pstrcodePtr, outdir); if (pstrcodePtr == IntPtr.Zero) { pstrcode = null; } else { pstrcode = new L_StrCode(pstrcodePtr); }; return(_Result); }
// stringcode.c (289, 1) // strcodeGenerate(strcode, filein, type) as int // strcodeGenerate(L_STRCODE *, const char *, const char *) as l_ok /// <summary> /// (1) The generated function name is /// l_autodecode_[fileno]() /// where [fileno] is the index label for the pair of output files.<para/> /// /// (2) To deserialize this data, the function is called with the /// argument 'ifunc', which increments each time strcodeGenerate() /// is called. /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/strcodeGenerate/*"/> /// <param name="strcode">[in] - for accumulating data</param> /// <param name="filein">[in] - input file with serialized data</param> /// <param name="type">[in] - of data use the typedef string</param> /// <returns>0 if OK, 1 on error.</returns> public static int strcodeGenerate( L_StrCode strcode, String filein, String type) { if (strcode == null) { throw new ArgumentNullException("strcode cannot be Nothing"); } if (filein == null) { throw new ArgumentNullException("filein cannot be Nothing"); } if (type == null) { throw new ArgumentNullException("type cannot be Nothing"); } int _Result = Natives.strcodeGenerate(strcode.Pointer, filein, type); return(_Result); }