Skip to content

Instantly share code, notes, and snippets.

@pscollins
Created January 17, 2016 18:35
Show Gist options
  • Save pscollins/f4016688c540f1175767 to your computer and use it in GitHub Desktop.
Save pscollins/f4016688c540f1175767 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#ifdef BE_QUIET
#define P_TYPE(x, type)
#else
#define P_TYPE(x, type) printf("%s @ (%s:%d): %s " type "\n", __func__, __FILE__, __LINE__, #x, x)
#endif
#define PI(x) P_TYPE(x, "%i")
#define PS(x) P_TYPE(x, "%s")
// etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment