From 4fc21c178b236ff2c5d7e9d956d3085da3a22092 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 26 Mar 2018 22:33:46 -0400 Subject: [PATCH] minor cleanup --- lib/x11.c | 17 ----------------- tide.c | 4 ---- 2 files changed, 21 deletions(-) diff --git a/lib/x11.c b/lib/x11.c index 80d2e57..abcbf55 100644 --- a/lib/x11.c +++ b/lib/x11.c @@ -59,7 +59,6 @@ static void onmousedrag(int state, int x, int y); static void onmousebtn(int btn, bool pressed, int x, int y); static void onwheelup(WinRegion id, bool pressed, size_t row, size_t col); static void onwheeldn(WinRegion id, bool pressed, size_t row, size_t col); -static void oncommand(char* cmd); static void draw_glyphs(size_t x, size_t y, UGlyph* glyphs, size_t rlen, size_t ncols); static WinRegion getregion(size_t x, size_t y); @@ -85,7 +84,6 @@ struct XFont { int ncached; }; -static bool Running = true; static struct { Window root; Display* display; @@ -124,10 +122,6 @@ static Rune LastKey; static KeyBinding* Keys = NULL; static void (*InputFunc)(Rune); -void x11_deinit(void) { - Running = false; -} - void x11_init(XConfig* cfg) { signal(SIGPIPE, SIG_IGN); // Ignore the SIGPIPE signal setlocale(LC_CTYPE, ""); @@ -652,17 +646,6 @@ static void onwheeldn(WinRegion id, bool pressed, size_t row, size_t col) { view_scroll(win_view(id), +ScrollBy); } -static void oncommand(char* cmd) { - size_t line = strtoul(cmd, NULL, 0); - if (line) { - View* view = win_view(EDIT); - win_setregion(EDIT); - view_setln(view, line); - view_eol(view, false); - view_selctx(view); - } -} - static void draw_glyphs(size_t x, size_t y, UGlyph* glyphs, size_t rlen, size_t ncols) { XGlyphSpec specs[rlen]; size_t i = 0; diff --git a/tide.c b/tide.c index 76a180d..1ba6396 100644 --- a/tide.c +++ b/tide.c @@ -325,11 +325,7 @@ static void quit(void) { static uint64_t before = 0; uint64_t now = getmillis(); if (!win_buf(EDIT)->modified || (now-before) <= (uint64_t)ClickTime) { - #ifndef TEST - x11_deinit(); - #else exit(0); - #endif } else { ondiagmsg("File is modified. Repeat action twice quickly to quit."); } -- 2.54.0