From 8b752adcd45a29321165e025ce6804c9db4354f9 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 16 May 2025 15:57:04 +0800 Subject: [PATCH] opt: remove useless code --- src/maomao.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index f8ec41d..52d049c 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -415,8 +415,6 @@ typedef struct { } SessionLock; /* function declarations */ -static void logtofile(const char *fmt, ...); // 日志函数 -static void lognumtofile(float num); // 日志函数 static void applybounds( Client *c, struct wlr_box *bbox); // 设置边界规则,能让一些窗口拥有比较适合的大小 @@ -1742,26 +1740,6 @@ setclient_coordinate_center(struct wlr_box geom, int offsetx, int offsety) { } /* function implementations */ -void logtofile(const char *fmt, ...) { - char buf[256]; - char cmd[256]; - va_list ap; - va_start(ap, fmt); - vsprintf((char *)buf, fmt, ap); - va_end(ap); - unsigned int i = strlen((const char *)buf); - - sprintf(cmd, "echo '%.*s' >> ~/log", i, buf); - system(cmd); -} - -/* function implementations */ -void lognumtofile(float num) { - char cmd[256]; - sprintf(cmd, "echo '%f' >> ~/log", num); - system(cmd); -} - int // 0.5 custom applyrulesgeom(Client *c) { /* rule matching */