Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ociotec's full-sized avatar

Emilio González Montaña ociotec

View GitHub Profile
@ociotec
ociotec / print.c
Created April 24, 2016 09:36
Sample of simple macro to print log messages including the function & line where it's logged
#include <stdio.h>
#define PRINT(...) \
printf("%s():%03u ", __FUNCTION__, __LINE__); \
printf(__VA_ARGS__); \
printf("\n");
int main()
{
PRINT("Hello world")
/* It should render: