Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged from the latest developing branch.

git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@1475 2a77ed30-b011-0410-a7ad-c7884a0aa172
  • Loading branch information...
commit ff5258c3c69e2b772bb7e3ee14b83f526b99ca4d 1 parent 57760f3
edyfox authored
Showing with 857 additions and 1,058 deletions.
  1. +2 −5 src/buffer.c
  2. +0 −8 src/edit.c
  3. +86 −167 src/eval.c
  4. +1 −8 src/ex_cmds.c
  5. +5 −3 src/ex_cmds2.c
  6. +6 −13 src/ex_docmd.c
  7. +7 −2 src/ex_eval.c
  8. +1 −1  src/ex_getln.c
  9. +8 −7 src/farsi.c
  10. +4 −7 src/fileio.c
  11. +5 −11 src/gui.c
  12. +4 −8 src/gui_beval.c
  13. +22 −38 src/gui_gtk.c
  14. +15 −18 src/gui_gtk_f.c
  15. +92 −109 src/gui_gtk_x11.c
  16. +7 −11 src/hardcopy.c
  17. +9 −17 src/if_cscope.c
  18. +2 −4 src/if_mzsch.c
  19. +10 −11 src/if_xcmdsrv.c
  20. +1 −1  src/macros.h
  21. +3 −6 src/main.c
  22. +2 −4 src/mark.c
  23. +36 −45 src/mbyte.c
  24. +6 −10 src/menu.c
  25. +21 −15 src/message.c
  26. +4 −5 src/misc1.c
  27. +9 −10 src/misc2.c
  28. +13 −10 src/netbeans.c
  29. +2 −5 src/normal.c
  30. +392 −369 src/option.c
  31. +20 −45 src/os_unix.c
  32. +1 −3 src/os_unix.h
  33. +1 −2  src/quickfix.c
  34. +5 −8 src/screen.c
  35. +1 −2  src/search.c
  36. +10 −12 src/spell.c
  37. +0 −4 src/structs.h
  38. +16 −30 src/syntax.c
  39. +2 −2 src/tag.c
  40. +2 −2 src/term.c
  41. +0 −4 src/term.h
  42. +8 −16 src/ui.c
  43. +16 −0 src/version.c
