From 639e8280cc4440f4162c3488f1b5c8ad36dec346 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 17 Oct 2024 18:19:25 -0700 Subject: Key symbols and mouse pointer added --- src/scapx.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/scapx.h') diff --git a/src/scapx.h b/src/scapx.h index 00659d5..c232067 100644 --- a/src/scapx.h +++ b/src/scapx.h @@ -1,9 +1,7 @@ #ifndef SCAPX_H #define SCAPX_H -#include - -#define OPTS(msg) \ +#define POPTS(msg) \ do { \ fprintf(stderr, "Usage: scapx\n"); \ fprintf(stderr, "%s\n\n\n", msg); \ @@ -14,11 +12,19 @@ exit(EXIT_FAILURE); \ } while (0) -typedef struct { - xcb_connection_t *con; - xcb_screen_t *scr; - xcb_screen_iterator_t iter; - int scr_nbr; -} Server_context_t; + +#define SLOG(...) (fprintf(stderr, __VA_ARGS__)) + +#define DEBUG_INFO(FMT, ARGS...) do { \ + if (DEBUG) \ + fprintf(stderr, "%s:%d " FMT "\n", __FUNCTION__, __LINE__, ## ARGS); \ + } while (0) + +#define FATAL_ERROR(errstr, ...) \ + do { \ + fprintf(stderr, (errstr), ##__VA_ARGS__); \ + exit(EXIT_FAILURE); \ + } while (0) + #endif -- cgit v1.2.3