summaryrefslogtreecommitdiff
path: root/src/scapx.h
diff options
context:
space:
mode:
authorben <ben.nagy@arachnida.blog>2024-10-21 12:04:09 -0700
committerben <ben.nagy@arachnida.blog>2024-10-21 12:04:09 -0700
commitefebf35181554c40dc633e53329617c2b3990c83 (patch)
tree9077ece08a3a2271fcd3d0731fce9fbb8c42aab7 /src/scapx.h
parent639e8280cc4440f4162c3488f1b5c8ad36dec346 (diff)
get focused window and set window nameHEADmain
Diffstat (limited to 'src/scapx.h')
-rw-r--r--src/scapx.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/scapx.h b/src/scapx.h
index c232067..47427db 100644
--- a/src/scapx.h
+++ b/src/scapx.h
@@ -10,21 +10,22 @@
fprintf(stdout, "-h, --help\t\t print this menu and quit. Alternatively, man scapx\n"); \
fprintf(stdout, "-v, --version\t\t print program version and quit\n\n"); \
exit(EXIT_FAILURE); \
- } while (0)
-
+ } while (0)
-#define SLOG(...) (fprintf(stderr, __VA_ARGS__))
+// TODO: put in util.h
-#define DEBUG_INFO(FMT, ARGS...) do { \
- if (DEBUG) \
- fprintf(stderr, "%s:%d " FMT "\n", __FUNCTION__, __LINE__, ## ARGS); \
- } while (0)
+#ifdef DEBUG
+ #define SLOG(...) (fprintf(stderr, ##__VA_ARGS__))
+ #define DEBUG_INFO(FMT, ...) do { \
+ if (DEBUG) \
+ fprintf(stderr, "%s:%d " FMT "\n", __func__, __LINE__, ##__VA_ARGS__); \
+ } while (0)
+#endif
-#define FATAL_ERROR(errstr, ...) \
+#define FATAL_ERROR(errstr, ...) \
do { \
fprintf(stderr, (errstr), ##__VA_ARGS__); \
exit(EXIT_FAILURE); \
} while (0)
-
#endif