7 src/buffer.c
View
@@ -2025,13 +2025,12 @@ buflist_findname_stat(ffname, stp)
* Return fnum of the found buffer.
* Return < 0 for error.
*/
-/*ARGSUSED*/
int
buflist_findpat(pattern, pattern_end, unlisted, diffmode)
char_u *pattern;
char_u *pattern_end; /* pointer to first char after pattern */
int unlisted; /* find unlisted buffers */
- int diffmode; /* find diff-mode buffers only */
+ int diffmode UNUSED; /* find diff-mode buffers only */
{
buf_T *buf;
regprog_T *prog;
@@ -2539,7 +2538,6 @@ buflist_findlnum(buf)
/*
* List all know file names (for :files and :buffers command).
*/
-/*ARGSUSED*/
void
buflist_list(eap)
exarg_T *eap;
@@ -3346,14 +3344,13 @@ free_titles()
* If maxwidth is not zero, the string will be filled at any middle marker
* or truncated if too long, fillchar is used for all whitespace.
*/
-/*ARGSUSED*/
int
build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab)
win_T *wp;
char_u *out; /* buffer to write into != NameBuff */
size_t outlen; /* length of out[] */
char_u *fmt;
- int use_sandbox; /* "fmt" was set insecurely, use sandbox */
+ int use_sandbox UNUSED; /* "fmt" was set insecurely, use sandbox */
int fillchar;
int maxwidth;
struct stl_hlrec *hltab; /* return: HL attributes (can be NULL) */
8 src/edit.c
View
@@ -69,11 +69,7 @@ struct compl_S
compl_T *cp_prev;
char_u *cp_str; /* matched text */
char cp_icase; /* TRUE or FALSE: ignore case */
-#ifdef S_SPLINT_S /* splint can't handle array of pointers */
- char_u **cp_text; /* text for the menu */
-#else
char_u *(cp_text[CPT_COUNT]); /* text for the menu */
-#endif
char_u *cp_fname; /* file containing the match, allocated when
* cp_flags has FREE_FNAME */
int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
@@ -3835,11 +3831,7 @@ ins_compl_add_tv(tv, dir)
char_u *word;
int icase = FALSE;
int adup = FALSE;
-#ifdef S_SPLINT_S /* splint doesn't parse array of pointers correctly */
- char_u **cptext;
-#else
char_u *(cptext[CPT_COUNT]);
-#endif
if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
{
253 src/eval.c
View
@@ -3772,7 +3772,6 @@ cat_prefix_varname(prefix, name)
* Function given to ExpandGeneric() to obtain the list of user defined
* (global/buffer/window/built-in) variable names.
*/
-/*ARGSUSED*/
char_u *
get_user_var_name(xp, idx)
expand_T *xp;
@@ -7787,7 +7786,6 @@ get_function_name(xp, idx)
* Function given to ExpandGeneric() to obtain the list of internal or
* user defined variable or function names.
*/
-/*ARGSUSED*/
char_u *
get_expr_name(xp, idx)
expand_T *xp;
@@ -8655,10 +8653,9 @@ f_bufwinnr(argvars, rettv)
/*
* "byte2line(byte)" function
*/
-/*ARGSUSED*/
static void
f_byte2line(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifndef FEAT_BYTEOFF
@@ -8678,7 +8675,6 @@ f_byte2line(argvars, rettv)
/*
* "byteidx()" function
*/
-/*ARGSUSED*/
static void
f_byteidx(argvars, rettv)
typval_T *argvars;
@@ -8852,7 +8848,7 @@ f_cindent(argvars, rettv)
static void
f_clearmatches(argvars, rettv)
typval_T *argvars UNUSED;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_SEARCH_EXTRA
clear_matches(curwin);
@@ -8916,11 +8912,10 @@ f_col(argvars, rettv)
/*
* "complete()" function
*/
-/*ARGSUSED*/
static void
f_complete(argvars, rettv)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
int startcol;
@@ -8951,7 +8946,6 @@ f_complete(argvars, rettv)
/*
* "complete_add()" function
*/
-/*ARGSUSED*/
static void
f_complete_add(argvars, rettv)
typval_T *argvars;
@@ -8963,10 +8957,9 @@ f_complete_add(argvars, rettv)
/*
* "complete_check()" function
*/
-/*ARGSUSED*/
static void
f_complete_check(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int saved = RedrawingDisabled;
@@ -8981,11 +8974,10 @@ f_complete_check(argvars, rettv)
/*
* "confirm(message, buttons[, default [, type]])" function
*/
-/*ARGSUSED*/
static void
f_confirm(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
char_u *message;
@@ -9150,11 +9142,10 @@ f_count(argvars, rettv)
*
* Checks the existence of a cscope connection.
*/
-/*ARGSUSED*/
static void
f_cscope_connection(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_CSCOPE
int num = 0;
@@ -9181,7 +9172,6 @@ f_cscope_connection(argvars, rettv)
* Moves the cursor to the specified line and column.
* Returns 0 when the position could be set, -1 otherwise.
*/
-/*ARGSUSED*/
static void
f_cursor(argvars, rettv)
typval_T *argvars;
@@ -9275,11 +9265,10 @@ f_delete(argvars, rettv)
/*
* "did_filetype()" function
*/
-/*ARGSUSED*/
static void
f_did_filetype(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_AUTOCMD
rettv->vval.v_number = did_filetype;
@@ -9289,11 +9278,10 @@ f_did_filetype(argvars, rettv)
/*
* "diff_filler()" function
*/
-/*ARGSUSED*/
static void
f_diff_filler(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_DIFF
rettv->vval.v_number = diff_check_fill(curwin, get_tv_lnum(argvars));
@@ -9303,11 +9291,10 @@ f_diff_filler(argvars, rettv)
/*
* "diff_hlID()" function
*/
-/*ARGSUSED*/
static void
f_diff_hlID(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_DIFF
linenr_T lnum = get_tv_lnum(argvars);
@@ -9420,7 +9407,6 @@ f_escape(argvars, rettv)
/*
* "eval()" function
*/
-/*ARGSUSED*/
static void
f_eval(argvars, rettv)
typval_T *argvars;
@@ -9444,10 +9430,9 @@ f_eval(argvars, rettv)
/*
* "eventhandler()" function
*/
-/*ARGSUSED*/
static void
f_eventhandler(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = vgetc_busy;
@@ -9704,11 +9689,10 @@ f_extend(argvars, rettv)
/*
* "feedkeys()" function
*/
-/*ARGSUSED*/
static void
f_feedkeys(argvars, rettv)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
int remap = TRUE;
char_u *keys, *flags;
@@ -10210,10 +10194,9 @@ f_foldlevel(argvars, rettv)
/*
* "foldtext()" function
*/
-/*ARGSUSED*/
static void
f_foldtext(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_FOLDING
@@ -10278,10 +10261,9 @@ f_foldtext(argvars, rettv)
/*
* "foldtextresult(lnum)" function
*/
-/*ARGSUSED*/
static void
f_foldtextresult(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_FOLDING
@@ -10314,11 +10296,10 @@ f_foldtextresult(argvars, rettv)
/*
* "foreground()" function
*/
-/*ARGSUSED*/
static void
f_foreground(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_GUI
if (gui.in_use)
@@ -10333,7 +10314,6 @@ f_foreground(argvars, rettv)
/*
* "function()" function
*/
-/*ARGSUSED*/
static void
f_function(argvars, rettv)
typval_T *argvars;
@@ -10357,11 +10337,10 @@ f_function(argvars, rettv)
/*
* "garbagecollect()" function
*/
-/*ARGSUSED*/
static void
f_garbagecollect(argvars, rettv)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
/* This is postponed until we are back at the toplevel, because we may be
* using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */
@@ -10664,10 +10643,9 @@ f_getchar(argvars, rettv)
/*
* "getcharmod()" function
*/
-/*ARGSUSED*/
static void
f_getcharmod(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = mod_mask;
@@ -10676,10 +10654,9 @@ f_getcharmod(argvars, rettv)
/*
* "getcmdline()" function
*/
-/*ARGSUSED*/
static void
f_getcmdline(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->v_type = VAR_STRING;
@@ -10689,10 +10666,9 @@ f_getcmdline(argvars, rettv)
/*
* "getcmdpos()" function
*/
-/*ARGSUSED*/
static void
f_getcmdpos(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = get_cmdline_pos() + 1;
@@ -10701,10 +10677,9 @@ f_getcmdpos(argvars, rettv)
/*
* "getcmdtype()" function
*/
-/*ARGSUSED*/
static void
f_getcmdtype(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->v_type = VAR_STRING;
@@ -10719,10 +10694,9 @@ f_getcmdtype(argvars, rettv)
/*
* "getcwd()" function
*/
-/*ARGSUSED*/
static void
f_getcwd(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u cwd[MAXPATHL];
@@ -10743,10 +10717,9 @@ f_getcwd(argvars, rettv)
/*
* "getfontname()" function
*/
-/*ARGSUSED*/
static void
f_getfontname(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->v_type = VAR_STRING;
@@ -10973,10 +10946,9 @@ f_getline(argvars, rettv)
/*
* "getmatches()" function
*/
-/*ARGSUSED*/
static void
f_getmatches(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_SEARCH_EXTRA
@@ -11004,10 +10976,9 @@ f_getmatches(argvars, rettv)
/*
* "getpid()" function
*/
-/*ARGSUSED*/
static void
f_getpid(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = mch_get_pid();
@@ -11051,11 +11022,10 @@ f_getpos(argvars, rettv)
/*
* "getqflist()" and "getloclist()" functions
*/
-/*ARGSUSED*/
static void
f_getqflist(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_QUICKFIX
win_T *wp;
@@ -11170,10 +11140,9 @@ f_gettabwinvar(argvars, rettv)
/*
* "getwinposx()" function
*/
-/*ARGSUSED*/
static void
f_getwinposx(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = -1;
@@ -11191,10 +11160,9 @@ f_getwinposx(argvars, rettv)
/*
* "getwinposy()" function
*/
-/*ARGSUSED*/
static void
f_getwinposy(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = -1;
@@ -11921,10 +11889,9 @@ f_has_key(argvars, rettv)
/*
* "haslocaldir()" function
*/
-/*ARGSUSED*/
static void
f_haslocaldir(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = (curwin->w_localdir != NULL);
@@ -11962,10 +11929,9 @@ f_hasmapto(argvars, rettv)
/*
* "histadd()" function
*/
-/*ARGSUSED*/
static void
f_histadd(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_CMDHIST
@@ -11996,11 +11962,10 @@ f_histadd(argvars, rettv)
/*
* "histdel()" function
*/
-/*ARGSUSED*/
static void
f_histdel(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_CMDHIST
int n;
@@ -12028,10 +11993,9 @@ f_histdel(argvars, rettv)
/*
* "histget()" function
*/
-/*ARGSUSED*/
static void
f_histget(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_CMDHIST
@@ -12061,10 +12025,9 @@ f_histget(argvars, rettv)
/*
* "histnr()" function
*/
-/*ARGSUSED*/
static void
f_histnr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int i;
@@ -12106,10 +12069,9 @@ f_hlexists(argvars, rettv)
/*
* "hostname()" function
*/
-/*ARGSUSED*/
static void
f_hostname(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u hostname[256];
@@ -12122,10 +12084,9 @@ f_hostname(argvars, rettv)
/*
* iconv() function
*/
-/*ARGSUSED*/
static void
f_iconv(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_MBYTE
@@ -12420,10 +12381,9 @@ static garray_T ga_userinput = {0, 0, sizeof(tasave_T), 4, NULL};
/*
* "inputrestore()" function
*/
-/*ARGSUSED*/
static void
f_inputrestore(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
if (ga_userinput.ga_len > 0)
@@ -12443,10 +12403,9 @@ f_inputrestore(argvars, rettv)
/*
* "inputsave()" function
*/
-/*ARGSUSED*/
static void
f_inputsave(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
/* Add an entry to the stack of typeahead storage. */
@@ -12733,10 +12692,9 @@ f_keys(argvars, rettv)
/*
* "last_buffer_nr()" function.
*/
-/*ARGSUSED*/
static void
f_last_buffer_nr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int n = 0;
@@ -12863,10 +12821,9 @@ f_line(argvars, rettv)
/*
* "line2byte(lnum)" function
*/
-/*ARGSUSED*/
static void
f_line2byte(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifndef FEAT_BYTEOFF
@@ -12912,10 +12869,9 @@ f_lispindent(argvars, rettv)
/*
* "localtime()" function
*/
-/*ARGSUSED*/
static void
f_localtime(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = (varnumber_T)time(NULL);
@@ -13497,7 +13453,6 @@ f_mkdir(argvars, rettv)
/*
* "mode()" function
*/
-/*ARGSUSED*/
static void
f_mode(argvars, rettv)
typval_T *argvars;
@@ -13726,11 +13681,10 @@ f_printf(argvars, rettv)
/*
* "pumvisible()" function
*/
-/*ARGSUSED*/
static void
f_pumvisible(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_INS_EXPAND
if (pum_visible())
@@ -14131,10 +14085,9 @@ remote_common(argvars, rettv, expr)
/*
* "remote_expr()" function
*/
-/*ARGSUSED*/
static void
f_remote_expr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->v_type = VAR_STRING;
@@ -14147,11 +14100,10 @@ f_remote_expr(argvars, rettv)
/*
* "remote_foreground()" function
*/
-/*ARGSUSED*/
static void
f_remote_foreground(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_CLIENTSERVER
# ifdef WIN32
@@ -14173,10 +14125,9 @@ f_remote_foreground(argvars, rettv)
#endif
}
-/*ARGSUSED*/
static void
f_remote_peek(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_CLIENTSERVER
@@ -14231,10 +14182,9 @@ f_remote_peek(argvars, rettv)
#endif
}
-/*ARGSUSED*/
static void
f_remote_read(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u *r = NULL;
@@ -14266,10 +14216,9 @@ f_remote_read(argvars, rettv)
/*
* "remote_send()" function
*/
-/*ARGSUSED*/
static void
f_remote_send(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->v_type = VAR_STRING;
@@ -14398,7 +14347,6 @@ f_rename(argvars, rettv)
/*
* "repeat()" function
*/
-/*ARGSUSED*/
static void
f_repeat(argvars, rettv)
typval_T *argvars;
@@ -15207,10 +15155,9 @@ f_searchpos(argvars, rettv)
}
-/*ARGSUSED*/
static void
f_server2client(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_CLIENTSERVER
@@ -15239,10 +15186,9 @@ f_server2client(argvars, rettv)
#endif
}
-/*ARGSUSED*/
static void
f_serverlist(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u *r = NULL;
@@ -15263,11 +15209,10 @@ f_serverlist(argvars, rettv)
/*
* "setbufvar()" function
*/
-/*ARGSUSED*/
static void
f_setbufvar(argvars, rettv)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
buf_T *buf;
aco_save_T aco;
@@ -15402,12 +15347,11 @@ static void set_qf_ll_list __ARGS((win_T *wp, typval_T *list_arg, typval_T *acti
/*
* Used by "setqflist()" and "setloclist()" functions
*/
-/*ARGSUSED*/
static void
set_qf_ll_list(wp, list_arg, action_arg, rettv)
- win_T *wp;
- typval_T *list_arg;
- typval_T *action_arg;
+ win_T *wp UNUSED;
+ typval_T *list_arg UNUSED;
+ typval_T *action_arg UNUSED;
typval_T *rettv;
{
#ifdef FEAT_QUICKFIX
@@ -15442,7 +15386,6 @@ set_qf_ll_list(wp, list_arg, action_arg, rettv)
/*
* "setloclist()" function
*/
-/*ARGSUSED*/
static void
f_setloclist(argvars, rettv)
typval_T *argvars;
@@ -15520,7 +15463,6 @@ f_setmatches(argvars, rettv)
/*
* "setpos()" function
*/
-/*ARGSUSED*/
static void
f_setpos(argvars, rettv)
typval_T *argvars;
@@ -15564,7 +15506,6 @@ f_setpos(argvars, rettv)
/*
* "setqflist()" function
*/
-/*ARGSUSED*/
static void
f_setqflist(argvars, rettv)
typval_T *argvars;
@@ -15667,11 +15608,10 @@ f_setwinvar(argvars, rettv)
/*
* "setwinvar()" and "settabwinvar()" functions
*/
-/*ARGSUSED*/
static void
setwinvar(argvars, rettv, off)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
int off;
{
win_T *win;
@@ -15987,10 +15927,9 @@ f_soundfold(argvars, rettv)
/*
* "spellbadword()" function
*/
-/* ARGSUSED */
static void
f_spellbadword(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u *word = (char_u *)"";
@@ -16042,10 +15981,9 @@ f_spellbadword(argvars, rettv)
/*
* "spellsuggest()" function
*/
-/*ARGSUSED*/
static void
f_spellsuggest(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_SPELL
@@ -16528,10 +16466,9 @@ f_substitute(argvars, rettv)
/*
* "synID(lnum, col, trans)" function
*/
-/*ARGSUSED*/
static void
f_synID(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int id = 0;
@@ -16556,10 +16493,9 @@ f_synID(argvars, rettv)
/*
* "synIDattr(id, what [, mode])" function
*/
-/*ARGSUSED*/
static void
f_synIDattr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u *p = NULL;
@@ -16652,10 +16588,9 @@ f_synIDattr(argvars, rettv)
/*
* "synIDtrans(id)" function
*/
-/*ARGSUSED*/
static void
f_synIDtrans(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int id;
@@ -16675,10 +16610,9 @@ f_synIDtrans(argvars, rettv)
/*
* "synstack(lnum, col)" function
*/
-/*ARGSUSED*/
static void
f_synstack(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_SYN_HL
@@ -16812,11 +16746,10 @@ f_system(argvars, rettv)
/*
* "tabpagebuflist()" function
*/
-/* ARGSUSED */
static void
f_tabpagebuflist(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_WINDOWS
tabpage_T *tp;
@@ -16844,10 +16777,9 @@ f_tabpagebuflist(argvars, rettv)
/*
* "tabpagenr()" function
*/
-/* ARGSUSED */
static void
f_tabpagenr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int nr = 1;
@@ -16929,10 +16861,9 @@ get_winnr(tp, argvar)
/*
* "tabpagewinnr()" function
*/
-/* ARGSUSED */
static void
f_tabpagewinnr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int nr = 1;
@@ -16952,10 +16883,9 @@ f_tabpagewinnr(argvars, rettv)
/*
* "tagfiles()" function
*/
-/*ARGSUSED*/
static void
f_tagfiles(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
char_u fname[MAXPATHL + 1];
@@ -16995,10 +16925,9 @@ f_taglist(argvars, rettv)
/*
* "tempname()" function
*/
-/*ARGSUSED*/
static void
f_tempname(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
static int x = 'A';
@@ -17031,11 +16960,10 @@ f_tempname(argvars, rettv)
/*
* "test(list)" function: Just checking the walls...
*/
-/*ARGSUSED*/
static void
f_test(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
/* Used for unit testing. Change the code below to your liking. */
#if 0
@@ -17320,11 +17248,10 @@ f_virtcol(argvars, rettv)
/*
* "visualmode()" function
*/
-/*ARGSUSED*/
static void
f_visualmode(argvars, rettv)
- typval_T *argvars;
- typval_T *rettv;
+ typval_T *argvars UNUSED;
+ typval_T *rettv UNUSED;
{
#ifdef FEAT_VISUAL
char_u str[2];
@@ -17360,10 +17287,9 @@ f_winbufnr(argvars, rettv)
/*
* "wincol()" function
*/
-/*ARGSUSED*/
static void
f_wincol(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
validate_cursor();
@@ -17390,10 +17316,9 @@ f_winheight(argvars, rettv)
/*
* "winline()" function
*/
-/*ARGSUSED*/
static void
f_winline(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
validate_cursor();
@@ -17403,10 +17328,9 @@ f_winline(argvars, rettv)
/*
* "winnr()" function
*/
-/* ARGSUSED */
static void
f_winnr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
int nr = 1;
@@ -17420,10 +17344,9 @@ f_winnr(argvars, rettv)
/*
* "winrestcmd()" function
*/
-/* ARGSUSED */
static void
f_winrestcmd(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_WINDOWS
@@ -17455,11 +17378,10 @@ f_winrestcmd(argvars, rettv)
/*
* "winrestview()" function
*/
-/* ARGSUSED */
static void
f_winrestview(argvars, rettv)
typval_T *argvars;
- typval_T *rettv;
+ typval_T *rettv UNUSED;
{
dict_T *dict;
@@ -17501,10 +17423,9 @@ f_winrestview(argvars, rettv)
/*
* "winsaveview()" function
*/
-/* ARGSUSED */
static void
f_winsaveview(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
dict_T *dict;
@@ -21646,12 +21567,11 @@ get_return_cmd(rettv)
* Called by do_cmdline() to get the next line.
* Returns allocated string, or NULL for end of function.
*/
-/* ARGSUSED */
char_u *
get_func_line(c, cookie, indent)
- int c; /* not used */
+ int c UNUSED;
void *cookie;
- int indent; /* not used */
+ int indent UNUSED;
{
funccall_T *fcp = (funccall_T *)cookie;
ufunc_T *fp = fcp->func;
@@ -22023,10 +21943,9 @@ last_set_msg(scriptID)
/*
* List v:oldfiles in a nice way.
*/
-/*ARGSUSED*/
void
ex_oldfiles(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
list_T *l = vimvars[VV_OLDFILES].vv_list;
listitem_T *li;
9 src/ex_cmds.c
View
@@ -2255,12 +2255,11 @@ viminfo_readline(virp)
*
* Return the string in allocated memory (NULL when out of memory).
*/
-/*ARGSUSED*/
char_u *
viminfo_readstring(virp, off, convert)
vir_T *virp;
int off; /* offset for virp->vir_line */
- int convert; /* convert the string */
+ int convert UNUSED; /* convert the string */
{
char_u *retval;
char_u *s, *d;
@@ -2736,7 +2735,6 @@ do_write(eap)
* May set eap->forceit if a dialog says it's OK to overwrite.
* Return OK if it's OK, FAIL if it is not.
*/
-/*ARGSUSED*/
static int
check_overwrite(eap, buf, fname, ffname, other)
exarg_T *eap;
@@ -5776,10 +5774,6 @@ find_help_tags(arg, num_matches, matches, keep_lang)
{
char_u *s, *d;
int i;
-#ifdef S_SPLINT_S /* splint doesn't understand array of pointers */
- static char **mtable;
- static char **rtable;
-#else
static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*",
"/*", "/\\*", "\"*", "**",
"/\\(\\)",
@@ -5794,7 +5788,6 @@ find_help_tags(arg, num_matches, matches, keep_lang)
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
"\\[count]", "\\[quotex]", "\\[range]",
"\\[pattern]", "\\\\bar", "/\\\\%\\$"};
-#endif
int flags;
d = IObuff; /* assume IObuff is long enough! */
8 src/ex_cmds2.c
View
@@ -28,7 +28,8 @@ typedef struct scriptitem_S
{
char_u *sn_name;
# ifdef UNIX
- int sn_dev;
+ int sn_dev_valid;
+ dev_t sn_dev;
ino_t sn_ino;
# endif
# ifdef FEAT_PROFILE
@@ -3049,7 +3050,7 @@ do_source(fname, check_other, is_vimrc)
/* Compare dev/ino when possible, it catches symbolic
* links. Also compare file names, the inode may change
* when the file was edited. */
- ((stat_ok && si->sn_dev != -1)
+ ((stat_ok && si->sn_dev_valid)
&& (si->sn_dev == st.st_dev
&& si->sn_ino == st.st_ino)) ||
# endif
@@ -3076,11 +3077,12 @@ do_source(fname, check_other, is_vimrc)
# ifdef UNIX
if (stat_ok)
{
+ si->sn_dev_valid = TRUE;
si->sn_dev = st.st_dev;
si->sn_ino = st.st_ino;
}
else
- si->sn_dev = -1;
+ si->sn_dev_valid = FALSE;
# endif
/* Allocate the local script variables to use for this script. */
19 src/ex_docmd.c
View
@@ -3004,7 +3004,7 @@ modifier_len(cmd)
if (VIM_ISDIGIT(*cmd))
p = skipwhite(skipdigits(cmd));
- for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i)
+ for (i = 0; i < (int)(sizeof(cmdmods) / sizeof(struct cmdmod)); ++i)
{
for (j = 0; p[j] != NUL; ++j)
if (p[j] != cmdmods[i].name[j])
@@ -3032,7 +3032,7 @@ cmd_exists(name)
char_u *p;
/* Check command modifiers. */
- for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i)
+ for (i = 0; i < (int)(sizeof(cmdmods) / sizeof(struct cmdmod)); ++i)
{
for (j = 0; name[j] != NUL; ++j)
if (name[j] != cmdmods[i].name[j])
@@ -6093,7 +6093,7 @@ get_user_cmd_flags(xp, idx)
{"bang", "bar", "buffer", "complete", "count",
"nargs", "range", "register"};
- if (idx >= sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0]))
+ if (idx >= (int)(sizeof(user_cmd_flags) / sizeof(user_cmd_flags[0])))
return NULL;
return (char_u *)user_cmd_flags[idx];
}
@@ -6108,7 +6108,7 @@ get_user_cmd_nargs(xp, idx)
{
static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"};
- if (idx >= sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0]))
+ if (idx >= (int)(sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0])))
return NULL;
return (char_u *)user_cmd_nargs[idx];
}
@@ -9144,10 +9144,9 @@ ex_startinsert(eap)
/*
* ":stopinsert"
*/
-/*ARGSUSED*/
static void
ex_stopinsert(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
restart_edit = 0;
stop_insert_mode = TRUE;
@@ -9395,13 +9394,7 @@ find_cmdline_var(src, usedlen)
{
int len;
int i;
-#ifdef S_SPLINT_S /* splint can't handle array of pointers */
- static char **spec_str;
- static char *(nospec_str[])
-#else
- static char *(spec_str[])
-#endif
- = {
+ static char *(spec_str[]) = {
"%",
#define SPEC_PERC 0
"#",
9 src/ex_eval.c
View
@@ -60,7 +60,9 @@ static char_u *get_end_emsg __ARGS((struct condstack *cstack));
#else
/* Values used for the Vim release. */
# define THROW_ON_ERROR TRUE
+# define THROW_ON_ERROR_TRUE
# define THROW_ON_INTERRUPT TRUE
+# define THROW_ON_INTERRUPT_TRUE
#endif
static void catch_exception __ARGS((except_T *excp));
@@ -1320,16 +1322,20 @@ do_throw(cstack)
* and reset the did_emsg or got_int flag, so this won't happen again at
* the next surrounding try conditional.
*/
+#ifndef THROW_ON_ERROR_TRUE
if (did_emsg && !THROW_ON_ERROR)
{
inactivate_try = TRUE;
did_emsg = FALSE;
}
+#endif
+#ifndef THROW_ON_INTERRUPT_TRUE
if (got_int && !THROW_ON_INTERRUPT)
{
inactivate_try = TRUE;
got_int = FALSE;
}
+#endif
idx = cleanup_conditionals(cstack, 0, inactivate_try);
if (idx >= 0)
{
@@ -2254,10 +2260,9 @@ rewind_conditionals(cstack, idx, cond_type, cond_level)
/*
* ":endfunction" when not after a ":function"
*/
-/*ARGSUSED*/
void
ex_endfunction(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
EMSG(_("E193: :endfunction not inside a function"));
}
2  src/ex_getln.c
View
@@ -4533,7 +4533,7 @@ ExpandFromContext(xp, pat, num_file, file, options)
* right function to do the expansion.
*/
ret = FAIL;
- for (i = 0; i < sizeof(tab) / sizeof(struct expgen); ++i)
+ for (i = 0; i < (int)(sizeof(tab) / sizeof(struct expgen)); ++i)
if (xp->xp_context == tab[i].context)
{
if (tab[i].ic)
15 src/farsi.c
View
@@ -103,7 +103,8 @@ toF_Xor_X_(c)
case F_HE:
tempc = _HE;
- if (p_ri && (curwin->w_cursor.col+1 < STRLEN(ml_get_curline())))
+ if (p_ri && (curwin->w_cursor.col + 1
+ < (colnr_T)STRLEN(ml_get_curline())))
{
inc_cursor();
@@ -344,7 +345,7 @@ put_curr_and_l_to_X(c)
if (curwin->w_p_rl && p_ri)
return;
- if ( (curwin->w_cursor.col < STRLEN(ml_get_curline())))
+ if ((curwin->w_cursor.col < (colnr_T)STRLEN(ml_get_curline())))
{
if ((p_ri && curwin->w_cursor.col) || !p_ri)
{
@@ -565,7 +566,7 @@ chg_c_to_X_or_X ()
tempc = gchar_cursor();
- if (curwin->w_cursor.col+1 < STRLEN(ml_get_curline()))
+ if (curwin->w_cursor.col + 1 < (colnr_T)STRLEN(ml_get_curline()))
{
inc_cursor();
@@ -594,8 +595,8 @@ chg_l_to_X_orX_ ()
{
int tempc;
- if (!curwin->w_cursor.col &&
- (curwin->w_cursor.col+1 == STRLEN(ml_get_curline())))
+ if (curwin->w_cursor.col != 0 &&
+ (curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
return;
if (!curwin->w_cursor.col && p_ri)
@@ -663,8 +664,8 @@ chg_l_toXor_X ()
{
int tempc;
- if (!curwin->w_cursor.col &&
- (curwin->w_cursor.col+1 == STRLEN(ml_get_curline())))
+ if (curwin->w_cursor.col != 0 &&
+ (curwin->w_cursor.col + 1 == (colnr_T)STRLEN(ml_get_curline())))
return;
if (!curwin->w_cursor.col && p_ri)
11 src/fileio.c
View
@@ -9085,12 +9085,11 @@ auto_next_pat(apc, stop_at_last)
* Called by do_cmdline() to get the next line for ":if".
* Returns allocated string, or NULL for end of autocommands.
*/
-/* ARGSUSED */
static char_u *
getnextac(c, cookie, indent)
- int c; /* not used */
+ int c UNUSED;
void *cookie;
- int indent; /* not used */
+ int indent UNUSED;
{
AutoPatCmd *acp = (AutoPatCmd *)cookie;
char_u *retval;
@@ -9201,10 +9200,9 @@ has_autocmd(event, sfname, buf)
* Function given to ExpandGeneric() to obtain the list of autocommand group
* names.
*/
-/*ARGSUSED*/
char_u *
get_augroup_name(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
if (idx == augroups.ga_len) /* add "END" add the end */
@@ -9270,10 +9268,9 @@ set_context_in_autocmd(xp, arg, doautocmd)
/*
* Function given to ExpandGeneric() to obtain the list of event names.
*/
-/*ARGSUSED*/
char_u *
get_event_name(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
if (idx < augroups.ga_len) /* First list group names, if wanted */
16 src/gui.c
View
@@ -678,11 +678,10 @@ gui_shell_closed()
* Return OK when able to set the font. When it failed FAIL is returned and
* the fonts are unchanged.
*/
-/*ARGSUSED*/
int
gui_init_font(font_list, fontset)
char_u *font_list;
- int fontset;
+ int fontset UNUSED;
{
#define FONTLEN 320
char_u font_name[FONTLEN];
@@ -1138,10 +1137,9 @@ gui_position_menu()
* Position the various GUI components (text area, menu). The vertical
* scrollbars are NOT handled here. See gui_update_scrollbars().
*/
-/*ARGSUSED*/
static void
gui_position_components(total_width)
- int total_width;
+ int total_width UNUSED;
{
int text_area_x;
int text_area_y;
@@ -1374,10 +1372,9 @@ gui_get_shellsize()
* If "fit_to_display" is TRUE then the size may be reduced to fit the window
* on the screen.
*/
-/*ARGSUSED*/
void
gui_set_shellsize(mustset, fit_to_display, direction)
- int mustset; /* set by the user */
+ int mustset UNUSED; /* set by the user */
int fit_to_display;
int direction; /* RESIZE_HOR, RESIZE_VER */
{
@@ -3120,7 +3117,6 @@ static int prev_which_scrollbars[3];
* If "oldval" is not NULL, "oldval" is the previous value, the new value is
* in p_go.
*/
-/*ARGSUSED*/
void
gui_init_which_components(oldval)
char_u *oldval;
@@ -4411,7 +4407,7 @@ gui_do_horiz_scroll()
if (curwin->w_p_wrap)
return FALSE;
- if (curwin->w_leftcol == scrollbar_value)
+ if ((long_u)curwin->w_leftcol == scrollbar_value)
return FALSE;
curwin->w_leftcol = (colnr_T)scrollbar_value;
@@ -4424,7 +4420,7 @@ gui_do_horiz_scroll()
&& longest_lnum < curwin->w_botline
&& !virtual_active())
{
- if (scrollbar_value > scroll_line_len(curwin->w_cursor.lnum))
+ if (scrollbar_value > (long_u)scroll_line_len(curwin->w_cursor.lnum))
{
curwin->w_cursor.lnum = longest_lnum;
curwin->w_cursor.col = 0;
@@ -4670,7 +4666,6 @@ gui_mouse_correct()
/*
* Find window where the mouse pointer "y" coordinate is in.
*/
-/*ARGSUSED*/
static win_T *
xy2win(x, y)
int x;
@@ -5124,7 +5119,6 @@ gui_wingoto_xy(x, y)
* of dropped files, they will be freed in this function, and caller can't use
* fnames after call this function.
*/
-/*ARGSUSED*/
void
gui_handle_drop(x, y, modifiers, fnames, count)
int x;
12 src/gui_beval.c
View
@@ -15,7 +15,6 @@
/*
* Common code, invoked when the mouse is resting for a moment.
*/
-/*ARGSUSED*/
void
general_beval_cb(beval, state)
BalloonEval *beval;
@@ -551,9 +550,8 @@ target_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
return FALSE; /* continue emission */
}
-/*ARGSUSED*/
static gint
-mainwin_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
+mainwin_event_cb(GtkWidget *widget UNUSED, GdkEvent *event, gpointer data)
{
BalloonEval *beval = (BalloonEval *)data;
@@ -663,9 +661,10 @@ timeout_cb(gpointer data)
return FALSE; /* don't call me again */
}
-/*ARGSUSED2*/
static gint
-balloon_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+balloon_expose_event_cb(GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer data UNUSED)
{
gtk_paint_flat_box(widget->style, widget->window,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
@@ -676,7 +675,6 @@ balloon_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
}
# ifndef HAVE_GTK2
-/*ARGSUSED2*/
static void
balloon_draw_cb(GtkWidget *widget, GdkRectangle *area, gpointer data)
{
@@ -726,7 +724,6 @@ removeEventHandler(beval)
/*
* The X event handler. All it does is call the real event handler.
*/
-/*ARGSUSED*/
static void
pointerEventEH(w, client_data, event, unused)
Widget w;
@@ -877,7 +874,6 @@ pointerEvent(beval, event)
}
}
-/*ARGSUSED*/
static void
timerRoutine(dx, id)
XtPointer dx;
60 src/gui_gtk.c
View
@@ -285,14 +285,14 @@ create_menu_icon(vimmenu_T *menu, GtkIconSize icon_size)
return image;
}
-/*ARGSUSED*/
static gint
-toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+toolbar_button_focus_in_event(GtkWidget *widget UNUSED,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
- /* When we're in a GtkPlug, we don't have window focus events, only widget focus.
- * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug)
- * immediately pass it to mainwin.
- */
+ /* When we're in a GtkPlug, we don't have window focus events, only widget
+ * focus. To emulate stand-alone gvim, if a button gets focus (e.g.,
+ * <Tab> into GtkPlug) immediately pass it to mainwin. */
if (gtk_socket_id != 0)
gtk_widget_grab_focus(gui.drawarea);
@@ -585,9 +585,8 @@ gui_mch_add_menu(vimmenu_T *menu, int idx)
gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
}
-/*ARGSUSED*/
static void
-menu_item_activate(GtkWidget *widget, gpointer data)
+menu_item_activate(GtkWidget *widget UNUSED, gpointer data)
{
gui_menu_cb((vimmenu_T *)data);
@@ -1202,9 +1201,8 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb)
#endif
#ifndef USE_FILE_CHOOSER
-/*ARGSUSED*/
static void
-browse_ok_cb(GtkWidget *widget, gpointer cbdata)
+browse_ok_cb(GtkWidget *widget UNUSED, gpointer cbdata)
{
gui_T *vw = (gui_T *)cbdata;
@@ -1218,9 +1216,8 @@ browse_ok_cb(GtkWidget *widget, gpointer cbdata)
gtk_main_quit();
}
-/*ARGSUSED*/
static void
-browse_cancel_cb(GtkWidget *widget, gpointer cbdata)
+browse_cancel_cb(GtkWidget *widget UNUSED, gpointer cbdata)
{
gui_T *vw = (gui_T *)cbdata;
@@ -1234,9 +1231,8 @@ browse_cancel_cb(GtkWidget *widget, gpointer cbdata)
gtk_main_quit();
}
-/*ARGSUSED*/
static gboolean
-browse_destroy_cb(GtkWidget * widget)
+browse_destroy_cb(GtkWidget *widget UNUSED)
{
if (gui.browse_fname != NULL)
{
@@ -1262,14 +1258,13 @@ browse_destroy_cb(GtkWidget * widget)
* initdir initial directory, NULL for current dir
* filter not used (file name filter)
*/
-/*ARGSUSED*/
char_u *
-gui_mch_browse(int saving,
+gui_mch_browse(int saving UNUSED,
char_u *title,
char_u *dflt,
- char_u *ext,
+ char_u *ext UNUSED,
char_u *initdir,
- char_u *filter)
+ char_u *filter UNUSED)
{
#ifdef USE_FILE_CHOOSER
GtkWidget *fc;
@@ -1377,7 +1372,6 @@ gui_mch_browse(int saving,
* dflt default name
* initdir initial directory, NULL for current dir
*/
-/*ARGSUSED*/
char_u *
gui_mch_browsedir(
char_u *title,
@@ -1460,7 +1454,6 @@ dlg_destroy(GtkWidget *dlg)
}
# ifdef FEAT_GUI_GNOME
-/* ARGSUSED */
static int
gui_gnome_dialog( int type,
char_u *title,
@@ -1611,7 +1604,6 @@ typedef struct _CancelData
GtkWidget *dialog;
} CancelData;
-/* ARGSUSED */
static void
dlg_button_clicked(GtkWidget * widget, ButtonData *data)
{
@@ -1622,7 +1614,6 @@ dlg_button_clicked(GtkWidget * widget, ButtonData *data)
/*
* This makes the Escape key equivalent to the cancel button.
*/
-/*ARGSUSED*/
static int
dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
{
@@ -1655,7 +1646,6 @@ dlg_destroy_cb(int *p)
gtk_main_quit();
}
-/* ARGSUSED */
int
gui_mch_dialog( int type, /* type of dialog */
char_u *title, /* title of dialog */
@@ -2215,7 +2205,6 @@ typedef struct _DialogInfo
GtkDialog *dialog; /* Widget of the dialog */
} DialogInfo;
-/*ARGSUSED2*/
static gboolean
dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
@@ -2398,14 +2387,13 @@ static int popup_mouse_pos;
* Note: The push_in output argument seems to affect scrolling of huge
* menus that don't fit on the screen. Leave it at the default for now.
*/
-/*ARGSUSED0*/
static void
-popup_menu_position_func(GtkMenu *menu,
+popup_menu_position_func(GtkMenu *menu UNUSED,
gint *x, gint *y,
# ifdef HAVE_GTK2
- gboolean *push_in,
+ gboolean *push_in UNUSED,
# endif
- gpointer user_data)
+ gpointer user_data UNUSED)
{
gdk_window_get_origin(gui.drawarea->window, x, y);
@@ -2464,13 +2452,12 @@ typedef struct _SharedFindReplace
GtkWidget *all; /* 'Replace All' action button */
} SharedFindReplace;
-static SharedFindReplace find_widgets = { NULL, };
-static SharedFindReplace repl_widgets = { NULL, };
+static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
-/* ARGSUSED */
static int
find_key_press_event(
- GtkWidget *widget,
+ GtkWidget *widget UNUSED,
GdkEventKey *event,
SharedFindReplace *frdp)
{
@@ -2962,9 +2949,8 @@ gui_gtk_synch_fonts(void)
/*
* Callback for actions of the find and replace dialogs
*/
-/*ARGSUSED*/
static void
-find_replace_cb(GtkWidget *widget, gpointer data)
+find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
{
int flags;
char_u *find_text;
@@ -3010,9 +2996,8 @@ find_replace_cb(GtkWidget *widget, gpointer data)
}
/* our usual callback function */
-/*ARGSUSED*/
static void
-entry_activate_cb(GtkWidget *widget, gpointer data)
+entry_activate_cb(GtkWidget *widget UNUSED, gpointer data)
{
gtk_widget_grab_focus(GTK_WIDGET(data));
}
@@ -3055,10 +3040,9 @@ entry_changed_cb(GtkWidget * entry, GtkWidget * dialog)
/*
* ":helpfind"
*/
-/*ARGSUSED*/
void
ex_helpfind(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
/* This will fail when menus are not loaded. Well, it's only for
* backwards compatibility anyway. */
33 src/gui_gtk_f.c
View
@@ -227,14 +227,14 @@ gtk_form_get_type(void)
if (!form_type)
{
- GtkTypeInfo form_info =
- {
- "GtkForm",
- sizeof(GtkForm),
- sizeof(GtkFormClass),
- (GtkClassInitFunc) gtk_form_class_init,
- (GtkObjectInitFunc) gtk_form_init
- };
+ GtkTypeInfo form_info;
+
+ vim_memset(&form_info, 0, sizeof(form_info));
+ form_info.type_name = "GtkForm";
+ form_info.object_size = sizeof(GtkForm);
+ form_info.class_size = sizeof(GtkFormClass);
+ form_info.class_init_func = (GtkClassInitFunc)gtk_form_class_init;
+ form_info.object_init_func = (GtkObjectInitFunc)gtk_form_init;
form_type = gtk_type_unique(GTK_TYPE_CONTAINER, &form_info);
}
@@ -611,10 +611,9 @@ gtk_form_remove(GtkContainer *container, GtkWidget *widget)
}
}
-/*ARGSUSED1*/
static void
gtk_form_forall(GtkContainer *container,
- gboolean include_internals,
+ gboolean include_internals UNUSED,
GtkCallback callback,
gpointer callback_data)
{
@@ -786,9 +785,8 @@ gtk_form_position_children(GtkForm *form)
* them or discards them, depending on whether we are obscured
* or not.
*/
-/*ARGSUSED1*/
static GdkFilterReturn
-gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
+gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event UNUSED, gpointer data)
{
XEvent *xevent;
GtkForm *form;
@@ -821,9 +819,10 @@ gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
* there is no corresponding event in GTK, so we have
* to get the events from a filter
*/
-/*ARGSUSED1*/
static GdkFilterReturn
-gtk_form_main_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
+gtk_form_main_filter(GdkXEvent *gdk_xevent,
+ GdkEvent *event UNUSED,
+ gpointer data)
{
XEvent *xevent;
GtkForm *form;
@@ -911,9 +910,8 @@ gtk_form_send_configure(GtkForm *form)
#endif
}
-/*ARGSUSED0*/
static void
-gtk_form_child_map(GtkWidget *widget, gpointer user_data)
+gtk_form_child_map(GtkWidget *widget UNUSED, gpointer user_data)
{
GtkFormChild *child;
@@ -923,9 +921,8 @@ gtk_form_child_map(GtkWidget *widget, gpointer user_data)
gdk_window_show(child->window);
}
-/*ARGSUSED0*/
static void
-gtk_form_child_unmap(GtkWidget *widget, gpointer user_data)
+gtk_form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
{
GtkFormChild *child;
201 src/gui_gtk_x11.c
View
@@ -619,9 +619,10 @@ gui_mch_free_all()
* Doesn't seem possible, since check_copy_area() relies on
* this information. --danielk
*/
-/*ARGSUSED*/
static gint
-visibility_event(GtkWidget *widget, GdkEventVisibility *event, gpointer data)
+visibility_event(GtkWidget *widget UNUSED,
+ GdkEventVisibility *event,
+ gpointer data UNUSED)
{
gui.visibility = event->state;
/*
@@ -638,9 +639,10 @@ visibility_event(GtkWidget *widget, GdkEventVisibility *event, gpointer data)
/*
* Redraw the corresponding portions of the screen.
*/
-/*ARGSUSED*/
static gint
-expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+expose_event(GtkWidget *widget UNUSED,
+ GdkEventExpose *event,
+ gpointer data UNUSED)
{
/* Skip this when the GUI isn't set up yet, will redraw later. */
if (gui.starting)
@@ -668,9 +670,10 @@ expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
/*
* Handle changes to the "Comm" property
*/
-/*ARGSUSED2*/
static gint
-property_event(GtkWidget *widget, GdkEventProperty *event, gpointer data)
+property_event(GtkWidget *widget,
+ GdkEventProperty *event,
+ gpointer data UNUSED)
{
if (event->type == GDK_PROPERTY_NOTIFY
&& event->state == (int)GDK_PROPERTY_NEW_VALUE
@@ -740,9 +743,8 @@ gui_mch_stop_blink(void)
blink_state = BLINK_NONE;
}
-/*ARGSUSED*/
static gint
-blink_cb(gpointer data)
+blink_cb(gpointer data UNUSED)
{
if (blink_state == BLINK_ON)
{
@@ -781,9 +783,10 @@ gui_mch_start_blink(void)
}
}
-/*ARGSUSED*/
static gint
-enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+enter_notify_event(GtkWidget *widget UNUSED,
+ GdkEventCrossing *event UNUSED,
+ gpointer data UNUSED)
{
if (blink_state == BLINK_NONE)
gui_mch_start_blink();
@@ -795,9 +798,10 @@ enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
return FALSE;
}
-/*ARGSUSED*/
static gint
-leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+leave_notify_event(GtkWidget *widget UNUSED,
+ GdkEventCrossing *event UNUSED,
+ gpointer data UNUSED)
{
if (blink_state != BLINK_NONE)
gui_mch_stop_blink();
@@ -805,9 +809,10 @@ leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
return FALSE;
}
-/*ARGSUSED*/
static gint
-focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+focus_in_event(GtkWidget *widget,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
gui_focus_change(TRUE);
@@ -826,9 +831,10 @@ focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
return TRUE;
}
-/*ARGSUSED*/
static gint
-focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+focus_out_event(GtkWidget *widget UNUSED,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
gui_focus_change(FALSE);
@@ -956,9 +962,10 @@ modifiers_gdk2mouse(guint state)
/*
* Main keyboard handler:
*/
-/*ARGSUSED*/
static gint
-key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
+key_press_event(GtkWidget *widget UNUSED,
+ GdkEventKey *event,
+ gpointer data UNUSED)
{
#ifdef HAVE_GTK2
/* 256 bytes is way over the top, but for safety let's reduce it only
@@ -1225,9 +1232,10 @@ key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
}
#if defined(FEAT_XIM) && defined(HAVE_GTK2)
-/*ARGSUSED0*/
static gboolean
-key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
+key_release_event(GtkWidget *widget UNUSED,
+ GdkEventKey *event,
+ gpointer data UNUSED)
{
/*
* GTK+ 2 input methods may do fancy stuff on key release events too.
@@ -1243,11 +1251,10 @@ key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
* Selection handlers:
*/
-/*ARGSUSED*/
static gint
-selection_clear_event(GtkWidget *widget,
+selection_clear_event(GtkWidget *widget UNUSED,
GdkEventSelection *event,
- gpointer user_data)
+ gpointer user_data UNUSED)
{
if (event->selection == clip_plus.gtk_sel_atom)
clip_lose_selection(&clip_plus);
@@ -1265,12 +1272,11 @@ selection_clear_event(GtkWidget *widget,
#define RS_FAIL 2 /* selection_received_cb() called and failed */
static int received_selection = RS_NONE;
-/*ARGSUSED*/
static void
-selection_received_cb(GtkWidget *widget,
+selection_received_cb(GtkWidget *widget UNUSED,
GtkSelectionData *data,
- guint time_,
- gpointer user_data)
+ guint time_ UNUSED,
+ gpointer user_data UNUSED)
{
VimClipboard *cbd;
char_u *text;
@@ -1414,13 +1420,12 @@ selection_received_cb(GtkWidget *widget,
* Prepare our selection data for passing it to the external selection
* client.
*/
-/*ARGSUSED*/
static void
-selection_get_cb(GtkWidget *widget,
+selection_get_cb(GtkWidget *widget UNUSED,
GtkSelectionData *selection_data,
guint info,
- guint time_,
- gpointer user_data)
+ guint time_ UNUSED,
+ gpointer user_data UNUSED)
{
char_u *string;
char_u *tmpbuf;
@@ -1678,7 +1683,7 @@ process_motion_notify(int x, int y, GdkModifierType state)
offshoot = dx > dy ? dx : dy;
- /* Make a linearly declaying timer delay with a threshold of 5 at a
+ /* Make a linearly decaying timer delay with a threshold of 5 at a
* distance of 127 pixels from the main window.
*
* One could think endlessly about the most ergonomic variant here.
@@ -1707,9 +1712,8 @@ process_motion_notify(int x, int y, GdkModifierType state)
/*
* Timer used to recognize multiple clicks of the mouse button.
*/
-/*ARGSUSED0*/
static gint
-motion_repeat_timer_cb(gpointer data)
+motion_repeat_timer_cb(gpointer data UNUSED)
{
int x;
int y;
@@ -1749,9 +1753,10 @@ motion_repeat_timer_cb(gpointer data)
return FALSE;
}
-/*ARGSUSED2*/
static gint
-motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+motion_notify_event(GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data UNUSED)
{
if (event->is_hint)
{
@@ -1777,9 +1782,10 @@ motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
* by our own timeout mechanism instead of the one provided by GTK+ itself.
* This is due to the way the generic VIM code is recognizing multiple clicks.
*/
-/*ARGSUSED2*/
static gint
-button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
+button_press_event(GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data UNUSED)
{
int button;
int repeated_click = FALSE;
@@ -1855,9 +1861,10 @@ button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
* GTK+ 2 doesn't handle mouse buttons 4, 5, 6 and 7 the same way as GTK+ 1.
* Instead, it abstracts scrolling via the new GdkEventScroll.
*/
-/*ARGSUSED2*/
static gboolean
-scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
+scroll_event(GtkWidget *widget,
+ GdkEventScroll *event,
+ gpointer data UNUSED)
{
int button;
int_u vim_modifiers;
@@ -1896,9 +1903,10 @@ scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
#endif /* HAVE_GTK2 */
-/*ARGSUSED*/
static gint
-button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
+button_release_event(GtkWidget *widget UNUSED,
+ GdkEventButton *event,
+ gpointer data UNUSED)
{
int x, y;
int_u vim_modifiers;
@@ -2100,7 +2108,6 @@ drag_handle_text(GdkDragContext *context,
/*
* DND receiver.
*/
-/*ARGSUSED2*/
static void
drag_data_received_cb(GtkWidget *widget,
GdkDragContext *context,
@@ -2109,7 +2116,7 @@ drag_data_received_cb(GtkWidget *widget,
GtkSelectionData *data,
guint info,
guint time_,
- gpointer user_data)
+ gpointer user_data UNUSED)
{
GdkModifierType state;
@@ -2143,7 +2150,6 @@ drag_data_received_cb(GtkWidget *widget,
* be abandoned and pop up a dialog asking the user for confirmation if
* necessary.
*/
-/*ARGSUSED0*/
static void
sm_client_check_changed_any(GnomeClient *client,
gint key,
@@ -2251,7 +2257,6 @@ write_session_file(char_u *filename)
* for confirmation if necessary. Save the current editing session and tell
* the session manager how to restart Vim.
*/
-/*ARGSUSED1*/
static gboolean
sm_client_save_yourself(GnomeClient *client,
gint phase,
@@ -2339,7 +2344,6 @@ sm_client_save_yourself(GnomeClient *client,
* here since "save_yourself" has been emitted before (unless serious trouble
* is happening).
*/
-/*ARGSUSED0*/
static void
sm_client_die(GnomeClient *client, gpointer data)
{
@@ -2379,10 +2383,9 @@ setup_save_yourself(void)
/*
* GTK tells us that XSMP needs attention
*/
-/*ARGSUSED*/
static gboolean
local_xsmp_handle_requests(source, condition, data)
- GIOChannel *source;
+ GIOChannel *source UNUSED;
GIOCondition condition;
gpointer data;
{
@@ -2480,16 +2483,18 @@ setup_save_yourself(void)
* WM_SAVE_YOURSELF hack it actually stores the session... And yes,
* it should work with KDE as well.
*/
-/*ARGSUSED1*/
static GdkFilterReturn
-global_event_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
+global_event_filter(GdkXEvent *xev,
+ GdkEvent *event UNUSED,
+ gpointer data UNUSED)
{
XEvent *xevent = (XEvent *)xev;
if (xevent != NULL
&& xevent->type == ClientMessage
&& xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
- && xevent->xclient.data.l[0] == GET_X_ATOM(save_yourself_atom))
+ && (long_u)xevent->xclient.data.l[0]
+ == GET_X_ATOM(save_yourself_atom))
{
out_flush();
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
@@ -2512,7 +2517,6 @@ global_event_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
/*
* GDK handler for X ClientMessage events.
*/
-/*ARGSUSED2*/
static GdkFilterReturn
gdk_wm_protocols_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
{
@@ -2558,9 +2562,8 @@ gdk_wm_protocols_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
/*
* Setup the window icon & xcmdsrv comm after the main window has been realized.
*/
-/*ARGSUSED*/
static void
-mainwin_realize(GtkWidget *widget, gpointer data)
+mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
{
/* If you get an error message here, you still need to unpack the runtime
* archive! */
@@ -2712,11 +2715,10 @@ create_blank_pointer(void)
}
#ifdef HAVE_GTK_MULTIHEAD
-/*ARGSUSED1*/
static void
mainwin_screen_changed_cb(GtkWidget *widget,
- GdkScreen *previous_screen,
- gpointer data)
+ GdkScreen *previous_screen UNUSED,
+ gpointer data UNUSED)
{
if (!gtk_widget_has_screen(widget))
return;
@@ -2757,9 +2759,8 @@ mainwin_screen_changed_cb(GtkWidget *widget,
* Don't try to set any VIM scrollbar sizes anywhere here. I'm relying on the
* fact that the main VIM engine doesn't take them into account anywhere.
*/
-/*ARGSUSED1*/
static void
-drawarea_realize_cb(GtkWidget *widget, gpointer data)
+drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
{
GtkWidget *sbar;
@@ -2789,9 +2790,8 @@ drawarea_realize_cb(GtkWidget *widget, gpointer data)
/*
* Properly clean up on shutdown.
*/
-/*ARGSUSED0*/
static void
-drawarea_unrealize_cb(GtkWidget *widget, gpointer data)
+drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
{
/* Don't write messages to the GUI anymore */
full_screen = FALSE;
@@ -2827,11 +2827,10 @@ drawarea_unrealize_cb(GtkWidget *widget, gpointer data)
#endif
}
-/*ARGSUSED0*/
static void
-drawarea_style_set_cb(GtkWidget *widget,
- GtkStyle *previous_style,
- gpointer data)
+drawarea_style_set_cb(GtkWidget *widget UNUSED,
+ GtkStyle *previous_style UNUSED,
+ gpointer data UNUSED)
{
gui_mch_new_colors();
}
@@ -2840,9 +2839,10 @@ drawarea_style_set_cb(GtkWidget *widget,
* Callback routine for the "delete_event" signal on the toplevel window.
* Tries to vim gracefully, or refuses to exit with changed buffers.
*/
-/*ARGSUSED*/
static gint
-delete_event_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+delete_event_cb(GtkWidget *widget UNUSED,
+ GdkEventAny *event UNUSED,
+ gpointer data UNUSED)
{
gui_shell_closed();
return TRUE;
@@ -2964,7 +2964,7 @@ update_window_manager_hints(int force_width, int force_height)
/* At start-up, don't try to set the hints until the initial
* values have been used (those that dictate our initial size)
- * Let forced (i.e., correct) values thruogh always.
+ * Let forced (i.e., correct) values through always.
*/
if (!(force_width && force_height) && init_window_hints_state > 0)
{
@@ -3142,9 +3142,8 @@ static int clicked_page; /* page clicked in tab line */
/*
* Handle selecting an item in the tab line popup menu.
*/
-/*ARGSUSED*/
static void
-tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
+tabline_menu_handler(GtkMenuItem *item UNUSED, gpointer user_data)
{
/* Add the string cmd into input buffer */
send_tabline_menu_event(clicked_page, (int)(long)user_data);