Galena :: xfirelib

This is a static archive of the original page - xfirelib is no longer maintained.
Navigation
Home
Board
Bug Tracker
Downloads

XFireGateway





User

You are currently not logged in.
Login
Register


0 logged in users.
18 active guests.


Project: xfirelib

Home
Board

xdebug.h

Go to the documentation of this file.
00001 /*
00002  *  xfirelib - C++ Library for the xfire protocol.
00003  *  Copyright (C) 2006 by
00004  *          Beat Wolf <asraniel@fryx.ch> / http://gfire.sf.net
00005  *          Herbert Poul <herbert.poul@gmail.com> / http://goim.us
00006  *    http://xfirelib.sphene.net
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; either version 2 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  This program is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *  GNU General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU General Public License
00019  *  along with this program; if not, write to the Free Software
00020  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00021  */
00022 
00023 
00024 
00025 #ifndef __XDEBUG_H
00026 #define __XDEBUG_H
00027 
00028 #define RESET 0
00029 
00030 #define BLACK  0
00031 #define RED    1
00032 #define GREEN  2
00033 #define YELLOW 3
00034 #define WHITE  7
00035 #include <stdio.h>
00036 #include <pthread.h>
00037 
00038   #define XDEBUG(args) { \
00039     printf( "" ); \
00040     printf( "[%5d] XFireLibDEBUG(%25s,%4d): ", pthread_self(), __FILE__, __LINE__ ); \
00041     printf args ; \
00042     printf( "" ); \
00043   }
00044   #define XINFO(args)  { \
00045     printf( "" ); \
00046     printf( "[%5d] XFireLibINFO (%25s,%4d): ", pthread_self(), __FILE__, __LINE__ ); \
00047     printf args ; \
00048     printf( "" ); \
00049   }
00050   #define XERROR(args) { \
00051     printf( "" ); \
00052     printf( "[%5d] XFireLibERROR(%25s,%4d): ", pthread_self(), __FILE__, __LINE__ ); \
00053     printf args ; \
00054     printf( "" ); \
00055   }
00056 #ifndef XENABLEDEBUG
00057   #undef XDEBUG
00058   #define XDEBUG(args)
00059   #ifndef XINFO
00060     #define XINFO(args)
00061   #endif
00062 #endif
00063 
00064 
00065 #endif
00066 

Powered by Galena
This page is powered by Galena. - Get your own free "CMS" (Wiki, Board, Todolist/Buglist-Tracker)
Author of Galena: Herbert Poul - kahless+galena@sphene.net - jabber id: kahless@sphene.net - icq uin: 50647169
Page generated in 17 millisecs