* tide: should re-register with the registrar when a new registrar is launched
* tide: Line - Get the current line number(s) containing the selection
* tide: gap buffer does not handle UTF-8 currently
-* tide: holding cut shortcut will segfault eventually, paste probably as well
* edit: hangs after launching an empty tide instance then trying to open already open file
## BACKLOG
findfile [VALUE]
matches [NAME] [REGEX]
exec [CMD] [ARGS...]
-
CFLAGS = -g -MMD $(INCS)
CFLAGS += --std=c99 -pedantic
CFLAGS += -Wall -Wextra
-#CFLAGS += -Werror
+CFLAGS += -Werror
CFLAGS += -Wno-missing-field-initializers -Wno-implicit-fallthrough
+
# Linker Setup
LD = $(CC)
LDFLAGS = $(LIBS) -lX11 -lXft -lfontconfig -lXinerama -lutil -lm
AR = ar
ARFLAGS = rcs
+# Enable Sanitizers
+#CFLAGS += -g -fsanitize=address,undefined
+#LDFLAGS += -g -fsanitize=address,undefined
+
# Set the variables below or set them on the command line to enable the
# corresponding feature
DEBUG = 0
void win_title(char* path);
void win_font(char* font);
void win_prop_set(char* xname, char* ename, char* value);
-void win_update(int ms);
void win_loop(void);
void win_quit(void);
void win_togglefocus(void);
-void win_syncmouse(void);
-
View* win_view(WinRegion id);
Buf* win_buf(WinRegion id);
bool win_keymodsset(int mask);
-bool win_sel_get(int selid, void(*cbfn)(char*));
-bool win_sel_set(int selid, char* str);
}
}
-static void job_finish(Job* job) {
- if (job == JobList) {
- JobList = JobList->next;
+static Job* job_remove(Job* list, Job* job) {
+ if (list == job) {
+ return job->next;
} else {
- Job* curr = JobList;
- while (curr->next && curr->next->fd != job->fd) {
- curr->next = curr->next->next;
- curr = curr->next;
- }
+ list->next = job_remove(list->next, job);
+ return list;
}
+}
+
+static void job_finish(Job* job) {
+ JobList = job_remove(JobList, job);
close(job->fd);
free(job->data);
free(job);