fix all -Wmissing-prototypes warnings

This commit is contained in:
NRK
2022-04-29 15:38:52 +06:00
parent d9284b1193
commit faeebc076c
16 changed files with 64 additions and 48 deletions
+3 -3
View File
@@ -191,7 +191,7 @@ match_cookie(ParsedURL *pu, struct cookie *cookie, char *domainname)
return 1;
}
struct cookie *
static struct cookie *
get_cookie_info(Str domain, Str path, Str name)
{
struct cookie *p;
@@ -254,7 +254,7 @@ find_cookie(ParsedURL *pu)
return tmp;
}
int
static int
check_avoid_wrong_number_of_dots_domain( Str domain )
{
TextListItem *tl;
@@ -412,7 +412,7 @@ add_cookie(ParsedURL *pu, Str name, Str value,
return 0;
}
struct cookie *
static struct cookie *
nth_cookie(int n)
{
struct cookie *p;
+2
View File
@@ -14,6 +14,8 @@
#endif
#endif /* DUMMY */
extern char * conv_entity(unsigned int c);
/* *INDENT-OFF* */
static char *alt_latin1[ 96 ] = {
NBSP, "!", "-c-", "-L-", "CUR", "=Y=", "|", "S:",
+5 -5
View File
@@ -418,7 +418,7 @@ examineFile(char *path, URLFile *uf)
#define S_IXANY (S_IXUSR|S_IXGRP|S_IXOTH)
int
static int
check_command(char *cmd, int auxbin_p)
{
static char *path = NULL;
@@ -938,7 +938,7 @@ checkHeader(Buffer *buf, char *field)
return NULL;
}
char *
static char *
checkContentType(Buffer *buf)
{
char *p;
@@ -2750,7 +2750,7 @@ is_blank_line(char *line, int indent)
}
#endif
void
static void
fillline(struct readbuffer *obuf, int indent)
{
push_spaces(obuf, 1, indent - obuf->pos);
@@ -4148,7 +4148,7 @@ feed_textarea(char *str)
}
}
Str
static Str
process_hr(struct parsed_tag *tag, int width, int indent_width)
{
Str tmp = Strnew_charp("<nobr>");
@@ -6341,7 +6341,7 @@ file_feed(void)
return s;
}
void
static void
HTMLlineproc3(Buffer *buf, InputStream stream)
{
_file_lp2 = stream;
+1 -1
View File
@@ -210,7 +210,7 @@ copyFrameSet(struct frameset *of)
return rf;
}
void
static void
flushFrameSet(struct frameset *fs)
{
int n = fs->i;
+1
View File
@@ -9,6 +9,7 @@
#include "func.h"
#include "myctype.h"
#include "regex.h"
#include "rc.h"
#include "funcname.c"
#include "functable.c"
+10 -14
View File
@@ -14,6 +14,8 @@
static int image_index = 0;
static void closeImgdisplay(void);
/* display image */
typedef struct _termialImage {
@@ -31,9 +33,9 @@ static int n_terminal_image = 0;
static int max_terminal_image = 0;
static FILE *Imgdisplay_rf = NULL, *Imgdisplay_wf = NULL;
static pid_t Imgdisplay_pid = 0;
static int openImgdisplay();
static void closeImgdisplay();
int getCharSize();
static int openImgdisplay(void);
static void closeImgdisplay(void);
static int getCharSize(void);
void
initImage()
@@ -46,8 +48,8 @@ initImage()
int get_pixel_per_cell(int *ppc, int *ppl);
int
getCharSize()
static int
getCharSize(void)
{
FILE *f;
Str tmp;
@@ -134,7 +136,7 @@ openImgdisplay()
}
static void
closeImgdisplay()
closeImgdisplay(void)
{
if (Imgdisplay_wf)
fclose(Imgdisplay_wf);
@@ -195,14 +197,8 @@ syncImage(void)
n_terminal_image = 0;
}
void put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh);
void put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
void put_image_iterm2(char *url, int x, int y, int w, int h);
void put_image_kitty(char *url, int x, int y, int w, int h, int sx, int sy, int
sw, int sh, int c, int r);
void
drawImage()
drawImage(void)
{
static char buf[64];
int j, draw = FALSE;
@@ -388,7 +384,7 @@ getAllImage(Buffer *buf)
}
}
void
static void
showImageProgress(Buffer *buf)
{
AnchorList *al;
+1 -1
View File
@@ -845,7 +845,7 @@ next_dcompl(int next)
}
Str
static Str
escape_spaces(Str s)
{
Str tmp = NULL;
+1 -1
View File
@@ -308,7 +308,7 @@ searchExtViewer(char *type)
#define MCF_SQUOTED (1 << 0)
#define MCF_DQUOTED (1 << 1)
Str
static Str
quote_mailcap(char *s, int flag)
{
Str d;
+4 -3
View File
@@ -18,6 +18,7 @@
#include "terms.h"
#include "myctype.h"
#include "regex.h"
#include "rc.h"
#ifdef USE_M17N
#include "wc.h"
#include "wtf.h"
@@ -363,7 +364,7 @@ sig_chld(int signo)
}
#endif
Str
static Str
make_optional_header_string(char *s)
{
char *p;
@@ -1886,7 +1887,7 @@ dispincsrch(int ch, Str buf, Lineprop *prop)
return -1;
}
void
static void
isrch(int (*func) (Buffer *, char *), char *prompt)
{
char *str;
@@ -1902,7 +1903,7 @@ isrch(int (*func) (Buffer *, char *), char *prompt)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
void
static void
srch(int (*func) (Buffer *, char *), char *prompt)
{
char *str;
+2 -1
View File
@@ -12,6 +12,7 @@
#include "regex.h"
#include <stdlib.h>
#include <stddef.h>
#include "rc.h"
struct param_ptr {
char *name;
@@ -850,7 +851,7 @@ create_option_search_table()
}
}
struct param_ptr *
static struct param_ptr *
search_param(char *name)
{
size_t b, e, i;
+7
View File
@@ -0,0 +1,7 @@
#ifndef RC_H
#define RC_H
extern void show_params(FILE * fp);
extern int str_to_bool(char *value, int old);
#endif /* RC_H */
+10 -10
View File
@@ -404,7 +404,7 @@ pushdata(struct table *t, int row, int col, char *data)
pushText(t->tabdata[row][col], data ? data : "");
}
void
static void
suspend_or_pushdata(struct table *tbl, char *line)
{
if (tbl->flag & TBL_IN_COL)
@@ -509,7 +509,7 @@ visible_length(char *str)
return len > max_len ? len : max_len;
}
int
static int
visible_length_plain(char *str)
{
int len = 0, max_len = 0;
@@ -922,7 +922,7 @@ check_cell_width(short *tabwidth, short *cellwidth,
}
}
void
static void
check_minimum_width(struct table *t, short *tabwidth)
{
int i;
@@ -937,7 +937,7 @@ check_minimum_width(struct table *t, short *tabwidth)
cell->maxcell, cell->index, t->cellspacing, 0);
}
void
static void
check_maximum_width(struct table *t)
{
struct table_cell *cell = &t->cell;
@@ -1255,7 +1255,7 @@ check_compressible_cell(struct table *t, MAT * minv,
}
#define MAX_ITERATION 10
int
static int
check_table_width(struct table *t, double *newwidth, MAT * minv, int itr)
{
int i, j, k, m, bcol, ecol;
@@ -1513,7 +1513,7 @@ set_table_width(struct table *t, short *newwidth, int maxwidth)
}
#endif /* not MATRIX */
void
static void
check_table_height(struct table *t)
{
int i, j, k;
@@ -1612,7 +1612,7 @@ check_table_height(struct table *t)
#define CHECK_MINIMUM 1
#define CHECK_FIXED 2
int
static int
get_table_width(struct table *t, short *orgwidth, short *cellwidth, int flag)
{
#ifdef __GNUC__
@@ -1677,7 +1677,7 @@ initRenderTable(void)
cotable_level = 0;
}
void
static void
renderCoTable(struct table *tbl, int maxlimit)
{
struct readbuffer obuf;
@@ -2289,7 +2289,7 @@ check_rowcol(struct table *tbl, struct table_mode *mode)
tbl->flag |= TBL_IN_COL;
}
int
static int
skip_space(struct table *t, char *line, struct table_linfo *linfo,
int checkminimum)
{
@@ -3585,7 +3585,7 @@ set_table_matrix0(struct table *t, int maxwidth)
}
}
void
static void
check_relative_width(struct table *t, int maxwidth)
{
int i;
+3 -3
View File
@@ -2059,7 +2059,7 @@ clrtoeol(void)
}
#ifdef USE_BG_COLOR
void
static void
clrtoeol_with_bcolor(void)
{
int i, cli, cco;
@@ -2093,7 +2093,7 @@ clrtoeolx(void)
}
#endif /* not USE_BG_COLOR */
void
static void
clrtobot_eol(void (*clrtoeol) ())
{
int l, c;
@@ -2422,7 +2422,7 @@ bell(void)
write1(7);
}
void
static void
skip_escseq(void)
{
int c;
+8
View File
@@ -30,4 +30,12 @@ extern void disable_win9x_console_input(void);
#endif
#endif
#ifdef USE_IMAGE
extern void put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh);
extern void put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
extern void put_image_iterm2(char *url, int x, int y, int w, int h);
extern void put_image_kitty(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int c, int r);
extern int get_pixel_per_cell(int *ppc, int *ppl);
#endif
#endif /* not TERMS_H */
+2 -2
View File
@@ -51,7 +51,7 @@ static char end_section[] =
static char *Local_cookie = NULL;
void
static void
print_bookmark_panel(char *bmark, char *url, char *title, char *charset)
{
Str tmp, tmp2;
@@ -107,7 +107,7 @@ create_new_bookmark(char *bmark, char *section, char *title, char *url,
return TRUE;
}
int
static int
insert_bookmark(char *bmark, struct parsed_tagarg *data)
{
char *url, *title, *section;
+4 -4
View File
@@ -29,9 +29,9 @@
#define MSG_DOIT "Do it"
#endif /* LANG != JA */
char *local_cookie;
static char *local_cookie;
void
static void
extractMailcapEntry(char *mcap_entry, char **type, char **cmd)
{
int j;
@@ -56,7 +56,7 @@ bye(const char *action, const char *mailcap)
exit(1);
}
void
static void
printMailcapPanel(char *mailcap)
{
FILE *f;
@@ -118,7 +118,7 @@ printMailcapPanel(char *mailcap)
fclose(f);
}
void
static void
editMailcap(char *mailcap, struct parsed_tagarg *args)
{
TextList *t = newTextList();