nsxiva09b20c
Use void for empty argument lists
+23 −23
7 files changed
- M Makefile +1 −1
- M commands.c +5 −5
- M main.c +11 −11
- M options.c +2 −2
- M options.h +2 −2
- M thumbs.c +1 −1
- M util.c +1 −1
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20111011 | |
| 1 | + | VERSION = git-20111012 | |
| 2 | 2 | ||
| 3 | 3 | CC = gcc | |
| 4 | 4 | CFLAGS = -Wall -pedantic -O2 | |
| @@ -28,13 +28,13 @@ | |||
| 28 | 28 | #include "thumbs.h" | |
| 29 | 29 | #include "util.h" | |
| 30 | 30 | ||
| 31 | − | void cleanup(); | |
| 31 | + | void cleanup(void); | |
| 32 | 32 | void remove_file(int, bool); | |
| 33 | 33 | void load_image(int); | |
| 34 | − | void redraw(); | |
| 35 | − | void reset_cursor(); | |
| 36 | − | void animate(); | |
| 37 | − | void slideshow(); | |
| 34 | + | void redraw(void); | |
| 35 | + | void reset_cursor(void); | |
| 36 | + | void animate(void); | |
| 37 | + | void slideshow(void); | |
| 38 | 38 | void set_timeout(timeout_f, int, bool); | |
| 39 | 39 | void reset_timeout(timeout_f); | |
| 40 | 40 | ||
| @@ -49,10 +49,10 @@ typedef struct { | |||
| 49 | 49 | } timeout_t; | |
| 50 | 50 | ||
| 51 | 51 | /* timeout handler functions: */ | |
| 52 | − | void redraw(); | |
| 53 | − | void reset_cursor(); | |
| 54 | − | void animate(); | |
| 55 | − | void slideshow(); | |
| 52 | + | void redraw(void); | |
| 53 | + | void reset_cursor(void); | |
| 54 | + | void animate(void); | |
| 55 | + | void slideshow(void); | |
| 56 | 56 | ||
| 57 | 57 | appmode_t mode; | |
| 58 | 58 | img_t img; | |
| @@ -72,7 +72,7 @@ timeout_t timeouts[] = { | |||
| 72 | 72 | { { 0, 0 }, false, slideshow }, | |
| 73 | 73 | }; | |
| 74 | 74 | ||
| 75 | − | void cleanup() { | |
| 75 | + | void cleanup(void) { | |
| 76 | 76 | static bool in = false; | |
| 77 | 77 | ||
| 78 | 78 | if (!in) { | |
| @@ -216,7 +216,7 @@ void load_image(int new) { | |||
| 216 | 216 | reset_timeout(animate); | |
| 217 | 217 | } | |
| 218 | 218 | ||
| 219 | − | void update_title() { | |
| 219 | + | void update_title(void) { | |
| 220 | 220 | int n; | |
| 221 | 221 | char sshow_info[16]; | |
| 222 | 222 | char frame_info[16]; | |
| @@ -260,7 +260,7 @@ void update_title() { | |||
| 260 | 260 | win_set_title(&win, win_title); | |
| 261 | 261 | } | |
| 262 | 262 | ||
| 263 | − | void redraw() { | |
| 263 | + | void redraw(void) { | |
| 264 | 264 | if (mode == MODE_IMAGE) { | |
| 265 | 265 | img_render(&img); | |
| 266 | 266 | if (img.slideshow && !img.multi.animate) { | |
| @@ -277,7 +277,7 @@ void redraw() { | |||
| 277 | 277 | reset_cursor(); | |
| 278 | 278 | } | |
| 279 | 279 | ||
| 280 | − | void reset_cursor() { | |
| 280 | + | void reset_cursor(void) { | |
| 281 | 281 | int i; | |
| 282 | 282 | cursor_t cursor = CURSOR_NONE; | |
| 283 | 283 | ||
| @@ -298,14 +298,14 @@ void reset_cursor() { | |||
| 298 | 298 | win_set_cursor(&win, cursor); | |
| 299 | 299 | } | |
| 300 | 300 | ||
| 301 | − | void animate() { | |
| 301 | + | void animate(void) { | |
| 302 | 302 | if (img_frame_animate(&img, false)) { | |
| 303 | 303 | redraw(); | |
| 304 | 304 | set_timeout(animate, img.multi.frames[img.multi.sel].delay, true); | |
| 305 | 305 | } | |
| 306 | 306 | } | |
| 307 | 307 | ||
| 308 | − | void slideshow() { | |
| 308 | + | void slideshow(void) { | |
| 309 | 309 | if (mode == MODE_IMAGE && !img.multi.animate) { | |
| 310 | 310 | if (fileidx + 1 < filecnt) { | |
| 311 | 311 | load_image(fileidx + 1); | |
| @@ -390,7 +390,7 @@ void on_buttonpress(XButtonEvent *bev) { | |||
| 390 | 390 | } | |
| 391 | 391 | } | |
| 392 | 392 | ||
| 393 | − | void run() { | |
| 393 | + | void run(void) { | |
| 394 | 394 | int xfd; | |
| 395 | 395 | fd_set fds; | |
| 396 | 396 | struct timeval timeout; | |
| @@ -32,12 +32,12 @@ | |||
| 32 | 32 | options_t _options; | |
| 33 | 33 | const options_t *options = (const options_t*) &_options; | |
| 34 | 34 | ||
| 35 | − | void print_usage() { | |
| 35 | + | void print_usage(void) { | |
| 36 | 36 | printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] " | |
| 37 | 37 | "[-z ZOOM] FILES...\n"); | |
| 38 | 38 | } | |
| 39 | 39 | ||
| 40 | − | void print_version() { | |
| 40 | + | void print_version(void) { | |
| 41 | 41 | printf("sxiv %s - Simple X Image Viewer\n", VERSION); | |
| 42 | 42 | printf("Additional features included (+) or not (-): %s, %s\n", | |
| 43 | 43 | #if EXIF_SUPPORT | |
| @@ -48,8 +48,8 @@ typedef struct { | |||
| 48 | 48 | ||
| 49 | 49 | extern const options_t *options; | |
| 50 | 50 | ||
| 51 | − | void print_usage(); | |
| 52 | − | void print_version(); | |
| 51 | + | void print_usage(void); | |
| 52 | + | void print_version(void); | |
| 53 | 53 | ||
| 54 | 54 | void parse_options(int, char**); | |
| 55 | 55 | ||
| @@ -38,7 +38,7 @@ void exif_auto_orientate(const fileinfo_t*); | |||
| 38 | 38 | const int thumb_dim = THUMB_SIZE + 10; | |
| 39 | 39 | char *cache_dir = NULL; | |
| 40 | 40 | ||
| 41 | − | bool tns_cache_enabled() { | |
| 41 | + | bool tns_cache_enabled(void) { | |
| 42 | 42 | struct stat stats; | |
| 43 | 43 | ||
| 44 | 44 | return cache_dir != NULL && stat(cache_dir, &stats) == 0 && | |
| @@ -34,7 +34,7 @@ enum { | |||
| 34 | 34 | FNAME_LEN = 1024 | |
| 35 | 35 | }; | |
| 36 | 36 | ||
| 37 | − | void cleanup(); | |
| 37 | + | void cleanup(void); | |
| 38 | 38 | ||
| 39 | 39 | void* s_malloc(size_t size) { | |
| 40 | 40 | void *ptr; | |