Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Use void for empty argument lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Bert Münnich committed Oct 12, 2011
1 parent 4864f04 commit a09b20c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,4 +1,4 @@
VERSION = git-20111011
VERSION = git-20111012

CC = gcc
CFLAGS = -Wall -pedantic -O2
Expand Down
10 changes: 5 additions & 5 deletions commands.c
Expand Up @@ -28,13 +28,13 @@
#include "thumbs.h"
#include "util.h"

void cleanup();
void cleanup(void);
void remove_file(int, bool);
void load_image(int);
void redraw();
void reset_cursor();
void animate();
void slideshow();
void redraw(void);
void reset_cursor(void);
void animate(void);
void slideshow(void);
void set_timeout(timeout_f, int, bool);
void reset_timeout(timeout_f);

Expand Down
22 changes: 11 additions & 11 deletions main.c
Expand Up @@ -49,10 +49,10 @@ typedef struct {
} timeout_t;

/* timeout handler functions: */
void redraw();
void reset_cursor();
void animate();
void slideshow();
void redraw(void);
void reset_cursor(void);
void animate(void);
void slideshow(void);

appmode_t mode;
img_t img;
Expand All @@ -72,7 +72,7 @@ timeout_t timeouts[] = {
{ { 0, 0 }, false, slideshow },
};

void cleanup() {
void cleanup(void) {
static bool in = false;

if (!in) {
Expand Down Expand Up @@ -216,7 +216,7 @@ void load_image(int new) {
reset_timeout(animate);
}

void update_title() {
void update_title(void) {
int n;
char sshow_info[16];
char frame_info[16];
Expand Down Expand Up @@ -260,7 +260,7 @@ void update_title() {
win_set_title(&win, win_title);
}

void redraw() {
void redraw(void) {
if (mode == MODE_IMAGE) {
img_render(&img);
if (img.slideshow && !img.multi.animate) {
Expand All @@ -277,7 +277,7 @@ void redraw() {
reset_cursor();
}

void reset_cursor() {
void reset_cursor(void) {
int i;
cursor_t cursor = CURSOR_NONE;

Expand All @@ -298,14 +298,14 @@ void reset_cursor() {
win_set_cursor(&win, cursor);
}

void animate() {
void animate(void) {
if (img_frame_animate(&img, false)) {
redraw();
set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
}
}

void slideshow() {
void slideshow(void) {
if (mode == MODE_IMAGE && !img.multi.animate) {
if (fileidx + 1 < filecnt) {
load_image(fileidx + 1);
Expand Down Expand Up @@ -390,7 +390,7 @@ void on_buttonpress(XButtonEvent *bev) {
}
}

void run() {
void run(void) {
int xfd;
fd_set fds;
struct timeval timeout;
Expand Down
4 changes: 2 additions & 2 deletions options.c
Expand Up @@ -32,12 +32,12 @@
options_t _options;
const options_t *options = (const options_t*) &_options;

void print_usage() {
void print_usage(void) {
printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] "
"[-z ZOOM] FILES...\n");
}

void print_version() {
void print_version(void) {
printf("sxiv %s - Simple X Image Viewer\n", VERSION);
printf("Additional features included (+) or not (-): %s, %s\n",
#if EXIF_SUPPORT
Expand Down
4 changes: 2 additions & 2 deletions options.h
Expand Up @@ -48,8 +48,8 @@ typedef struct {

extern const options_t *options;

void print_usage();
void print_version();
void print_usage(void);
void print_version(void);

void parse_options(int, char**);

Expand Down
2 changes: 1 addition & 1 deletion thumbs.c
Expand Up @@ -38,7 +38,7 @@ void exif_auto_orientate(const fileinfo_t*);
const int thumb_dim = THUMB_SIZE + 10;
char *cache_dir = NULL;

bool tns_cache_enabled() {
bool tns_cache_enabled(void) {
struct stat stats;

return cache_dir != NULL && stat(cache_dir, &stats) == 0 &&
Expand Down
2 changes: 1 addition & 1 deletion util.c
Expand Up @@ -34,7 +34,7 @@ enum {
FNAME_LEN = 1024
};

void cleanup();
void cleanup(void);

void* s_malloc(size_t size) {
void *ptr;
Expand Down

0 comments on commit a09b20c

Please sign in to comment.