mirror of
https://github.com/mid-kid/metroskrew.git
synced 2025-06-18 21:25:44 -04:00
28 lines
694 B
C
28 lines
694 B
C
#pragma once
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifdef ETRACE
|
|
#define TRACE(msg, ...) { printf("trace: " msg "\n", ##__VA_ARGS__);fflush(stdout); }
|
|
#else
|
|
#define TRACE(msg, ...)
|
|
#endif
|
|
|
|
#ifndef NDEBUG
|
|
#define DEBUG(msg, ...) { printf(msg "\n", ##__VA_ARGS__);fflush(stdout); }
|
|
#define STUB(msg, ...) { printf("stub: " msg "\n", ##__VA_ARGS__);fflush(stdout); }
|
|
#else
|
|
#define DEBUG(msg, ...)
|
|
#define STUB(msg, ...)
|
|
#endif
|
|
|
|
#define DIE(msg, ...) { printf("die: " msg "\n", ##__VA_ARGS__);exit(1); }
|
|
|
|
#define ALIAS(name, num) \
|
|
__asm__(".global _" name "; .set _" name ", _" name "@" #num)
|
|
|
|
bool path_has_drv(const char *path);
|
|
char *path_dup_unx(const char *path);
|