Develop and Download Open Source Software

Browse CVS Repository

Contents of /enbanfukusyaya/EnbanKensa/common/debug.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Sun Dec 11 15:25:30 2005 UTC (18 years, 4 months ago) by bananajinn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +31 -31 lines
File MIME type: text/x-csrc
*** empty log message ***

1 /**
2 * 円盤複写屋 - EnbanKensa
3 * Copyright (C) 2005 Kagetani Hideto
4 * debug.c - デバッグ用
5 * $Date: 2005/12/11 15:21:45 $
6 * $Revision: 1.4 $
7 */
8
9 void DebugLog(char *fmt, ...)
10 {
11 #ifdef DEBUGLOG
12 va_list args;
13 char str[512];
14 FILE *fp;
15 time_t now;
16
17 fp = fopen("enban.log", "a");
18 if(fp == NULL)
19 return;
20
21 time(&now);
22 strftime(str, sizeof(str)-1, "%Y/%m/%d %H:%M:%S : ", localtime(&now));
23 fputs(str, fp);
24
25 va_start(args, fmt);
26 vssprintf(str, sizeof(str), fmt, args);
27
28 fputs(str, fp);
29 fclose(fp);
30 #endif
31 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26