Skip to content

Instantly share code, notes, and snippets.

@Sachs27
Created September 4, 2013 03:05
Show Gist options
  • Save Sachs27/6432351 to your computer and use it in GitHub Desktop.
Save Sachs27/6432351 to your computer and use it in GitHub Desktop.
Used for debugging output.
#ifndef DEBUG_H
#define DEBUG_H
#ifndef NDEBUG
#include <stdio.h>
#define dprintf(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
#else /* NDEBUG */
#define dprintf(format, ...) (void) ;
#endif /* NDEBUG */
#endif /* DEBUG_H */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment