AR = ar
ARFLAGS = rcs
-# Enable Sanitizers
+# Clang - 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
-GPROF = 0
-GCOV = 0
-
-# GCC Debugging
-ifeq ($(DEBUG), 1)
- CFLAGS += -g -O0
- LDFLAGS += -g -O0
-endif
-
-# GCC Profiling
-ifeq ($(GPROF), 1)
- CFLAGS += -pg
- LDFLAGS += -pg
-endif
-
-# GCC Coverage
-ifeq ($(GCOV), 1)
- CFLAGS += --coverage
- LDFLAGS += --coverage
-endif
+# GCC - Enable Sanitizers
+#CFLAGS += -g -fsanitize=address,leak,undefined
+#LDFLAGS += -g -fsanitize=address,leak,undefined -lasan
+
+# GCC/Clang Profiling
+#CFLAGS += -pg
+#LDFLAGS += -pg
+
+# GCC/Clang Coverage
+#CFLAGS += -g O0 --coverage
+#LDFLAGS += -g O0 --coverage
SearchTerm = view_fetch(win_view(id), row, col, risfile);
view_findstr(win_view(EDIT), SearchDir, SearchTerm);
SyncMouse = true;
- } else {
- free(FetchCmd[1]);
}
+ free(FetchCmd[1]);
}
}
int nevents, nqueued;
do {
nqueued = XEventsQueued(X.display, QueuedAfterFlush);
- XGetMotionEvents(X.display, X.self, CurrentTime, CurrentTime, &nevents);
+ XTimeCoord* coords = XGetMotionEvents(X.display, X.self, CurrentTime, CurrentTime, &nevents);
+ if (coords) XFree(coords);
for (XEvent e; XPending(X.display);) {
XNextEvent(X.display, &e);
if (!XFilterEvent(&e, None) && X.eventfns[e.type])
/* if we still have args left we're going to open it in this instance */
if (*argv) {
char* path = realpath(*argv, NULL);
- if (!path) path = *argv; /* if file doesnt exist, use the original name */
+ if (!path) path = strdup(*argv); /* if file doesnt exist, use the original name */
view_init(win_view(EDIT), path);
view_setln(win_view(EDIT), line_num);
win_title(path);
win_prop_set("FILE", "file", path);
+ free(path);
}
/* now create the window and start the event loop */