2026-10-02 20:31:24 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
#if DEBUG == 1
|
2026-10-06 21:02:40 +03:00
|
|
|
#if PRINT_DISABLE_PREFIXES == 1
|
|
|
|
|
#define pr_debug(...) std::cout << "debug: " << __VA_ARGS__ << "\n"
|
|
|
|
|
#define pri_debug(...) std::cout << __VA_ARGS__
|
|
|
|
|
#define prs_debug(...) std::cout << "debug: " << __VA_ARGS__
|
|
|
|
|
#else
|
|
|
|
|
#define pr_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__ << "\n"
|
|
|
|
|
#define pri_debug(...) std::cout << __VA_ARGS__
|
|
|
|
|
#define prs_debug(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] debug: " << __VA_ARGS__
|
|
|
|
|
#endif
|
2026-10-02 20:31:24 +03:00
|
|
|
#else
|
|
|
|
|
#define pr_debug(...) do {} while (0)
|
2026-10-05 11:17:48 +03:00
|
|
|
#define pri_debug(...) do {} while (0)
|
|
|
|
|
#define prs_debug(...) do {} while (0)
|
2026-10-02 20:31:24 +03:00
|
|
|
#endif
|
|
|
|
|
|
2026-10-06 21:02:40 +03:00
|
|
|
#if PRINT_DISABLE_PREFIXES == 1
|
|
|
|
|
#define pr_warn(...) std::cout << "warning: " << __VA_ARGS__ << "\n"
|
|
|
|
|
#else
|
2026-10-04 14:13:14 +03:00
|
|
|
#define pr_warn(...) std::cout << "[" << __FILE__ << ":" << __LINE__ << " " << __func__ << "] warning: " << __VA_ARGS__ << "\n"
|
2026-10-06 21:02:40 +03:00
|
|
|
#endif
|