comparison debug.c @ 7:972a7f233b23

g++ compile
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 07 Dec 2010 23:03:45 +0900
parents 01387a2e419e
children
comparison
equal deleted inserted replaced
6:6541f0bebb81 7:972a7f233b23
1 #include <stdlib.h> 1 #include <stdlib.h>
2 #include <stdio.h> 2 #include <stdio.h>
3 #include <stdarg.h> 3 #include <stdarg.h>
4 #include "count2.h" 4 #include "count2.h"
5 #include "Enemy.h"
6 5
7 static FILE *dbg_fp; 6 static FILE *dbg_fp;
8 7
9 void dbg_init(char *fname) 8 void dbg_init(const char *fname)
10 { 9 {
11 dbg_fp = fopen(fname, "w"); 10 dbg_fp = fopen(fname, "w");
12 } 11 }
13 12
14 int dbg_printf(char *format, ...) 13 int dbg_printf(const char *format, ...)
15 { 14 {
16 va_list ap; 15 va_list ap;
17 va_start(ap, format); 16 va_start(ap, format);
18 vfprintf(dbg_fp, format, ap); 17 vfprintf(dbg_fp, format, ap);
19 va_end(ap); 18 va_end(ap);