Skip to content

Commit

Permalink
updated for version 7.2-177
Browse files Browse the repository at this point in the history
  • Loading branch information
vimboss committed May 16, 2009
1 parent 47b7630 commit 8db81be
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 240 deletions.
253 changes: 86 additions & 167 deletions src/eval.c

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions src/ex_docmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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];
}
Expand All @@ -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];
}
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 7 additions & 2 deletions src/ex_eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/ex_getln.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions src/farsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 4 additions & 7 deletions src/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down
18 changes: 7 additions & 11 deletions src/hardcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,11 @@ prt_get_unit(idx)
/*
* Print the page header.
*/
/*ARGSUSED*/
static void
prt_header(psettings, pagenum, lnum)
prt_settings_T *psettings;
int pagenum;
linenr_T lnum;
linenr_T lnum UNUSED;
{
int width = psettings->chars_per_line;
int page_line;
Expand Down Expand Up @@ -1881,7 +1880,7 @@ prt_next_dsc(p_dsc_line)
return FALSE;

/* Find type of DSC comment */
for (comment = 0; comment < NUM_ELEMENTS(prt_dsc_table); comment++)
for (comment = 0; comment < (int)NUM_ELEMENTS(prt_dsc_table); comment++)
if (prt_resfile_strncmp(0, prt_dsc_table[comment].string,
prt_dsc_table[comment].len) == 0)
break;
Expand Down Expand Up @@ -2454,12 +2453,11 @@ prt_match_charset(p_charset, p_cmap, pp_mbchar)
}
#endif

/*ARGSUSED*/
int
mch_print_init(psettings, jobname, forceit)
prt_settings_T *psettings;
char_u *jobname;
int forceit;
int forceit UNUSED;
{
int i;
char *paper_name;
Expand Down Expand Up @@ -2514,7 +2512,7 @@ mch_print_init(psettings, jobname, forceit)
if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
{
p_mbenc_first = NULL;
for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
for (cmap = 0; cmap < (int)NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
&p_mbenc))
{
Expand Down Expand Up @@ -2642,7 +2640,7 @@ mch_print_init(psettings, jobname, forceit)
paper_name = "A4";
paper_strlen = 2;
}
for (i = 0; i < PRT_MEDIASIZE_LEN; ++i)
for (i = 0; i < (int)PRT_MEDIASIZE_LEN; ++i)
if (STRLEN(prt_mediasize[i].name) == (unsigned)paper_strlen
&& STRNICMP(prt_mediasize[i].name, paper_name,
paper_strlen) == 0)
Expand Down Expand Up @@ -3308,10 +3306,9 @@ mch_print_end_page()
return !prt_file_error;
}

/*ARGSUSED*/
int
mch_print_begin_page(str)
char_u *str;
char_u *str UNUSED;
{
int page_num[2];

Expand Down Expand Up @@ -3379,11 +3376,10 @@ mch_print_start_line(margin, page_line)
#endif
}

/*ARGSUSED*/
int
mch_print_text_out(p, len)
char_u *p;
int len;
int len UNUSED;
{
int need_break;
char_u ch;
Expand Down
24 changes: 8 additions & 16 deletions src/if_cscope.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static cscmd_T cs_cmds[] =
N_("Reinit all connections"), "reset", 0 },
{ "show", cs_show,
N_("Show connections"), "show", 0 },
{ NULL }
{ NULL, NULL, NULL, NULL, 0 }
};

static void
Expand All @@ -107,10 +107,9 @@ static enum
* Function given to ExpandGeneric() to obtain the cscope command
* expansion.
*/
/*ARGSUSED*/
char_u *
get_cscope_name(xp, idx)
expand_T *xp;
expand_T *xp UNUSED;
int idx;
{
int current_idx;
Expand Down Expand Up @@ -496,10 +495,9 @@ cs_connection(num, dbpath, ppath)
*
* MAXPATHL 256
*/
/* ARGSUSED */
static int
cs_add(eap)
exarg_T *eap;
exarg_T *eap UNUSED;
{
char *fname, *ppath, *flags = NULL;

Expand Down Expand Up @@ -1292,10 +1290,9 @@ cs_find_common(opt, pat, forceit, verbose, use_ll)
*
* print help
*/
/* ARGSUSED */
static int
cs_help(eap)
exarg_T *eap;
exarg_T *eap UNUSED;
{
cscmd_T *cmdp = cs_cmds;

Expand Down Expand Up @@ -1399,13 +1396,12 @@ GetWin32Error()
*
* insert a new cscope database filename into the filelist
*/
/*ARGSUSED*/
static int
cs_insert_filelist(fname, ppath, flags, sb)
char *fname;
char *ppath;
char *flags;
struct stat *sb;
struct stat *sb UNUSED;
{
short i, j;
#ifndef UNIX
Expand Down Expand Up @@ -1561,10 +1557,9 @@ cs_lookup_cmd(eap)
*
* nuke em
*/
/* ARGSUSED */
static int
cs_kill(eap)
exarg_T *eap;
exarg_T *eap UNUSED;
{
char *stok;
short i;
Expand Down Expand Up @@ -2241,7 +2236,6 @@ cs_read_prompt(i)
/*
* Used to catch and ignore SIGALRM below.
*/
/* ARGSUSED */
static RETSIGTYPE
sig_handler SIGDEFARG(sigarg)
{
Expand Down Expand Up @@ -2381,10 +2375,9 @@ cs_release_csp(i, freefnpp)
*
* calls cs_kill on all cscope connections then reinits
*/
/* ARGSUSED */
static int
cs_reset(eap)
exarg_T *eap;
exarg_T *eap UNUSED;
{
char **dblist = NULL, **pplist = NULL, **fllist = NULL;
int i;
Expand Down Expand Up @@ -2497,10 +2490,9 @@ cs_resolve_file(i, name)
*
* show all cscope connections
*/
/* ARGSUSED */
static int
cs_show(eap)
exarg_T *eap;
exarg_T *eap UNUSED;
{
short i;
if (cs_cnt_connections() == 0)
Expand Down
Loading

0 comments on commit 8db81be

Please sign in to comment.