Last active
December 29, 2015 01:49
-
-
Save arajkumar/7596121 to your computer and use it in GitHub Desktop.
My Simple debugging statement :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifndef ARDEBUG_H | |
#define ARDEBUG_H | |
#include <stdio.h> | |
#include <string.h> | |
static const char* s_fileName; | |
#define AR_PRINT(type,x...) do { s_fileName || (s_fileName = strrchr(__FILE__,'/') + 1) || (s_fileName = __FILE__); printf("%-16.32s:%6.6d:%6.6d %s *** ",s_fileName,__LINE__,getpid(), type); printf(x); printf("\n"); } while(0) | |
#define AR_DEBUG(x...) AR_PRINT("",x) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment