diff options
author | Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr> | 2021-10-11 06:07:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 09:07:18 +0600 |
commit | 1449bfc5e960a61438c60a67c28da6d7c5bf2c7f (patch) | |
tree | 8836a07412b26650aa5773bd6ccf9d1a474553d6 /commands.c | |
parent | 675db4bbb646ff51cc3ecc8ba7d587670872580a (diff) |
code-style: fix consistency issues all over the codebase (#94)
* remove duplicate comment
* remove empty tabs and blank lines
* move macros and globals ontop
* comment to seprate function implementation
* fix alignment
* switch to *argv[] similar to other suckless code
* kill all empty last lines
* append comment to endif
* reuse existing ARRLEN macro
* comment fall through
* use while (true) everywhere
Co-authored-by: NRK <nrk@disroot.org>
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -233,7 +233,7 @@ bool cg_navigate_marked(arg_t n) { int d, i; int new = fileidx; - + if (prefix > 0) n *= prefix; d = n > 0 ? 1 : -1; @@ -337,14 +337,13 @@ bool ci_drag(arg_t mode) if ((int)(img.w * img.zoom) <= win.w && (int)(img.h * img.zoom) <= win.h) return false; - - win_set_cursor(&win, CURSOR_DRAG); + win_set_cursor(&win, CURSOR_DRAG); win_cursor_pos(&win, &x, &y); ox = x; oy = y; - for (;;) { + while (true) { if (mode == DRAG_ABSOLUTE) { px = MIN(MAX(0.0, x - win.w*0.1), win.w*0.8) / (win.w*0.8) * (win.w - img.w * img.zoom); @@ -449,4 +448,3 @@ bool ct_reload_all(arg_t _) const cmd_t cmds[CMD_COUNT] = { #include "commands.lst" }; - |