original 1.0.1 release
[xwelltris.git] / src / mydebug.c
blob81caa2faac4e19a827afa529f110d925ff03ab11
1 /****************************************************************************
2 * Copyright (C) 2001 by Leo Khramov
3 * email: leo@xnc.dubna.su
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 ****************************************************************************/
16 //This file contains C functions useful for debugging xnc -> printing.
17 #include "mydebug.h"
19 int debprintf(const char *format,...)
22 va_list args;
23 int n;
25 va_start(args, format);
26 n = fprintf(stderr, "[dbg] ");
27 n += vfprintf(stderr, format, args);
28 va_end(args);
29 fflush(stderr);
30 return (n);