Declare every extern function/variable in nsxiv.h
(#268)
with a couple exceptions as they cause too many -Wshadow warnings. also moves the `extcmd_t` typedef on top for cosmetic purposes. also enable `-Wmissing-prototypes` in the ci
This commit is contained in:
25
main.c
25
main.c
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
#include "nsxiv.h"
|
||||
#include "commands.h"
|
||||
#define _MAPPINGS_CONFIG
|
||||
#include "commands.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -45,18 +45,18 @@ typedef struct {
|
||||
timeout_f handler;
|
||||
} timeout_t;
|
||||
|
||||
/* timeout handler functions: */
|
||||
void redraw(void);
|
||||
void reset_cursor(void);
|
||||
void animate(void);
|
||||
void slideshow(void);
|
||||
void clear_resize(void);
|
||||
typedef struct {
|
||||
int err;
|
||||
char *cmd;
|
||||
} extcmd_t;
|
||||
|
||||
appmode_t mode;
|
||||
/* these are not declared in nsxiv.h, as it causes too many -Wshadow warnings */
|
||||
arl_t arl;
|
||||
img_t img;
|
||||
tns_t tns;
|
||||
win_t win;
|
||||
|
||||
appmode_t mode;
|
||||
const XButtonEvent *xbutton_ev;
|
||||
|
||||
fileinfo_t *files;
|
||||
@ -70,11 +70,6 @@ static bool extprefix;
|
||||
|
||||
static bool resized = false;
|
||||
|
||||
typedef struct {
|
||||
int err;
|
||||
char *cmd;
|
||||
} extcmd_t;
|
||||
|
||||
static struct {
|
||||
extcmd_t f, ft;
|
||||
int fd;
|
||||
@ -527,7 +522,7 @@ void clear_resize(void)
|
||||
resized = false;
|
||||
}
|
||||
|
||||
Bool is_input_ev(Display *dpy, XEvent *ev, XPointer arg)
|
||||
static Bool is_input_ev(Display *dpy, XEvent *ev, XPointer arg)
|
||||
{
|
||||
return ev->type == ButtonPress || ev->type == KeyPress;
|
||||
}
|
||||
@ -822,7 +817,7 @@ static int fncmp(const void *a, const void *b)
|
||||
return strcoll(((fileinfo_t*) a)->name, ((fileinfo_t*) b)->name);
|
||||
}
|
||||
|
||||
void sigchld(int sig)
|
||||
static void sigchld(int sig)
|
||||
{
|
||||
while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user