Move x.{c,h} to a different subdirectory
x.c has grown into an unmaintainable blob. Moving it in its own subdirectory is the first step to splitting it into submodules each of which will have a well defined job so that a lot of the code can be abstracted to improve readability and make it much easier to maintain. This process will be done one small part at a time only when we need to change significantly change a part of the file, there is no need to break what already works.
This commit is contained in:
parent
4dd628ccf4
commit
ebea092ddd
8
Makefile
8
Makefile
@ -6,8 +6,8 @@ include config.mk
|
||||
CFLAGS += -I.
|
||||
LDFLAGS += -L.
|
||||
|
||||
SRC = $(shell ls src/*.c)
|
||||
OBJ = ${SRC:.c=.o}
|
||||
SRC := $(shell find src/ -name '*.c')
|
||||
OBJ := ${SRC:.c=.o}
|
||||
|
||||
all: doc dunst service
|
||||
|
||||
@ -76,8 +76,8 @@ uninstall:
|
||||
test: test/test
|
||||
cd test && ./test
|
||||
|
||||
TEST_SRC = $(shell ls test/*.c)
|
||||
TEST_OBJ = $(TEST_SRC:.c=.o)
|
||||
TEST_SRC := $(shell find test/ -name '*.c')
|
||||
TEST_OBJ := $(TEST_SRC:.c=.o)
|
||||
|
||||
test/test: ${OBJ} ${TEST_OBJ}
|
||||
${CC} ${CFLAGS} -o $@ ${TEST_OBJ} ${OBJ} ${LDFLAGS}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "notification.h"
|
||||
#include "option_parser.h"
|
||||
#include "settings.h"
|
||||
#include "x.h"
|
||||
#include "x11/x.h"
|
||||
|
||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "rules.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
#include "x.h"
|
||||
#include "x11/x.h"
|
||||
|
||||
int next_notification_id = 1;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "x.h"
|
||||
#include "x11/x.h"
|
||||
|
||||
enum alignment { left, center, right };
|
||||
enum icon_position_t { icons_left, icons_right, icons_off };
|
||||
|
@ -25,11 +25,11 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "dunst.h"
|
||||
#include "markup.h"
|
||||
#include "notification.h"
|
||||
#include "settings.h"
|
||||
#include "utils.h"
|
||||
#include "src/dunst.h"
|
||||
#include "src/markup.h"
|
||||
#include "src/notification.h"
|
||||
#include "src/settings.h"
|
||||
#include "src/utils.h"
|
||||
|
||||
#define WIDTH 400
|
||||
#define HEIGHT 400
|
Loading…
x
Reference in New Issue
Block a user