标签:oid mat pre \n fprintf void linu file 信息
static void console_log(const char *format, ...) { static FILE *fpConsole; if (fpConsole == NULL) { fpConsole = fopen("/dev/console", "w"); } if (fpConsole != NULL) { char aMsg[3584]; va_list va; va_start(va, format); int nRet; if (((nRet = vsnprintf(aMsg, sizeof(aMsg), format, va)) < 0) || (nRet >= (int)sizeof(aMsg))) { fprintf(fpConsole, "%s: nRet=%d, sizeof(aMsg)=%d\n", __FUNCTION__, nRet, sizeof(aMsg)); } va_end(va); fprintf(fpConsole, "%s\n", aMsg); } }
标签:oid mat pre \n fprintf void linu file 信息
原文地址:https://www.cnblogs.com/Malphite/p/10405557.html