diff --git a/cookie.c b/cookie.c index 705e27760..0a6aecf8c 100644 --- a/cookie.c +++ b/cookie.c @@ -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; diff --git a/entity.c b/entity.c index 67b8cfb38..acb593fda 100644 --- a/entity.c +++ b/entity.c @@ -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:", diff --git a/file.c b/file.c index 655cce42f..371ca9729 100644 --- a/file.c +++ b/file.c @@ -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(""); @@ -6341,7 +6341,7 @@ file_feed(void) return s; } -void +static void HTMLlineproc3(Buffer *buf, InputStream stream) { _file_lp2 = stream; diff --git a/frame.c b/frame.c index be1a961d1..6369cdc3c 100644 --- a/frame.c +++ b/frame.c @@ -210,7 +210,7 @@ copyFrameSet(struct frameset *of) return rf; } -void +static void flushFrameSet(struct frameset *fs) { int n = fs->i; diff --git a/func.c b/func.c index 8b5deac18..c229799c1 100644 --- a/func.c +++ b/func.c @@ -9,6 +9,7 @@ #include "func.h" #include "myctype.h" #include "regex.h" +#include "rc.h" #include "funcname.c" #include "functable.c" diff --git a/image.c b/image.c index 353204084..2c6bab203 100644 --- a/image.c +++ b/image.c @@ -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; diff --git a/linein.c b/linein.c index b58cad6e5..9da03ad23 100644 --- a/linein.c +++ b/linein.c @@ -845,7 +845,7 @@ next_dcompl(int next) } -Str +static Str escape_spaces(Str s) { Str tmp = NULL; diff --git a/mailcap.c b/mailcap.c index c0275eeb5..cca13f979 100644 --- a/mailcap.c +++ b/mailcap.c @@ -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; diff --git a/main.c b/main.c index 45f5a4b86..7873a5ade 100644 --- a/main.c +++ b/main.c @@ -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; diff --git a/rc.c b/rc.c index ba8f9ee47..dcada8102 100644 --- a/rc.c +++ b/rc.c @@ -12,6 +12,7 @@ #include "regex.h" #include #include +#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; diff --git a/rc.h b/rc.h new file mode 100644 index 000000000..edb182181 --- /dev/null +++ b/rc.h @@ -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 */ diff --git a/table.c b/table.c index 9d99bb3a0..043df86a5 100644 --- a/table.c +++ b/table.c @@ -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; diff --git a/terms.c b/terms.c index 253f39ea2..ad6df34a4 100644 --- a/terms.c +++ b/terms.c @@ -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; diff --git a/terms.h b/terms.h index 55c7a60e2..8c6992eeb 100644 --- a/terms.h +++ b/terms.h @@ -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 */ diff --git a/w3mbookmark.c b/w3mbookmark.c index 2e64327dd..bf3dade38 100644 --- a/w3mbookmark.c +++ b/w3mbookmark.c @@ -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; diff --git a/w3mhelperpanel.c b/w3mhelperpanel.c index 7d13032b0..a519954eb 100644 --- a/w3mhelperpanel.c +++ b/w3mhelperpanel.c @@ -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();