Skip to content

Instantly share code, notes, and snippets.

@oza
Created December 16, 2009 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oza/257655 to your computer and use it in GitHub Desktop.
Save oza/257655 to your computer and use it in GitHub Desktop.
#ifndef __DPRINTF_H__
#define __DPRINTF_H__
#ifdef __DEBUG__
#define dprintf(fmt,...) \
printf("[%s]%d:" fmt "\n",__FUNCTION__,__LINE__,__VA_ARGS__)
#define dputs(str) \
printf("[%s]%d:" str "\n",__FUNCTION__,__LINE__)
#else
#define dprintf(fmt,...) while(0){}
#define dputs(str) while(0){}
#endif
#endif //__DPRINTF_H__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment