lel

Fork of Hiltjo's Farbfeld image viewer. (It was just for fun, not much use)
Log | Files | Refs | README | LICENSE

commit caa4415bf3614acc5f06c91b01ecc3ed32705dac
parent 984dc5ee73d47dd3dfd4f0626b925ce8deba028d
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sun, 18 Apr 2021 14:52:43 -0700

Organize global variables

- Create X11 and config sections
- Alphabetically sort variables within their sections
- Remove manual initialization when possible

Diffstat:
Mlel.c | 30+++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/lel.c b/lel.c @@ -34,24 +34,28 @@ struct img { } view; }; -static struct img img; -static char **imgs; -static int nimgs; -static int viewmode = ASPECT; -static char *bgcolor = "#000000"; -static XImage *ximg = NULL; -static Drawable xpix = 0; -static Display *dpy = NULL; +/* X11 */ static Colormap cmap; -static Window win; +static Display *dpy; +static Drawable xpix; static GC gc; +static Window win; static XColor bg; -static int screen, xfd; -static int done; -static int winwidth = 0, winheight = 0; -static int winx, winy, reqwinwidth = 320, reqwinheight = 240; +static XImage *ximg; + +/* config */ +static char *bgcolor = "#000000"; static float zoominc = 0.25; static int paninc = 20; +static int winx, winy, reqwinwidth = 320, reqwinheight = 240; + +static char **imgs; +static int done; +static int nimgs; +static int screen, xfd; +static int viewmode; +static int winwidth, winheight; +static struct img img; static void edie(int e, char *s)