1
1
(cherry picked from commit e4e8ebd9e0037812436a1588809deb23e0f3751a)
Этот коммит содержится в:
Christian Göttsche 2020-04-07 21:46:46 +02:00 коммит произвёл Yorhel
родитель bd22bf42ee
Коммит 39709aa665
12 изменённых файлов: 26 добавлений и 26 удалений

Просмотреть файл

@ -42,7 +42,7 @@ static signed char seloption;
static int lasterrno;
static void delete_draw_confirm() {
static void delete_draw_confirm(void) {
nccreate(6, 60, "Confirm delete");
ncprint(1, 2, "Are you sure you want to delete \"%s\"%c",
@ -67,7 +67,7 @@ static void delete_draw_confirm() {
}
static void delete_draw_progress() {
static void delete_draw_progress(void) {
nccreate(6, 60, "Deleting...");
ncaddstr(1, 2, cropstr(getpath(curdir), 47));
@ -77,7 +77,7 @@ static void delete_draw_progress() {
}
static void delete_draw_error() {
static void delete_draw_error(void) {
nccreate(6, 60, "Error!");
ncprint(1, 2, "Can't delete %s:", cropstr(getpath(curdir), 42));

Просмотреть файл

@ -103,7 +103,7 @@ int dir_export_init(const char *fn);
/* Function set by input code. Returns dir_output.final(). */
extern int (*dir_process)();
extern int (*dir_process)(void);
/* Scanning a live directory */
extern int dir_scan_smfs;
@ -121,7 +121,7 @@ extern struct dir_output dir_output;
extern char *dir_curpath;
void dir_curpath_set(const char *);
void dir_curpath_enter(const char *);
void dir_curpath_leave();
void dir_curpath_leave(void);
/* Sets the path where the last error occurred, or reset on NULL. */
void dir_setlasterr(const char *);
@ -132,6 +132,6 @@ void dir_seterr(const char *, ...);
extern int dir_ui;
int dir_key(int);
void dir_draw();
void dir_draw(void);
#endif

Просмотреть файл

@ -31,7 +31,7 @@
#include <stdarg.h>
int (*dir_process)();
int (*dir_process)(void);
char *dir_curpath; /* Full path of the last seen item. */
struct dir_output dir_output;
char *dir_fatalerr; /* Error message on a fatal error. (NULL if there was no fatal error) */
@ -107,7 +107,7 @@ void dir_seterr(const char *fmt, ...) {
}
static void draw_progress() {
static void draw_progress(void) {
static const char scantext[] = "Scanning...";
static const char loadtext[] = "Loading...";
static size_t anpos = 0;

Просмотреть файл

@ -159,7 +159,7 @@ static inline void con(int n) {
/* Consumes any whitespace. If *ctx->buf == 0 after this function, we've reached EOF. */
static int cons() {
static int cons(void) {
while(1) {
C(!*ctx->buf && fill(1));
@ -289,7 +289,7 @@ static int rint64(uint64_t *val, uint64_t max) {
/* Parse and consume a JSON number. The result is discarded.
* TODO: Improve validation. */
static int rnum() {
static int rnum(void) {
int haschar = 0;
C(rfill1);
while(1) {
@ -324,7 +324,7 @@ static int rkey(char *dest, int destlen) {
/* (Recursively) parse and consume any JSON value. The result is discarded. */
static int rval() {
static int rval(void) {
C(rfill1);
switch(*ctx->buf) {
case 't': /* true */
@ -377,7 +377,7 @@ static int rval() {
/* Consumes everything up to the root item, and checks that this item is a dir. */
static int header() {
static int header(void) {
uint64_t v;
C(cons());
@ -422,7 +422,7 @@ static int itemdir(uint64_t dev) {
/* Reads a JSON object representing a struct dir/dir_ext item. Writes to
* ctx->buf_dir, ctx->buf_ext and ctx->buf_name. */
static int iteminfo() {
static int iteminfo(void) {
uint64_t iv;
E(*ctx->buf != '{', "Expected JSON object");
@ -557,7 +557,7 @@ static int item(uint64_t dev) {
}
static int footer() {
static int footer(void) {
C(cons());
E(*ctx->buf != ']', "Expected ']'");
con(1);
@ -567,7 +567,7 @@ static int footer() {
}
static int process() {
static int process(void) {
int fail = 0;
header();

Просмотреть файл

@ -255,7 +255,7 @@ static int dir_walk(char *dir) {
}
static int process() {
static int process(void) {
char *path;
char *dir;
int fail = 0;

Просмотреть файл

@ -161,7 +161,7 @@ static struct dir *dirlist_sort(struct dir *list) {
* - makes sure one, and only one, visible item is selected
* - updates the dirlist_(maxs|maxa) values
* - makes sure that the FF_BSEL bits are correct */
static void dirlist_fixup() {
static void dirlist_fixup(void) {
struct dir *t;
/* we're going to determine the selected items from the list itself, so reset this one */

Просмотреть файл

@ -29,7 +29,7 @@
void exclude_add(char *);
int exclude_addfile(char *);
int exclude_match(char *);
void exclude_clear();
void exclude_clear(void);
int has_cachedir_tag(const char *name);
#endif

Просмотреть файл

@ -110,7 +110,7 @@ extern int follow_symlinks;
int input_handle(int);
/* de-initialize ncurses */
void close_nc();
void close_nc(void);
/* import all other global functions and variables */

Просмотреть файл

@ -30,7 +30,7 @@
int help_key(int);
void help_draw(void);
void help_init();
void help_init(void);
#endif

Просмотреть файл

@ -50,7 +50,7 @@ static int ncurses_tty = 0; /* Explicitely open /dev/tty instead of using stdio
static long lastupdate = 999;
static void screen_draw() {
static void screen_draw(void) {
switch(pstate) {
case ST_CALC: dir_draw(); break;
case ST_BROWSE: browse_draw(); break;
@ -236,7 +236,7 @@ static void argv_parse(int argc, char **argv) {
/* Initializes ncurses only when not done yet. */
static void init_nc() {
static void init_nc(void) {
int ok = 0;
FILE *tty;
SCREEN *term;

Просмотреть файл

@ -30,6 +30,6 @@
#include "global.h"
void shell_draw(void);
void shell_init();
void shell_init(void);
#endif

Просмотреть файл

@ -60,7 +60,7 @@ enum ui_coltype {
/* Color & attribute manipulation */
extern int uic_theme;
void uic_init();
void uic_init(void);
void uic_set(enum ui_coltype);
@ -141,7 +141,7 @@ char *fullsize(int64_t);
char *fmtmode(unsigned short);
/* read locale information from the environment */
void read_locale();
void read_locale(void);
/* recursively free()s a directory tree */
void freedir(struct dir *);
@ -187,7 +187,7 @@ void addparentstats(struct dir *, int64_t, int64_t, uint64_t, int);
/* Malloc wrappers that exit on OOM */
void *xmalloc();
void *xmalloc(size_t);
void *xcalloc(size_t, size_t);
void *xrealloc(void *, size_t);