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>
This commit is contained in:
Berke Kocaoğlu
2021-10-11 06:07:18 +03:00
committed by GitHub
parent 675db4bbb6
commit 1449bfc5e9
11 changed files with 45 additions and 68 deletions

View File

@ -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"
};