summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-05-15 19:33:18 +0000
committerBram Moolenaar <Bram@vim.org>2009-05-15 19:33:18 +0000
commit78a1531005adc6bfe435ee2b9207864688bea7e9 (patch)
treec0f3a65c5bc4a285124b518dabb080c311968ea3 /src
parent0c094b9d7f8a031e2cb495551ecc13e34cfa5818 (diff)
downloadvim-78a1531005adc6bfe435ee2b9207864688bea7e9.zip
updated for version 7.2-174
Diffstat (limited to 'src')
-rw-r--r--src/edit.c5
-rw-r--r--src/eval.c18
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_docmd.c71
-rw-r--r--src/ex_getln.c16
-rw-r--r--src/fileio.c18
-rw-r--r--src/misc1.c3
-rw-r--r--src/move.c6
-rw-r--r--src/normal.c20
-rw-r--r--src/option.c9
-rw-r--r--src/os_unix.c33
-rw-r--r--src/os_unix.h2
-rw-r--r--src/regexp.c5
-rw-r--r--src/search.c16
-rw-r--r--src/tag.c6
-rw-r--r--src/version.c2
16 files changed, 95 insertions, 137 deletions
diff --git a/src/edit.c b/src/edit.c
index 841144957..ee30a3e30 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -8991,7 +8991,10 @@ ins_right()
foldOpenCursor();
#endif
undisplay_dollar();
- if (gchar_cursor() != NUL || virtual_active()
+ if (gchar_cursor() != NUL
+#ifdef FEAT_VIRTUALEDIT
+ || virtual_active()
+#endif
)
{
start_arrow(&curwin->w_cursor);
diff --git a/src/eval.c b/src/eval.c
index 1c4f60ea9..00e199fba 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -8303,10 +8303,9 @@ f_append(argvars, rettv)
/*
* "argc()" function
*/
-/* ARGSUSED */
static void
f_argc(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = ARGCOUNT;
@@ -8315,10 +8314,9 @@ f_argc(argvars, rettv)
/*
* "argidx()" function
*/
-/* ARGSUSED */
static void
f_argidx(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = curwin->w_arg_idx;
@@ -8396,10 +8394,9 @@ f_atan(argvars, rettv)
/*
* "browse(save, title, initdir, default)" function
*/
-/* ARGSUSED */
static void
f_browse(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_BROWSE
@@ -8431,10 +8428,9 @@ f_browse(argvars, rettv)
/*
* "browsedir(title, initdir)" function
*/
-/* ARGSUSED */
static void
f_browsedir(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_BROWSE
@@ -8801,10 +8797,9 @@ f_ceil(argvars, rettv)
/*
* "changenr()" function
*/
-/*ARGSUSED*/
static void
f_changenr(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = curbuf->b_u_seq_cur;
@@ -8854,10 +8849,9 @@ f_cindent(argvars, rettv)
/*
* "clearmatches()" function
*/
-/*ARGSUSED*/
static void
f_clearmatches(argvars, rettv)
- typval_T *argvars;
+ typval_T *argvars UNUSED;
typval_T *rettv;
{
#ifdef FEAT_SEARCH_EXTRA
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 11c3ff6e4..8a0a9ec12 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4040,8 +4040,10 @@ ex_z(eap)
bigness = curwin->w_height;
else if (firstwin == lastwin)
bigness = curwin->w_p_scr * 2;
+#ifdef FEAT_WINDOWS
else
bigness = curwin->w_height - 3;
+#endif
if (bigness < 1)
bigness = 1;
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 676e81848..15ec54cca 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -1578,11 +1578,10 @@ free_cmdlines(gap)
* If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
* "func". * Otherwise return TRUE when "fgetline" equals "func".
*/
-/*ARGSUSED*/
int
getline_equal(fgetline, cookie, func)
char_u *(*fgetline) __ARGS((int, void *, int));
- void *cookie; /* argument for fgetline() */
+ void *cookie UNUSED; /* argument for fgetline() */
char_u *(*func) __ARGS((int, void *, int));
{
#ifdef FEAT_EVAL
@@ -1610,10 +1609,9 @@ getline_equal(fgetline, cookie, func)
* If "fgetline" is get_loop_line(), return the cookie used by the original
* getline function. Otherwise return "cookie".
*/
-/*ARGSUSED*/
void *
getline_cookie(fgetline, cookie)
- char_u *(*fgetline) __ARGS((int, void *, int));
+ char_u *(*fgetline) __ARGS((int, void *, int)) UNUSED;
void *cookie; /* argument for fgetline() */
{
# ifdef FEAT_EVAL
@@ -2754,11 +2752,10 @@ checkforcmd(pp, cmd, len)
* "full" is set to TRUE if the whole command name matched.
* Returns NULL for an ambiguous user command.
*/
-/*ARGSUSED*/
static char_u *
find_command(eap, full)
exarg_T *eap;
- int *full;
+ int *full UNUSED;
{
int len;
char_u *p;
@@ -5053,10 +5050,9 @@ check_more(message, forceit)
/*
* Function given to ExpandGeneric() to obtain the list of command names.
*/
-/*ARGSUSED*/
char_u *
get_command_name(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
if (idx >= (int)CMD_SIZE)
@@ -5573,10 +5569,9 @@ ex_command(eap)
* ":comclear"
* Clear all user commands, global and for current buffer.
*/
-/*ARGSUSED*/
void
ex_comclear(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
uc_clear(&ucmds);
uc_clear(&curbuf->b_ucmds);
@@ -6072,10 +6067,9 @@ get_user_command_name(idx)
/*
* Function given to ExpandGeneric() to obtain the list of user command names.
*/
-/*ARGSUSED*/
char_u *
get_user_commands(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
if (idx < curbuf->b_ucmds.ga_len)
@@ -6090,10 +6084,9 @@ get_user_commands(xp, idx)
* Function given to ExpandGeneric() to obtain the list of user command
* attributes.
*/
-/*ARGSUSED*/
char_u *
get_user_cmd_flags(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
static char *user_cmd_flags[] =
@@ -6108,10 +6101,9 @@ get_user_cmd_flags(xp, idx)
/*
* Function given to ExpandGeneric() to obtain the list of values for -nargs.
*/
-/*ARGSUSED*/
char_u *
get_user_cmd_nargs(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"};
@@ -6124,10 +6116,9 @@ get_user_cmd_nargs(xp, idx)
/*
* Function given to ExpandGeneric() to obtain the list of values for -complete.
*/
-/*ARGSUSED*/
char_u *
get_user_cmd_complete(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
return (char_u *)command_complete[idx].name;
@@ -6305,10 +6296,9 @@ ex_quit(eap)
/*
* ":cquit".
*/
-/*ARGSUSED*/
static void
ex_cquit(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
getout(1); /* this does not always pass on the exit code to the Manx
compiler. why? */
@@ -6750,10 +6740,9 @@ ex_goto(eap)
/*
* ":shell".
*/
-/*ARGSUSED*/
static void
ex_shell(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
do_shell(NULL, 0);
}
@@ -7057,10 +7046,9 @@ alist_slash_adjust()
/*
* ":preserve".
*/
-/*ARGSUSED*/
static void
ex_preserve(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
curbuf->b_flags |= BF_PRESERVED;
ml_preserve(curbuf, TRUE);
@@ -7292,10 +7280,9 @@ ex_tabmove(eap)
/*
* :tabs command: List tabs and their contents.
*/
-/*ARGSUSED*/
static void
ex_tabs(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
tabpage_T *tp;
win_T *wp;
@@ -7482,7 +7469,6 @@ ex_edit(eap)
/*
* ":edit <file>" command and alikes.
*/
-/*ARGSUSED*/
void
do_exedit(eap, old_curwin)
exarg_T *eap;
@@ -7694,10 +7680,9 @@ ex_popup(eap)
}
#endif
-/*ARGSUSED*/
static void
ex_swapname(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL)
MSG(_("No swap file"));
@@ -7710,10 +7695,9 @@ ex_swapname(eap)
* offset.
* (1998-11-02 16:21:01 R. Edward Ralston <eralston@computer.org>)
*/
-/*ARGSUSED*/
static void
ex_syncbind(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
#ifdef FEAT_SCROLLBIND
win_T *wp;
@@ -7983,10 +7967,9 @@ ex_cd(eap)
/*
* ":pwd".
*/
-/*ARGSUSED*/
static void
ex_pwd(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
if (mch_dirname(NameBuff, MAXPATHL) == OK)
{
@@ -8417,10 +8400,9 @@ ex_bang(eap)
/*
* ":undo".
*/
-/*ARGSUSED*/
static void
ex_undo(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
if (eap->addr_count == 1) /* :undo 123 */
undo_time(eap->line2, FALSE, TRUE);
@@ -8431,10 +8413,9 @@ ex_undo(eap)
/*
* ":redo".
*/
-/*ARGSUSED*/
static void
ex_redo(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
u_redo(1);
}
@@ -8442,7 +8423,6 @@ ex_redo(eap)
/*
* ":earlier" and ":later".
*/
-/*ARGSUSED*/
static void
ex_later(eap)
exarg_T *eap;
@@ -8627,10 +8607,9 @@ ex_redraw(eap)
/*
* ":redrawstatus": force redraw of status line(s)
*/
-/*ARGSUSED*/
static void
ex_redrawstatus(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
#if defined(FEAT_WINDOWS)
int r = RedrawingDisabled;
@@ -8891,11 +8870,10 @@ theend:
#if ((defined(FEAT_SESSION) || defined(FEAT_EVAL)) && defined(vim_mkdir)) \
|| defined(PROTO)
-/*ARGSUSED*/
int
vim_mkdir_emsg(name, prot)
char_u *name;
- int prot;
+ int prot UNUSED;
{
if (vim_mkdir(name, prot) != 0)
{
@@ -10968,10 +10946,9 @@ ex_setfiletype(eap)
}
#endif
-/*ARGSUSED*/
static void
ex_digraphs(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
#ifdef FEAT_DIGRAPHS
if (*eap->arg != NUL)
@@ -11005,10 +10982,9 @@ ex_set(eap)
/*
* ":nohlsearch"
*/
-/*ARGSUSED*/
static void
ex_nohlsearch(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
no_hlsearch = TRUE;
redraw_all_later(SOME_VALID);
@@ -11087,10 +11063,9 @@ ex_match(eap)
/*
* ":X": Get crypt key
*/
-/*ARGSUSED*/
static void
ex_X(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
(void)get_crypt_key(TRUE, TRUE);
}
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 32635f814..26bf766c7 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -140,11 +140,10 @@ static int ex_window __ARGS((void));
* Return pointer to allocated string if there is a commandline, NULL
* otherwise.
*/
-/*ARGSUSED*/
char_u *
getcmdline(firstc, count, indent)
int firstc;
- long count; /* only used for incremental search */
+ long count UNUSED; /* only used for incremental search */
int indent; /* indent for inside conditionals */
{
int c;
@@ -2113,11 +2112,10 @@ correct_cmdspos(idx, cells)
/*
* Get an Ex command line for the ":" command.
*/
-/* ARGSUSED */
char_u *
-getexline(c, dummy, indent)
+getexline(c, cookie, indent)
int c; /* normally ':', NUL for ":append" */
- void *dummy; /* cookie not used */
+ void *cookie UNUSED;
int indent; /* indent for inside conditionals */
{
/* When executing a register, remove ':' that's in front of each line. */
@@ -2132,12 +2130,11 @@ getexline(c, dummy, indent)
* mappings or abbreviations.
* Returns a string in allocated memory or NULL.
*/
-/* ARGSUSED */
char_u *
-getexmodeline(promptc, dummy, indent)
+getexmodeline(promptc, cookie, indent)
int promptc; /* normally ':', NUL for ":append" and '?' for
:s prompt */
- void *dummy; /* cookie not used */
+ void *cookie UNUSED;
int indent; /* indent for inside conditionals */
{
garray_T line_ga;
@@ -3832,11 +3829,10 @@ tilde_replace(orig_pat, num_files, files)
* Returns EXPAND_NOTHING when the character that triggered expansion should
* be inserted like a normal character.
*/
-/*ARGSUSED*/
static int
showmatches(xp, wildmenu)
expand_T *xp;
- int wildmenu;
+ int wildmenu UNUSED;
{
#define L_SHOWFILE(m) (showtail ? sm_gettail(files_found[m]) : files_found[m])
int num_files;
diff --git a/src/fileio.c b/src/fileio.c
index ae656a0f1..4dcbd8e37 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3498,7 +3498,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (mch_stat((char *)IObuff, &st) < 0
|| st.st_uid != st_old.st_uid
|| st.st_gid != st_old.st_gid
- || st.st_mode != perm)
+ || (long)st.st_mode != perm)
backup_copy = TRUE;
# endif
/* Close the file before removing it, on MS-Windows we
@@ -5963,7 +5963,7 @@ buf_modname(shortname, fname, ext, prepend_dot)
else if (*ext == '.')
#endif
{
- if (s - ptr > (size_t)8)
+ if ((size_t)(s - ptr) > (size_t)8)
{
s = ptr + 8;
*s = '\0';
@@ -6460,11 +6460,10 @@ move_lines(frombuf, tobuf)
* return 2 if a message has been displayed.
* return 0 otherwise.
*/
-/*ARGSUSED*/
int
buf_check_timestamp(buf, focus)
buf_T *buf;
- int focus; /* called for GUI focus event */
+ int focus UNUSED; /* called for GUI focus event */
{
struct stat st;
int stat_res;
@@ -6868,12 +6867,11 @@ buf_reload(buf, orig_mode)
/* Careful: autocommands may have made "buf" invalid! */
}
-/*ARGSUSED*/
void
buf_store_time(buf, st, fname)
buf_T *buf;
struct stat *st;
- char_u *fname;
+ char_u *fname UNUSED;
{
buf->b_mtime = (long)st->st_mtime;
buf->b_orig_size = (size_t)st->st_size;
@@ -6936,10 +6934,9 @@ vim_deltempdir()
* The returned pointer is to allocated memory.
* The returned pointer is NULL if no valid name was found.
*/
-/*ARGSUSED*/
char_u *
vim_tempname(extra_char)
- int extra_char; /* character to use in the name instead of '?' */
+ int extra_char UNUSED; /* char to use in the name instead of '?' */
{
#ifdef USE_TMPNAM
char_u itmp[L_tmpnam]; /* use tmpnam() */
@@ -6968,7 +6965,7 @@ vim_tempname(extra_char)
/*
* Try the entries in TEMPDIRNAMES to create the temp directory.
*/
- for (i = 0; i < sizeof(tempdirs) / sizeof(char *); ++i)
+ for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i)
{
/* expand $TMP, leave room for "/v1100000/999999999" */
expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
@@ -9588,13 +9585,12 @@ match_file_list(list, sfname, ffname)
*
* Returns NULL when out of memory.
*/
-/*ARGSUSED*/
char_u *
file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
char_u *pat;
char_u *pat_end; /* first char after pattern or NULL */
char *allow_dirs; /* Result passed back out in here */
- int no_bslash; /* Don't use a backward slash as pathsep */
+ int no_bslash UNUSED; /* Don't use a backward slash as pathsep */
{
int size;
char_u *endp;
diff --git a/src/misc1.c b/src/misc1.c
index 100baa2f1..47a2274e7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2188,12 +2188,11 @@ del_chars(count, fixpos)
*
* return FAIL for failure, OK otherwise
*/
-/*ARGSUSED*/
int
del_bytes(count, fixpos_arg, use_delcombine)
long count;
int fixpos_arg;
- int use_delcombine; /* 'delcombine' option applies */
+ int use_delcombine UNUSED; /* 'delcombine' option applies */
{
char_u *oldp, *newp;
colnr_T oldlen;
diff --git a/src/move.c b/src/move.c
index 17b16a1e8..abf055f3c 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1238,11 +1238,10 @@ curs_columns(scroll)
/*
* Scroll the current window down by "line_count" logical lines. "CTRL-Y"
*/
-/*ARGSUSED*/
void
scrolldown(line_count, byfold)
long line_count;
- int byfold; /* TRUE: count a closed fold as one line */
+ int byfold UNUSED; /* TRUE: count a closed fold as one line */
{
long done = 0; /* total # of physical lines done */
int wrow;
@@ -1349,11 +1348,10 @@ scrolldown(line_count, byfold)
/*
* Scroll the current window up by "line_count" logical lines. "CTRL-E"
*/
-/*ARGSUSED*/
void
scrollup(line_count, byfold)
long line_count;
- int byfold; /* TRUE: count a closed fold as one line */
+ int byfold UNUSED; /* TRUE: count a closed fold as one line */
{
#if defined(FEAT_FOLDING) || defined(FEAT_DIFF)
linenr_T lnum;
diff --git a/src/normal.c b/src/normal.c
index 326995e6d..9057b780a 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -493,14 +493,14 @@ init_normal_cmds()
int i;
/* Fill the index table with a one to one relation. */
- for (i = 0; i < NV_CMDS_SIZE; ++i)
+ for (i = 0; i < (int)NV_CMDS_SIZE; ++i)
nv_cmd_idx[i] = i;
/* Sort the commands by the command character. */
qsort((void *)&nv_cmd_idx, (size_t)NV_CMDS_SIZE, sizeof(short), nv_compare);
/* Find the first entry that can't be indexed by the command character. */
- for (i = 0; i < NV_CMDS_SIZE; ++i)
+ for (i = 0; i < (int)NV_CMDS_SIZE; ++i)
if (i != nv_cmds[nv_cmd_idx[i]].cmd_char)
break;
nv_max_linear = i - 1;
@@ -561,11 +561,10 @@ find_command(cmdchar)
/*
* Execute a command in Normal mode.
*/
-/*ARGSUSED*/
void
normal_cmd(oap, toplevel)
oparg_T *oap;
- int toplevel; /* TRUE when called from main() */
+ int toplevel UNUSED; /* TRUE when called from main() */
{
cmdarg_T ca; /* command arguments */
int c;
@@ -2188,10 +2187,9 @@ op_colon(oap)
/*
* Handle the "g@" operator: call 'operatorfunc'.
*/
-/*ARGSUSED*/
static void
op_function(oap)
- oparg_T *oap;
+ oparg_T *oap UNUSED;
{
#ifdef FEAT_EVAL
char_u *(argv[1]);
@@ -4100,10 +4098,9 @@ nv_ignore(cap)
* Command character that doesn't do anything, but unlike nv_ignore() does
* start edit(). Used for "startinsert" executed while starting up.
*/
-/*ARGSUSED */
static void
nv_nop(cap)
- cmdarg_T *cap;
+ cmdarg_T *cap UNUSED;
{
}
@@ -5241,7 +5238,7 @@ nv_colon(cap)
if (cap->oap->op_type != OP_NOP
&& (cap->oap->start.lnum > curbuf->b_ml.ml_line_count
|| cap->oap->start.col >
- STRLEN(ml_get(cap->oap->start.lnum))))
+ (colnr_T)STRLEN(ml_get(cap->oap->start.lnum))))
clearopbeep(cap->oap);
}
}
@@ -5816,7 +5813,10 @@ nv_right(cap)
for (n = cap->count1; n > 0; --n)
{
if ((!PAST_LINE && oneright() == FAIL)
- || (PAST_LINE && *ml_get_cursor() == NUL))
+#ifdef FEAT_VISUAL
+ || (PAST_LINE && *ml_get_cursor() == NUL)
+#endif
+ )
{
/*
* <Space> wraps to next line if 'whichwrap' has 's'.
diff --git a/src/option.c b/src/option.c
index 5e71c9bf3..1f09a3afc 100644
--- a/src/option.c
+++ b/src/option.c
@@ -5302,14 +5302,13 @@ static void redraw_titles()
* When "set_sid" is zero set the scriptID to current_SID. When "set_sid" is
* SID_NONE don't set the scriptID. Otherwise set the scriptID to "set_sid".
*/
-/*ARGSUSED*/
void
set_string_option_direct(name, opt_idx, val, opt_flags, set_sid)
char_u *name;
int opt_idx;
char_u *val;
int opt_flags; /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
- int set_sid;
+ int set_sid UNUSED;
{
char_u *s;
char_u **varp;
@@ -9357,10 +9356,9 @@ check_win_options(win)
/*
* Check for NULL pointers in a winopt_T and replace them with empty_option.
*/
-/*ARGSUSED*/
void
check_winopt(wop)
- winopt_T *wop;
+ winopt_T *wop UNUSED;
{
#ifdef FEAT_FOLDING
check_string_option(&wop->wo_fdi);
@@ -9382,10 +9380,9 @@ check_winopt(wop)
/*
* Free the allocated memory inside a winopt_T.
*/
-/*ARGSUSED*/
void
clear_winopt(wop)
- winopt_T *wop;
+ winopt_T *wop UNUSED;
{
#ifdef FEAT_FOLDING
clear_string_option(&wop->wo_fdi);
diff --git a/src/os_unix.c b/src/os_unix.c
index d5e681281..88b3a6544 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -458,10 +458,9 @@ mch_char_avail()
* Return total amount of memory available in Kbyte.
* Doesn't change when memory has been allocated.
*/
-/* ARGSUSED */
long_u
mch_total_mem(special)
- int special;
+ int special UNUSED;
{
# ifdef __EMX__
return ulimit(3, 0L) >> 10; /* always 32MB? */
@@ -815,7 +814,6 @@ init_signal_stack()
* Let me try it with a few tricky defines from my own osdef.h (jw).
*/
#if defined(SIGWINCH)
-/* ARGSUSED */
static RETSIGTYPE
sig_winch SIGDEFARG(sigarg)
{
@@ -1355,11 +1353,10 @@ vim_handle_signal(sig)
/*
* Check_win checks whether we have an interactive stdout.
*/
-/* ARGSUSED */
int
mch_check_win(argc, argv)
- int argc;
- char **argv;
+ int argc UNUSED;
+ char **argv UNUSED;
{
#ifdef OS2
/*
@@ -2467,7 +2464,7 @@ mch_FullName(fname, buf, len, force)
}
/* Catch file names which are too long. */
- if (retval == FAIL || STRLEN(buf) + STRLEN(fname) >= len)
+ if (retval == FAIL || (int)(STRLEN(buf) + STRLEN(fname)) >= len)
return FAIL;
/* Do not append ".", "/dir/." is equal to "/dir". */
@@ -2686,7 +2683,7 @@ mch_copy_sec(from_file, to_file)
*/
vim_acl_T
mch_get_acl(fname)
- char_u *fname;
+ char_u *fname UNUSED;
{
vim_acl_T ret = NULL;
#ifdef HAVE_POSIX_ACL
@@ -2746,7 +2743,7 @@ mch_get_acl(fname)
*/
void
mch_set_acl(fname, aclent)
- char_u *fname;
+ char_u *fname UNUSED;
vim_acl_T aclent;
{
if (aclent == NULL)
@@ -2789,10 +2786,9 @@ mch_free_acl(aclent)
/*
* Set hidden flag for "name".
*/
-/* ARGSUSED */
void
mch_hide(name)
- char_u *name;
+ char_u *name UNUSED;
{
/* can't hide a file */
}
@@ -3481,10 +3477,9 @@ check_mouse_termcode()
/*
* set screen mode, always fails.
*/
-/* ARGSUSED */
int
mch_screenmode(arg)
- char_u *arg;
+ char_u *arg UNUSED;
{
EMSG(_(e_screenmode));
return FAIL;
@@ -4189,9 +4184,10 @@ mch_call_shell(cmd, options)
{
s = vim_strchr(lp + written, NL);
len = write(toshell_fd, (char *)lp + written,
- s == NULL ? l : s - (lp + written));
+ s == NULL ? l
+ : (size_t)(s - (lp + written)));
}
- if (len == l)
+ if (len == (int)l)
{
/* Finished a line, add a NL, unless this line
* should not have one. */
@@ -4746,7 +4742,6 @@ WaitForChar(msec)
* Returns also, when a request from Sniff is waiting -- toni.
* Or when a Linux GPM mouse event is waiting.
*/
-/* ARGSUSED */
#if defined(__BEOS__)
int
#else
@@ -4755,7 +4750,7 @@ WaitForChar(msec)
RealWaitForChar(fd, msec, check_for_gpm)
int fd;
long msec;
- int *check_for_gpm;
+ int *check_for_gpm UNUSED;
{
int ret;
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
@@ -5572,7 +5567,7 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
i = fread((char *)buffer, 1, len, fd);
fclose(fd);
mch_remove(tempname);
- if (i != len)
+ if (i != (int)len)
{
/* unexpected read error */
EMSG2(_(e_notread), tempname);
@@ -5633,7 +5628,7 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
if (shell_style == STYLE_PRINT && !did_find_nul)
{
/* If there is a NUL, set did_find_nul, else set check_spaces */
- if (len && (int)STRLEN(buffer) < len - 1)
+ if (len && (int)STRLEN(buffer) < (int)len - 1)
did_find_nul = TRUE;
else
check_spaces = TRUE;
diff --git a/src/os_unix.h b/src/os_unix.h
index 0a37763c1..dd70939dc 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -126,7 +126,7 @@
# define SIGDUMMYARG 0, 0, (struct sigcontext *)0
# else
# define SIGPROTOARG (int)
-# define SIGDEFARG(s) (s) int s;
+# define SIGDEFARG(s) (s) int s UNUSED;
# define SIGDUMMYARG 0
# endif
#else
diff --git a/src/regexp.c b/src/regexp.c
index 00df12d54..dc0433dbf 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -471,7 +471,7 @@ get_char_class(pp)
if ((*pp)[1] == ':')
{
- for (i = 0; i < sizeof(class_names) / sizeof(*class_names); ++i)
+ for (i = 0; i < (int)(sizeof(class_names) / sizeof(*class_names)); ++i)
if (STRNCMP(*pp + 2, class_names[i], STRLEN(class_names[i])) == 0)
{
*pp += STRLEN(class_names[i]) + 2;
@@ -3362,12 +3362,11 @@ vim_regexec_multi(rmp, win, buf, lnum, col, tm)
* Match a regexp against a string ("line" points to the string) or multiple
* lines ("line" is NULL, use reg_getline()).
*/
-/*ARGSUSED*/
static long
vim_regexec_both(line, col, tm)
char_u *line;
colnr_T col; /* column to start looking for match */
- proftime_T *tm; /* timeout limit or NULL */
+ proftime_T *tm UNUSED; /* timeout limit or NULL */
{
regprog_T *prog;
char_u *s;
diff --git a/src/search.c b/src/search.c
index ced1b9092..27e94fbb4 100644
--- a/src/search.c
+++ b/src/search.c
@@ -522,7 +522,6 @@ last_pat_prog(regmatch)
* When FEAT_EVAL is defined, returns the index of the first matching
* subpattern plus one; one if there was none.
*/
-/*ARGSUSED*/
int
searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
win_T *win; /* window to search in; can be NULL for a
@@ -535,7 +534,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
int options;
int pat_use; /* which pattern to use when "pat" is empty */
linenr_T stop_lnum; /* stop after this line number when != 0 */
- proftime_T *tm; /* timeout limit or NULL */
+ proftime_T *tm UNUSED; /* timeout limit or NULL */
{
int found;
linenr_T lnum; /* no init to shut up Apollo cc */
@@ -554,8 +553,6 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
int save_called_emsg = called_emsg;
#ifdef FEAT_SEARCH_EXTRA
int break_loop = FALSE;
-#else
-# define break_loop FALSE
#endif
if (search_regcomp(pat, RE_SEARCH, pat_use,
@@ -940,7 +937,10 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
* twice.
*/
if (!p_ws || stop_lnum != 0 || got_int || called_emsg
- || break_loop || found || loop)
+#ifdef FEAT_SEARCH_EXTRA
+ || break_loop
+#endif
+ || found || loop)
break;
/*
@@ -958,7 +958,11 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm)
give_warning((char_u *)_(dir == BACKWARD
? top_bot_msg : bot_top_msg), TRUE);
}
- if (got_int || called_emsg || break_loop)
+ if (got_int || called_emsg
+#ifdef FEAT_SEARCH_EXTRA
+ || break_loop
+#endif
+ )
break;
}
while (--count > 0 && found); /* stop after count matches or no match */
diff --git a/src/tag.c b/src/tag.c
index 391b10687..624989d9f 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1105,10 +1105,9 @@ taglen_advance(l)
/*
* Print the tag stack
*/
-/*ARGSUSED*/
void
do_tags(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
int i;
char_u *name;
@@ -2530,11 +2529,10 @@ static void found_tagfile_cb __ARGS((char_u *fname, void *cookie));
* Callback function for finding all "tags" and "tags-??" files in
* 'runtimepath' doc directories.
*/
-/*ARGSUSED*/
static void
found_tagfile_cb(fname, cookie)
char_u *fname;
- void *cookie;
+ void *cookie UNUSED;
{
if (ga_grow(&tag_fnames, 1) == OK)
((char_u **)(tag_fnames.ga_data))[tag_fnames.ga_len++] =
diff --git a/src/version.c b/src/version.c
index a6e8e2b2e..5e4ec7986 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 174,
+/**/
173,
/**/
172,