aboutsummaryrefslogtreecommitdiff
path: root/prut.h
blob: 2bd2ba0953267a6aa1ce82c20a777d5021968a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

// Disable prutprint
#define prutprintf(fmt, ...)

// Short version "file:line: message"
// #define prutprintf(fmt, ...) printf("\x1b[37m%s:%d:\x1b[0m " fmt "\n", __FILE_NAME__, __LINE__, __VA_ARGS__)

// Long version "function (file:line): message"
// #define prutprintf(fmt, ...) printf("\x1b[37m%s (%s:%d):\x1b[0m " fmt "\n", __PRETTY_FUNCTION__, __FILE_NAME__, __LINE__, __VA_ARGS__)

#define prutprint(s) prutprintf("%s", s)