Mercurial > hg > Members > koba > t_dandy
diff debug.c @ 0:435ac1cdb64e
create task dandy directry.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 11 Dec 2010 21:25:28 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debug.c Sat Dec 11 21:25:28 2010 +0900 @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include "count2.h" + +static FILE *dbg_fp; + +void dbg_init(const char *fname) +{ + dbg_fp = fopen(fname, "w"); +} + +int dbg_printf(const char *format, ...) +{ + va_list ap; + va_start(ap, format); + vfprintf(dbg_fp, format, ap); + va_end(ap); +// fflush(dbg_fp); + return (0); +}