void suppl_log_log_vitem(suppl_log_csptr_t fmt, va_list ap) { assert(fmt); if(suppl_l_logfile && suppl_log_lock()) { suppl_log_unlock(); vfprintf(suppl_l_logfile, fmt, ap); chkHeap }
void suppl_log_log_trailer(void) { assert(suppl_Stack); if(suppl_l_logfile && suppl_log_lock()) { putc('\n', suppl_l_logfile); #ifdef DBG_ALWAYS_CLOSELOG /* FreeDOS does not support commit file */ /* DBG_FLUSHLOG */ DBG_CLOSELOG #else #ifdef DBG_ALWAYS_FLUSH_LOG fcommit(suppl_l_logfile); /* make sure the entry is on disk */ #endif #endif ++suppl_l_count; chkHeap suppl_log_unlock(); } }
void suppl_log_log_header(void) { char *fnam; nlstime t; assert(suppl_Stack); if(!suppl_log_lock()) return; /* Open the logfile if not done so already */ if(!suppl_l_logfile) { /* If to lock the debug package fails, _item() and _trailer() will silently ignore any calls */ chkHeap if((fnam = appNameEx()) == 0) Esuppl_noMem(); fnam = EStrConcat(2, fnam, DBG_EXTENSION); suppl_l_logfile = Eopen(fnam, suppl_l_openmode); chkHeap free(fnam); }