static int mclDefaultErrorHandler(const char *s) { int written = 0; size_t len = 0; len = strlen(s); written = mclWrite(2 /* stderr */, s, sizeof(char)*len); if (len > 0 && s[ len-1 ] != '\n') written += mclWrite(2 /* stderr */, "\n", sizeof(char)); return written; }
LIB_libhgraphSimulation3_C_API void MW_CALL_CONV libhgraphSimulation3PrintStackTrace(void) { char** stackTrace; int stackDepth = mclGetStackTrace(&stackTrace); int i; for(i=0; i<stackDepth; i++) { mclWrite(2 /* stderr */, stackTrace[i], sizeof(char)*strlen(stackTrace[i])); mclWrite(2 /* stderr */, "\n", sizeof(char)*strlen("\n")); } mclFreeStackTrace(&stackTrace, stackDepth); }
LIB_LeadingEigenVecForSparseMatrix_C_API void MW_CALL_CONV LeadingEigenVecForSparseMatrixPrintStackTrace(void) { char** stackTrace; int stackDepth = mclGetStackTrace(&stackTrace); int i; for(i=0; i<stackDepth; i++) { mclWrite(2 /* stderr */, stackTrace[i], sizeof(char)*strlen(stackTrace[i])); mclWrite(2 /* stderr */, "\n", sizeof(char)*strlen("\n")); } mclFreeStackTrace(&stackTrace, stackDepth); }
LIB_mxace32_2008b_C_API void MW_CALL_CONV mxace32_2008bPrintStackTrace(void) { char** stackTrace; int stackDepth = mclGetStackTrace(_mcr_inst, &stackTrace); int i; for(i=0; i<stackDepth; i++) { mclWrite(2 /* stderr */, stackTrace[i], sizeof(char)*strlen(stackTrace[i])); mclWrite(2 /* stderr */, "\n", sizeof(char)*strlen("\n")); } mclFreeStackTrace(&stackTrace, stackDepth); }
LIB_MyMatlabFunc_C_API void MW_CALL_CONV MyMatlabFuncPrintStackTrace(void) { char** stackTrace; int stackDepth = mclGetStackTrace(&stackTrace); int i; for(i=0; i<stackDepth; i++) { mclWrite(2 /* stderr */, stackTrace[i], sizeof(char)*strlen(stackTrace[i])); mclWrite(2 /* stderr */, "\n", sizeof(char)*strlen("\n")); } mclFreeStackTrace(&stackTrace, stackDepth); }
LIB_imatest_acquisition_C_API void MW_CALL_CONV imatest_acquisitionPrintStackTrace(void) { char** stackTrace; int stackDepth = mclGetStackTrace(&stackTrace); int i; for(i=0; i<stackDepth; i++) { mclWrite(2 /* stderr */, stackTrace[i], sizeof(char)*strlen(stackTrace[i])); mclWrite(2 /* stderr */, "\n", sizeof(char)*strlen("\n")); } mclFreeStackTrace(&stackTrace, stackDepth); }
static int mclDefaultPrintHandler(const char *s) { return mclWrite(1 /* stdout */, s, sizeof(char)*strlen(s)); }