This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
quick-text-bar/util.h

33 lines
832 B
C
Raw Permalink Normal View History

2022-08-28 14:27:03 -07:00
#ifndef _INCLUDED_MODULE_API_H
#define _INCLUDED_MODULE_API_H
#include <stddef.h>
#ifdef FALSE
#undef FALSE
#endif
#define FALSE 0
#ifdef TRUE
#undef TRUE
#endif
#define TRUE 1
/* execute an external program and return its exit code */
extern void _qtb_internal_log(const char *fmt, ...);
#define qtb_log(...) _qtb_internal_log("module - " __FILE__ ": " __VA_ARGS__);
extern void qtb_die(void);
extern void qtb_signal_modules(int sig);
extern void *qtb_malloc(size_t size);
extern void *qtb_calloc(size_t n, size_t size);
extern void *qtb_realloc(void *ptr, size_t size);
extern char *qtb_strdup(const char *str);
extern void qtb_free(void *ptr);
#ifdef HAS_X11
#include <X11/Xlib.h>
/* get the X display specified by the command line or DISPLAY
environemnt variable */
extern Display *qtb_get_x_display(void);
#endif
#endif