view debug.c @ 35:3b92a4b17049 default tip

fix for macosx Yosemite
author Nozomi
date Thu, 19 May 2016 18:18:34 +0900
parents 972a7f233b23
children
line wrap: on
line source

#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);
}