mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
include/: refactor header files
This commit is contained in:
parent
82dc192217
commit
53266a0d5a
8 changed files with 27 additions and 14 deletions
13
include/common/bug-on.h
Normal file
13
include/common/bug-on.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef __LABWC_BUG_ON_H
|
||||
#define __LABWC_BUG_ON_H
|
||||
|
||||
#define BUG_ON(condition) \
|
||||
do { \
|
||||
if ((condition) != 0) { \
|
||||
fprintf(stderr, "Badness in %s() at %s:%d\n", \
|
||||
__func__, __FILE__, __LINE__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif /* __LABWC_BUT_ON_H */
|
||||
|
||||
|
|
@ -7,15 +7,7 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#include "buf.h"
|
||||
|
||||
#define BUG_ON(condition) \
|
||||
do { \
|
||||
if ((condition) != 0) { \
|
||||
fprintf(stderr, "Badness in %s() at %s:%d\n", \
|
||||
__func__, __FILE__, __LINE__); \
|
||||
} \
|
||||
} while (0)
|
||||
#include "common/buf.h"
|
||||
|
||||
struct keybind {
|
||||
uint32_t modifiers;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "buf.h"
|
||||
#include "common/buf.h"
|
||||
|
||||
void buf_init(struct buf *s)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "rcxml.h"
|
||||
#include "config/config-dir.h"
|
||||
#include "common/bug-on.h"
|
||||
|
||||
static bool in_keybind = false;
|
||||
static bool is_attribute = false;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "common/buf.h"
|
||||
#include "theme/xbm/parse.h"
|
||||
|
||||
/* TODO: should be window.active.button.unpressed.image.color */
|
||||
|
|
|
|||
|
|
@ -9,11 +9,18 @@ LDFLAGS += `xml2-config --libs`
|
|||
LDFLAGS += `pkg-config --cflags --libs glib-2.0 wayland-server xkbcommon`
|
||||
|
||||
PROGS = rcxml-print-nodenames
|
||||
SRC = \
|
||||
rcxml-print-nodenames.c \
|
||||
../../src/config/rcxml.c \
|
||||
../../src/config/config-dir.c \
|
||||
../../src/common/buf.c \
|
||||
../../src/config/keybind.c
|
||||
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
rcxml-print-nodenames: rcxml-print-nodenames.c
|
||||
$(CC) $(CFLAGS) -o $@ $^ ../../src/config/rcxml.c ../../src/common/buf.c ../../src/config/keybind.c $(LDFLAGS)
|
||||
rcxml-print-nodenames: $(SRC)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "rcxml.h"
|
||||
#include "buf.h"
|
||||
#include "common/buf.h"
|
||||
|
||||
struct rcxml rc = { 0 };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue