void LogInit(int logprint) { int n; InitializeCriticalSection(&LogCritical); // Create yes no Log if (logprint!=0) { LogAdd=LogAddFunc; LogAddC=LogAddFuncColor; LogAddTD=LogAddTimeDateFunc; LogAddHeadHex=LogAddStrHexFunc; LogTextPaint=LogTextPaintProc; LogAddL=LogAddLocalFunc; for (n=0;n<LOG_TEXT_LINE;n++) { memset(&LogText[n],0, sizeof(LogText[0])); LogTextLength[n]=0; LogTextViewType[n]=0; } if (gLogOutType==0) { return; } else { LogDataSet(); } } else { LogAdd=LogAddFuncVoid; LogAddHeadHex=LogAddHeadHexFuncVoid; LogTextPaint=LogTextPaintProcVoid; LogAddTD=LogAddTimeDateVoid; LogAddL=LogAddLocalFuncVoid; } }
void LogInit(int logprint) { InitializeCriticalSection(&LogCritical); // Create yes no Log if (logprint!=0) { for (int n=0;n<LOG_TEXT_LINE;n++) { memset(&LogText[n],0, sizeof(LogText[0])); LogTextLength[n]=0; LogTextViewType[n]=0; } if (gLogOutType==0) { return; } else { LogDataSet(); } } }