Skip to content

Commit

Permalink
fix all -Wmissing-prototypes warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
N-R-K committed Apr 29, 2022
1 parent d9284b1 commit faeebc0
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 48 deletions.
6 changes: 3 additions & 3 deletions cookie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -254,7 +254,7 @@ find_cookie(ParsedURL *pu)
return tmp;
}

int
static int
check_avoid_wrong_number_of_dots_domain( Str domain )
{
TextListItem *tl;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions entity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand Down
10 changes: 5 additions & 5 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -938,7 +938,7 @@ checkHeader(Buffer *buf, char *field)
return NULL;
}

char *
static char *
checkContentType(Buffer *buf)
{
char *p;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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>");
Expand Down Expand Up @@ -6341,7 +6341,7 @@ file_feed(void)
return s;
}

void
static void
HTMLlineproc3(Buffer *buf, InputStream stream)
{
_file_lp2 = stream;
Expand Down
2 changes: 1 addition & 1 deletion frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ copyFrameSet(struct frameset *of)
return rf;
}

void
static void
flushFrameSet(struct frameset *fs)
{
int n = fs->i;
Expand Down
1 change: 1 addition & 0 deletions func.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "func.h"
#include "myctype.h"
#include "regex.h"
#include "rc.h"

#include "funcname.c"
#include "functable.c"
Expand Down
24 changes: 10 additions & 14 deletions image.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

static int image_index = 0;

static void closeImgdisplay(void);

/* display image */

typedef struct _termialImage {
Expand All @@ -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()
Expand All @@ -46,8 +48,8 @@ initImage()

int get_pixel_per_cell(int *ppc, int *ppl);

int
getCharSize()
static int
getCharSize(void)
{
FILE *f;
Str tmp;
Expand Down Expand Up @@ -134,7 +136,7 @@ openImgdisplay()
}

static void
closeImgdisplay()
closeImgdisplay(void)
{
if (Imgdisplay_wf)
fclose(Imgdisplay_wf);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -388,7 +384,7 @@ getAllImage(Buffer *buf)
}
}

void
static void
showImageProgress(Buffer *buf)
{
AnchorList *al;
Expand Down
2 changes: 1 addition & 1 deletion linein.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ next_dcompl(int next)
}


Str
static Str
escape_spaces(Str s)
{
Str tmp = NULL;
Expand Down
2 changes: 1 addition & 1 deletion mailcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -363,7 +364,7 @@ sig_chld(int signo)
}
#endif

Str
static Str
make_optional_header_string(char *s)
{
char *p;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "regex.h"
#include <stdlib.h>
#include <stddef.h>
#include "rc.h"

struct param_ptr {
char *name;
Expand Down Expand Up @@ -850,7 +851,7 @@ create_option_search_table()
}
}

struct param_ptr *
static struct param_ptr *
search_param(char *name)
{
size_t b, e, i;
Expand Down
7 changes: 7 additions & 0 deletions rc.h
Original file line number Diff line number Diff line change
@@ -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 */
20 changes: 10 additions & 10 deletions table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -922,7 +922,7 @@ check_cell_width(short *tabwidth, short *cellwidth,
}
}

void
static void
check_minimum_width(struct table *t, short *tabwidth)
{
int i;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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__
Expand Down Expand Up @@ -1677,7 +1677,7 @@ initRenderTable(void)
cotable_level = 0;
}

void
static void
renderCoTable(struct table *tbl, int maxlimit)
{
struct readbuffer obuf;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions terms.c
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ clrtoeol(void)
}

#ifdef USE_BG_COLOR
void
static void
clrtoeol_with_bcolor(void)
{
int i, cli, cco;
Expand Down Expand Up @@ -2093,7 +2093,7 @@ clrtoeolx(void)
}
#endif /* not USE_BG_COLOR */

void
static void
clrtobot_eol(void (*clrtoeol) ())
{
int l, c;
Expand Down Expand Up @@ -2422,7 +2422,7 @@ bell(void)
write1(7);
}

void
static void
skip_escseq(void)
{
int c;
Expand Down
8 changes: 8 additions & 0 deletions terms.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
4 changes: 2 additions & 2 deletions w3mbookmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit faeebc0

Please sign in to comment.