Krolyxon
Commit a09b20c

Branches

Refs →

nsxiva09b20c

Use void for empty argument lists

Author
Bert Münnich
Date
2011-10-12 18:38 +0200
Parent
4864f04
Commit
a09b20c5e63839b10bae306e4a23ca5a9d8ebac0

+23 −23

7 files changed

  1. M Makefile +1 −1
  2. M commands.c +5 −5
  3. M main.c +11 −11
  4. M options.c +2 −2
  5. M options.h +2 −2
  6. M thumbs.c +1 −1
  7. M util.c +1 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20111011
1+VERSION = git-20111012
22
33 CC = gcc
44 CFLAGS = -Wall -pedantic -O2
M commands.c View
@@ -28,13 +28,13 @@
2828 #include "thumbs.h"
2929 #include "util.h"
3030
31−void cleanup();
31+void cleanup(void);
3232 void remove_file(int, bool);
3333 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);
3838 void set_timeout(timeout_f, int, bool);
3939 void reset_timeout(timeout_f);
4040
M main.c View
@@ -49,10 +49,10 @@ typedef struct {
4949 } timeout_t;
5050
5151 /* 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);
5656
5757 appmode_t mode;
5858 img_t img;
@@ -72,7 +72,7 @@ timeout_t timeouts[] = {
7272 { { 0, 0 }, false, slideshow },
7373 };
7474
75−void cleanup() {
75+void cleanup(void) {
7676 static bool in = false;
7777
7878 if (!in) {
@@ -216,7 +216,7 @@ void load_image(int new) {
216216 reset_timeout(animate);
217217 }
218218
219−void update_title() {
219+void update_title(void) {
220220 int n;
221221 char sshow_info[16];
222222 char frame_info[16];
@@ -260,7 +260,7 @@ void update_title() {
260260 win_set_title(&win, win_title);
261261 }
262262
263−void redraw() {
263+void redraw(void) {
264264 if (mode == MODE_IMAGE) {
265265 img_render(&img);
266266 if (img.slideshow && !img.multi.animate) {
@@ -277,7 +277,7 @@ void redraw() {
277277 reset_cursor();
278278 }
279279
280−void reset_cursor() {
280+void reset_cursor(void) {
281281 int i;
282282 cursor_t cursor = CURSOR_NONE;
283283
@@ -298,14 +298,14 @@ void reset_cursor() {
298298 win_set_cursor(&win, cursor);
299299 }
300300
301−void animate() {
301+void animate(void) {
302302 if (img_frame_animate(&img, false)) {
303303 redraw();
304304 set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
305305 }
306306 }
307307
308−void slideshow() {
308+void slideshow(void) {
309309 if (mode == MODE_IMAGE && !img.multi.animate) {
310310 if (fileidx + 1 < filecnt) {
311311 load_image(fileidx + 1);
@@ -390,7 +390,7 @@ void on_buttonpress(XButtonEvent *bev) {
390390 }
391391 }
392392
393−void run() {
393+void run(void) {
394394 int xfd;
395395 fd_set fds;
396396 struct timeval timeout;
M options.c View
@@ -32,12 +32,12 @@
3232 options_t _options;
3333 const options_t *options = (const options_t*) &_options;
3434
35−void print_usage() {
35+void print_usage(void) {
3636 printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] "
3737 "[-z ZOOM] FILES...\n");
3838 }
3939
40−void print_version() {
40+void print_version(void) {
4141 printf("sxiv %s - Simple X Image Viewer\n", VERSION);
4242 printf("Additional features included (+) or not (-): %s, %s\n",
4343 #if EXIF_SUPPORT
M options.h View
@@ -48,8 +48,8 @@ typedef struct {
4848
4949 extern const options_t *options;
5050
51−void print_usage();
52−void print_version();
51+void print_usage(void);
52+void print_version(void);
5353
5454 void parse_options(int, char**);
5555
M thumbs.c View
@@ -38,7 +38,7 @@ void exif_auto_orientate(const fileinfo_t*);
3838 const int thumb_dim = THUMB_SIZE + 10;
3939 char *cache_dir = NULL;
4040
41−bool tns_cache_enabled() {
41+bool tns_cache_enabled(void) {
4242 struct stat stats;
4343
4444 return cache_dir != NULL && stat(cache_dir, &stats) == 0 &&
M util.c View
@@ -34,7 +34,7 @@ enum {
3434 FNAME_LEN = 1024
3535 };
3636
37−void cleanup();
37+void cleanup(void);
3838
3939 void* s_malloc(size_t size) {
4040 void *ptr;