Created
October 18, 2019 06:47
-
-
Save 404neko/3a80e08e6f35943af7389c073c81ef03 to your computer and use it in GitHub Desktop.
useful debug output macro
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
#include <stdio.h> | |
#ifndef _DEBUG | |
#define LOGFUNC(...) ((void)0) | |
#else | |
#define LOGFUNC(...) (printf(__VA_ARGS__)) | |
#endif | |
#define dprint(...) printf("%-16s # %-3d :: %s() -> %s", __FILE__, __LINE__ , __FUNCTION__, ##__VA_ARGS__); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment