From: Chris Hofstaedtler Date: Sun, 21 Dec 2025 17:36:09 +0100 Subject: Update prototypes, types, etc. for gcc-15 Bug-Debian: #1098079 --- config.h.in | 2 +- file.c | 18 ++++++------ frame.c | 4 +-- ftp.c | 4 +-- istream.c | 24 +++++++-------- istream.h | 22 +++++++------- libwc/wc_types.h | 8 ++--- linein.c | 90 ++++++++++++++++++++++++++++---------------------------- main.c | 20 ++++++------- news.c | 4 +-- parsetagx.c | 24 +++++++-------- proto.h | 6 ++-- terms.c | 24 +++++++-------- url.c | 6 ++-- w3mbookmark.c | 1 - w3mhelperpanel.c | 1 - 16 files changed, 128 insertions(+), 130 deletions(-) diff --git a/config.h.in b/config.h.in index e312faf..066f376 100644 --- a/config.h.in +++ b/config.h.in @@ -166,10 +166,10 @@ typedef long clen_t; #undef HAVE_SIGSETJMP #define RETSIGTYPE @RETSIGTYPE@ -typedef RETSIGTYPE MySignalHandler; #define SIGNAL_ARG int _dummy /* XXX */ #define SIGNAL_ARGLIST 0 /* XXX */ #define SIGNAL_RETURN @SIGNAL_RETURN@ +typedef RETSIGTYPE (*MySignalHandler)(SIGNAL_ARG); #ifdef HAVE_SIGSETJMP #ifdef __MINGW32_VERSION diff --git a/file.c b/file.c index 9f8e97e..8e62d63 100644 --- a/file.c +++ b/file.c @@ -187,7 +187,7 @@ static struct compression_decoder { #define SAVE_BUF_SIZE 1536 -static MySignalHandler +static void KeyAbort(SIGNAL_ARG) { LONGJMP(AbortLoading, 1); @@ -1708,7 +1708,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, Buffer *volatile t_buf = NULL; int volatile searchHeader = SearchHeader; int volatile searchHeader_through = TRUE; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; TextList *extra_header = newTextList(); volatile Str uname = NULL; volatile Str pwd = NULL; @@ -7272,7 +7272,7 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) #ifdef USE_IMAGE int volatile image_flag; #endif - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; #ifdef USE_M17N if (fmInitialized && graph_ok()) { @@ -7448,7 +7448,7 @@ Buffer * loadHTMLString(Str page) { URLFile f; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; Buffer *newBuf; init_stream(&f, SCM_LOCAL, newStrStream(page)); @@ -7499,7 +7499,7 @@ loadGopherDir0(URLFile *uf, ParsedURL *pu) Str lbuf, name, file, host, port, type; char *volatile p, *volatile q; int link, pre; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; #ifdef USE_M17N wc_ces doc_charset = DocumentCharset; #endif @@ -7663,7 +7663,7 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf) #ifdef USE_ANSI_COLOR Linecolor *colorBuffer = NULL; #endif - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; if (newBuf == NULL) newBuf = newBuffer(INIT_BUFFER_WIDTH); @@ -7752,7 +7752,7 @@ loadImageBuffer(URLFile *uf, Buffer *newBuf) Str tmp, tmpf; FILE *src = NULL; URLFile f; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; struct stat st; const ParsedURL *pu = newBuf ? &newBuf->currentURL : NULL; @@ -8081,7 +8081,7 @@ getNextPage(Buffer *buf, int plen) #ifdef USE_ANSI_COLOR Linecolor *colorBuffer = NULL; #endif - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; if (buf->pagerSource == NULL) return NULL; @@ -8190,7 +8190,7 @@ save2tmp(URLFile uf, char *tmpf) { FILE *ff; clen_t linelen = 0, trbyte = 0; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; static JMP_BUF env_bak; volatile int retval = 0; char *volatile buf = NULL; diff --git a/frame.c b/frame.c index 6369cdc..41ddfd4 100644 --- a/frame.c +++ b/frame.c @@ -8,7 +8,7 @@ static JMP_BUF AbortLoading; struct frameset *renderFrameSet = NULL; -static MySignalHandler +static void KeyAbort(SIGNAL_ARG) { LONGJMP(AbortLoading, 1); @@ -410,7 +410,7 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level, #endif char *d_target, *p_target, *s_target, *t_target; ParsedURL *currentURL, base; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; int flag; if (f == NULL) diff --git a/ftp.c b/ftp.c index f73d239..85ed39b 100644 --- a/ftp.c +++ b/ftp.c @@ -45,7 +45,7 @@ static struct _FTP current_ftp = { static JMP_BUF AbortLoading; -static MySignalHandler +static void KeyAbort(SIGNAL_ARG) { LONGJMP(AbortLoading, 1); @@ -482,7 +482,7 @@ loadFTPDir0(ParsedURL *pu) char *realpathname, *fn, *q; char **flist; int i, nfile, nfile_max; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; #ifdef USE_M17N wc_ces doc_charset = DocumentCharset; diff --git a/istream.c b/istream.c index 3078f01..aec858f 100644 --- a/istream.c +++ b/istream.c @@ -102,8 +102,8 @@ newInputStream(int des) stream->base.type = IST_BASIC; stream->base.handle = NewWithoutGC(int); *(int *)stream->base.handle = des; - stream->base.read = (int (*)())basic_read; - stream->base.close = (void (*)())basic_close; + stream->base.read = (int (*)(void *, void *, int))basic_read; + stream->base.close = (void (*)(void *))basic_close; return stream; } @@ -119,11 +119,11 @@ newFileStream(FILE * f, void (*closep) ()) stream->file.handle = NewWithoutGC(struct io_file_handle); stream->file.handle->f = f; if (closep) - stream->file.handle->close = closep; + stream->file.handle->close = (void (*)(void *))closep; else - stream->file.handle->close = (void (*)())fclose; - stream->file.read = (int (*)())file_read; - stream->file.close = (void (*)())file_close; + stream->file.handle->close = (void (*)(void *))fclose; + stream->file.read = (int (*)(void *, void *, int))file_read; + stream->file.close = (void (*)(void *))file_close; return stream; } @@ -137,7 +137,7 @@ newStrStream(Str s) init_str_stream(&stream->base, s); stream->str.type = IST_STR; stream->str.handle = NULL; - stream->str.read = (int (*)())str_read; + stream->str.read = (int (*)(void *, void *, int))str_read; stream->str.close = NULL; return stream; } @@ -155,8 +155,8 @@ newSSLStream(SSL * ssl, int sock) stream->ssl.handle = NewWithoutGC(struct ssl_handle); stream->ssl.handle->ssl = ssl; stream->ssl.handle->sock = sock; - stream->ssl.read = (int (*)())ssl_read; - stream->ssl.close = (void (*)())ssl_close; + stream->ssl.read = (int (*)(void *, void *, int))ssl_read; + stream->ssl.close = (void (*)(void *))ssl_close; return stream; } #endif @@ -176,15 +176,15 @@ newEncodedStream(InputStream is, char encoding) stream->ens.handle->pos = 0; stream->ens.handle->encoding = encoding; growbuf_init_without_GC(&stream->ens.handle->gb); - stream->ens.read = (int (*)())ens_read; - stream->ens.close = (void (*)())ens_close; + stream->ens.read = (int (*)(void *, void *, int))ens_read; + stream->ens.close = (void (*)(void *))ens_close; return stream; } int ISclose(InputStream stream) { - MySignalHandler(*prevtrap) (); + MySignalHandler prevtrap; if (stream == NULL) return -1; if (stream->base.close != NULL) { diff --git a/istream.h b/istream.h index 5a04be0..db5927b 100644 --- a/istream.h +++ b/istream.h @@ -22,7 +22,7 @@ typedef struct stream_buffer *StreamBuffer; struct io_file_handle { FILE *f; - void (*close) (); + void (*close) (void *); }; #ifdef USE_SSL @@ -47,8 +47,8 @@ struct base_stream { void *handle; char type; char iseos; - int (*read) (); - void (*close) (); + int (*read) (void *, void *, int); + void (*close) (void *); }; struct file_stream { @@ -56,8 +56,8 @@ struct file_stream { struct io_file_handle *handle; char type; char iseos; - int (*read) (); - void (*close) (); + int (*read) (void *, void *, int); + void (*close) (void *); }; struct str_stream { @@ -65,8 +65,8 @@ struct str_stream { Str handle; char type; char iseos; - int (*read) (); - void (*close) (); + int (*read) (void *, void *, int); + void (*close) (void *); }; #ifdef USE_SSL @@ -75,8 +75,8 @@ struct ssl_stream { struct ssl_handle *handle; char type; char iseos; - int (*read) (); - void (*close) (); + int (*read) (void *, void *, int); + void (*close) (void *); }; #endif /* USE_SSL */ @@ -85,8 +85,8 @@ struct encoded_stream { struct ens_handle *handle; char type; char iseos; - int (*read) (); - void (*close) (); + int (*read) (void *, void *, int); + void (*close) (void *); }; union input_stream { diff --git a/libwc/wc_types.h b/libwc/wc_types.h index 50298eb..049950d 100644 --- a/libwc/wc_types.h +++ b/libwc/wc_types.h @@ -46,7 +46,7 @@ typedef struct { wc_ccs ccs; size_t n; wc_map *map; - wc_wchar_t (*conv)(); + wc_wchar_t (*conv)(wc_ccs, wc_uint32); } wc_table; typedef struct { @@ -61,9 +61,9 @@ typedef struct { char *desc; wc_gset *gset; wc_uchar *gset_ext; - Str (*conv_from)(); - void (*push_to)(); - Str (*char_conv)(); + Str (*conv_from)(void *, wc_ces); + void (*push_to)(void *, wc_wchar_t, void *); + Str (*char_conv)(wc_uchar, void *); } wc_ces_info; typedef struct { diff --git a/linein.c b/linein.c index 9da03ad..5193062 100644 --- a/linein.c +++ b/linein.c @@ -33,24 +33,24 @@ static int NCFileBuf; static int NCFileOffset; static void insertself(char c), -_mvR(void), _mvL(void), _mvRw(void), _mvLw(void), delC(void), insC(void), -_mvB(void), _mvE(void), _enter(void), _quo(void), _bs(void), _bsw(void), -killn(void), killb(void), _inbrk(void), _esc(void), _editor(void), -_prev(void), _next(void), _compl(void), _tcompl(void), +_mvR(char), _mvL(char), _mvRw(char), _mvLw(char), delC(char), insC(char), +_mvB(char), _mvE(char), _enter(char), _quo(char), _bs(char), _bsw(char), +killn(char), killb(char), _inbrk(char), _esc(char), _editor(char), +_prev(char), _next(char), _compl(char), _tcompl(char), _dcompl(void), _rdcompl(void), _rcompl(void); #ifdef __EMX__ static int getcntrl(void); #endif static int terminated(unsigned char c); -#define iself ((void(*)())insertself) +#define iself insertself static void next_compl(int next); static void next_dcompl(int next); static Str doComplete(Str ifn, int *status, int next); /* *INDENT-OFF* */ -void (*InputKeymap[32]) () = { +void (*InputKeymap[32]) (char c) = { /* C-@ C-a C-b C-c C-d C-e C-f C-g */ _compl, _mvB, _mvL, _inbrk, delC, _mvE, _mvR, _inbrk, /* C-h C-i C-j C-k C-l C-m C-n C-o */ @@ -189,7 +189,7 @@ inputLineHistSearch(char *prompt, char *def_str, int flag, Hist *hist, need_redraw = TRUE; } else { - _compl(); + _compl(-1); cm_disp_next = -1; } } @@ -201,7 +201,7 @@ inputLineHistSearch(char *prompt, char *def_str, int flag, Hist *hist, } } else if (!i_quote && c == DEL_CODE) { - _bs(); + _bs(-1); cm_next = FALSE; cm_disp_next = -1; } @@ -239,7 +239,7 @@ inputLineHistSearch(char *prompt, char *def_str, int flag, Hist *hist, cm_disp_next = -1; if (CLen >= STR_LEN) goto next_char; - insC(); + insC(-1); strBuf->ptr[CPos] = c; if (!is_passwd && get_mctype(&c) == PC_CTRL) strProp[CPos] = PC_CTRL; @@ -393,14 +393,14 @@ ins_char(Str str) if (ctype & PC_UNKNOWN) ctype = PC_WCHAR1; } - insC(); + insC(-1); strBuf->ptr[CPos] = *(p++); strProp[CPos] = ctype; CPos++; if (--len) { ctype = (ctype & ~PC_WCHAR1) | PC_WCHAR2; while (len--) { - insC(); + insC(-1); strBuf->ptr[CPos] = *(p++); strProp[CPos] = ctype; CPos++; @@ -411,7 +411,7 @@ ins_char(Str str) #endif static void -_esc(void) +_esc(char) { char c; @@ -420,16 +420,16 @@ _esc(void) case 'O': switch (c = getch()) { case 'A': - _prev(); + _prev(c); break; case 'B': - _next(); + _next(c); break; case 'C': - _mvR(); + _mvR(c); break; case 'D': - _mvL(); + _mvL(c); break; } break; @@ -450,15 +450,15 @@ _esc(void) break; case 'f': if (emacs_like_lineedit) - _mvRw(); + _mvRw(c); break; case 'b': if (emacs_like_lineedit) - _mvLw(); + _mvLw(c); break; case CTRL_H: if (emacs_like_lineedit) - _bsw(); + _bsw(c); break; #ifdef USE_M17N default: @@ -469,7 +469,7 @@ _esc(void) } static void -insC(void) +insC(char) { int i; @@ -481,7 +481,7 @@ insC(void) } static void -delC(void) +delC(char) { int i = CPos; int delta = 1; @@ -500,7 +500,7 @@ delC(void) } static void -_mvL(void) +_mvL(char) { if (CPos > 0) CPos--; @@ -511,7 +511,7 @@ _mvL(void) } static void -_mvLw(void) +_mvLw(char) { int first = 1; while (CPos > 0 && (first || !terminated(strBuf->ptr[CPos - 1]))) { @@ -527,7 +527,7 @@ _mvLw(void) } static void -_mvRw(void) +_mvRw(char) { int first = 1; while (CPos < CLen && (first || !terminated(strBuf->ptr[CPos - 1]))) { @@ -543,7 +543,7 @@ _mvRw(void) } static void -_mvR(void) +_mvR(char) { if (CPos < CLen) CPos++; @@ -554,27 +554,27 @@ _mvR(void) } static void -_bs(void) +_bs(char c) { if (CPos > 0) { - _mvL(); - delC(); + _mvL(c); + delC(c); } } static void -_bsw(void) +_bsw(char c) { int t = 0; while (CPos > 0 && !t) { - _mvL(); + _mvL(c); t = (move_word && terminated(strBuf->ptr[CPos - 1])); - delC(); + delC(c); } } static void -_enter(void) +_enter(char) { i_cont = FALSE; } @@ -584,53 +584,53 @@ insertself(char c) { if (CLen >= STR_LEN) return; - insC(); + insC(c); strBuf->ptr[CPos] = c; strProp[CPos] = (is_passwd) ? PC_ASCII : PC_CTRL; CPos++; } static void -_quo(void) +_quo(char) { i_quote = TRUE; } static void -_mvB(void) +_mvB(char) { CPos = 0; } static void -_mvE(void) +_mvE(char) { CPos = CLen; } static void -killn(void) +killn(char) { CLen = CPos; Strtruncate(strBuf, CLen); } static void -killb(void) +killb(char c) { while (CPos > 0) - _bs(); + _bs(c); } static void -_inbrk(void) +_inbrk(char) { i_cont = FALSE; i_broken = TRUE; } static void -_compl(void) +_compl(char) { next_compl(1); } @@ -642,7 +642,7 @@ _rcompl(void) } static void -_tcompl(void) +_tcompl(char) { if (cm_mode & CPL_OFF) cm_mode = CPL_ON; @@ -1007,7 +1007,7 @@ doComplete(Str ifn, int *status, int next) } static void -_prev(void) +_prev(char) { Hist *hist = CurrentHist; char *p; @@ -1033,7 +1033,7 @@ _prev(void) } static void -_next(void) +_next(char) { Hist *hist = CurrentHist; char *p; @@ -1109,7 +1109,7 @@ terminated(unsigned char c) } static void -_editor(void) +_editor(char) { FormItemList fi; char *p; diff --git a/main.c b/main.c index 710db9c..e81e0a5 100644 --- a/main.c +++ b/main.c @@ -66,17 +66,17 @@ static AlarmEvent DefaultAlarm = { 0, AL_UNSET, FUNCNAME_nulcmd, NULL }; static AlarmEvent *CurrentAlarm = &DefaultAlarm; -static MySignalHandler SigAlarm(SIGNAL_ARG); +static void SigAlarm(SIGNAL_ARG); #endif #ifdef SIGWINCH static int need_resize_screen = FALSE; -static MySignalHandler resize_hook(SIGNAL_ARG); +static void resize_hook(SIGNAL_ARG); static void resize_screen(void); #endif #ifdef SIGPIPE -static MySignalHandler SigPipe(SIGNAL_ARG); +static void SigPipe(SIGNAL_ARG); #endif #ifdef USE_MARK @@ -1391,7 +1391,7 @@ cmp_anchor_hseq(const void *a, const void *b) static void do_dump(Buffer *buf) { - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; prevtrap = mySignal(SIGINT, intTrap); if (SETJMP(IntReturn) != 0) { @@ -1591,7 +1591,7 @@ repBuffer(Buffer *oldbuf, Buffer *buf) } -MySignalHandler +void intTrap(SIGNAL_ARG) { /* Interrupt catcher */ LONGJMP(IntReturn, 0); @@ -1599,7 +1599,7 @@ intTrap(SIGNAL_ARG) } #ifdef SIGWINCH -static MySignalHandler +static void resize_hook(SIGNAL_ARG) { need_resize_screen = TRUE; @@ -1619,7 +1619,7 @@ resize_screen(void) #endif /* SIGWINCH */ #ifdef SIGPIPE -static MySignalHandler +static void SigPipe(SIGNAL_ARG) { #ifdef USE_MIGEMO @@ -1790,7 +1790,7 @@ clear_mark(Line *l) static int srchcore(char *volatile str, int (*func) (Buffer *, char *)) { - MySignalHandler(*prevtrap) (); + MySignalHandler prevtrap; volatile int i, result = SR_NOTFOUND; if (str != NULL && str != SearchString) @@ -2195,7 +2195,7 @@ DEFUN(pipesh, PIPE_SHELL, "Execute shell command and display output") DEFUN(readsh, READ_SHELL, "Execute shell command and display output") { Buffer *buf; - MySignalHandler(*prevtrap) (); + MySignalHandler prevtrap; char *cmd; CurrentKeyData = NULL; /* not allowed in w3m-control: */ @@ -6086,7 +6086,7 @@ DEFUN(execCmd, COMMAND, "Invoke w3m function(s)") } #ifdef USE_ALARM -static MySignalHandler +static void SigAlarm(SIGNAL_ARG) { char *data; diff --git a/news.c b/news.c index 66667e4..3c5c7ec 100644 --- a/news.c +++ b/news.c @@ -25,7 +25,7 @@ static News current_news = { NULL, 0, NULL, NULL, NULL }; static JMP_BUF AbortLoading; -static MySignalHandler +static void KeyAbort(SIGNAL_ARG) { LONGJMP(AbortLoading, 1); @@ -320,7 +320,7 @@ loadNewsgroup0(ParsedURL *pu) char *volatile scheme, *volatile group, *volatile list; int status, i, first, last; volatile int flag = 0, start = 0, end = 0; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; #ifdef USE_M17N wc_ces doc_charset = DocumentCharset, mime_charset; diff --git a/parsetagx.c b/parsetagx.c index 1cc7048..7213b08 100644 --- a/parsetagx.c +++ b/parsetagx.c @@ -17,18 +17,18 @@ static int toAlign(char *, int *); static int toVAlign(char *, int *); /* *INDENT-OFF* */ -static int (*toValFunc[]) () = { - noConv, /* VTYPE_NONE */ - noConv, /* VTYPE_STR */ - toNumber, /* VTYPE_NUMBER */ - toLength, /* VTYPE_LENGTH */ - toAlign, /* VTYPE_ALIGN */ - toVAlign, /* VTYPE_VALIGN */ - noConv, /* VTYPE_ACTION */ - noConv, /* VTYPE_ENCTYPE */ - noConv, /* VTYPE_METHOD */ - noConv, /* VTYPE_MLENGTH */ - noConv, /* VTYPE_TYPE */ +static int (*toValFunc[]) (char *, void *) = { + (int (*)(char *, void *))noConv, /* VTYPE_NONE */ + (int (*)(char *, void *))noConv, /* VTYPE_STR */ + (int (*)(char *, void *))toNumber, /* VTYPE_NUMBER */ + (int (*)(char *, void *))toLength, /* VTYPE_LENGTH */ + (int (*)(char *, void *))toAlign, /* VTYPE_ALIGN */ + (int (*)(char *, void *))toVAlign, /* VTYPE_VALIGN */ + (int (*)(char *, void *))noConv, /* VTYPE_ACTION */ + (int (*)(char *, void *))noConv, /* VTYPE_ENCTYPE */ + (int (*)(char *, void *))noConv, /* VTYPE_METHOD */ + (int (*)(char *, void *))noConv, /* VTYPE_MLENGTH */ + (int (*)(char *, void *))noConv, /* VTYPE_TYPE */ }; /* *INDENT-ON* */ diff --git a/proto.h b/proto.h index c833e9f..e6dfbfd 100644 --- a/proto.h +++ b/proto.h @@ -8,7 +8,7 @@ extern int main(int argc, char **argv); extern void nulcmd(void); extern void pushEvent(int cmd, void *data); -extern MySignalHandler intTrap(SIGNAL_ARG); +extern void intTrap(SIGNAL_ARG); extern void pgFore(void); extern void pgBack(void); extern void hpgFore(void); @@ -465,8 +465,8 @@ extern void set_cc(int spec, int val); extern void close_tty(void); extern char *ttyname_tty(void); extern void reset_tty(void); -extern MySignalHandler reset_exit(SIGNAL_ARG); -extern MySignalHandler error_dump(SIGNAL_ARG); +extern void reset_exit(SIGNAL_ARG); +extern void error_dump(SIGNAL_ARG); extern void set_int(void); extern void getTCstr(void); extern void setlinescols(void); diff --git a/terms.c b/terms.c index b0a15f7..9c244c8 100644 --- a/terms.c +++ b/terms.c @@ -261,7 +261,7 @@ check_cygwin_console(void) #endif /* __CYGWIN__ */ char *getenv(const char *); -MySignalHandler reset_exit(SIGNAL_ARG), reset_error_exit(SIGNAL_ARG), error_dump(SIGNAL_ARG); +void reset_exit(SIGNAL_ARG), reset_error_exit(SIGNAL_ARG), error_dump(SIGNAL_ARG); void setlinescols(void); void flush_tty(void); @@ -555,9 +555,9 @@ put_image_kitty(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int c, i, j, m, t, is_anim; struct stat st; pid_t pid; - MySignalHandler(*volatile previntr) (SIGNAL_ARG); - MySignalHandler(*volatile prevquit) (SIGNAL_ARG); - MySignalHandler(*volatile prevstop) (SIGNAL_ARG); + MySignalHandler volatile previntr; + MySignalHandler volatile prevquit; + MySignalHandler volatile prevstop; if (!url) return; @@ -773,9 +773,9 @@ put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, i { pid_t pid; int do_anim; - MySignalHandler(*volatile previntr) (SIGNAL_ARG); - MySignalHandler(*volatile prevquit) (SIGNAL_ARG); - MySignalHandler(*volatile prevstop) (SIGNAL_ARG); + MySignalHandler volatile previntr; + MySignalHandler volatile prevquit; + MySignalHandler volatile prevstop; MOVE(y,x); flush_tty(); @@ -1087,7 +1087,7 @@ reset_tty(void) close_tty(); } -static MySignalHandler +static void reset_exit_with_value(SIGNAL_ARG, int rval) { #ifdef USE_MOUSE @@ -1099,19 +1099,19 @@ reset_exit_with_value(SIGNAL_ARG, int rval) SIGNAL_RETURN; } -MySignalHandler +void reset_error_exit(SIGNAL_ARG) { reset_exit_with_value(SIGNAL_ARGLIST, 1); } -MySignalHandler +void reset_exit(SIGNAL_ARG) { reset_exit_with_value(SIGNAL_ARGLIST, 0); } -MySignalHandler +void error_dump(SIGNAL_ARG) { mySignal(SIGIOT, SIG_DFL); @@ -2394,7 +2394,7 @@ do_getch() return sysm_getch(); } -MySignalHandler +void sysmouse(SIGNAL_ARG) { struct mouse_info mi; diff --git a/url.c b/url.c index b4c9ce4..c7cbac0 100644 --- a/url.c +++ b/url.c @@ -240,7 +240,7 @@ DefaultFile(int scheme) return NULL; } -static MySignalHandler +static void KeyAbort(SIGNAL_ARG) { LONGJMP(AbortLoading, 1); @@ -553,7 +553,7 @@ openSocket(char *const hostname, int a1, a2, a3, a4; unsigned long adr; #endif /* not INET6 */ - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; if (fmInitialized) { /* FIXME: gettextize? */ @@ -2123,7 +2123,7 @@ check_no_proxy(char *domain) { TextListItem *tl; volatile int ret = 0; - MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; + MySignalHandler volatile prevtrap = NULL; if (NO_proxy_domains == NULL || NO_proxy_domains->nitem == 0 || domain == NULL) diff --git a/w3mbookmark.c b/w3mbookmark.c index bf3dade..d149ba6 100644 --- a/w3mbookmark.c +++ b/w3mbookmark.c @@ -183,7 +183,6 @@ insert_bookmark(char *bmark, struct parsed_tagarg *data) int main(void) { - extern char *getenv(); char *p; int length; Str qs = NULL; diff --git a/w3mhelperpanel.c b/w3mhelperpanel.c index a519954..0f926a7 100644 --- a/w3mhelperpanel.c +++ b/w3mhelperpanel.c @@ -167,7 +167,6 @@ int main(void) { Str mailcapfile; - extern char *getenv(); char *p; int length; Str qs = NULL;