Skip to content

Commit

Permalink
change declare position
Browse files Browse the repository at this point in the history
  • Loading branch information
bukn committed Nov 25, 2016
1 parent b343206 commit 8fbae5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/evalfunc.c
Expand Up @@ -12658,20 +12658,22 @@ f_tr(typval_T *argvars, typval_T *rettv)
static void
f_trim(typval_T *argvars, typval_T *rettv)
{
int i, j, k, l;
char_u *spaces = " \t\n\r\x0B";
char_u maskbuf[NUMBUFLEN];
char_u retbuf[NUMBUFLEN];
char_u *mask;

char_u *str = get_tv_string_chk(&argvars[0]);

int i, j, k, l;
int len = STRLEN(str);
int needtrim;

if (argvars[1].v_type == VAR_STRING)
mask = get_tv_string_buf_chk(&argvars[1], maskbuf);
else
mask = spaces;

int len = STRLEN(str);
int needtrim;

for (i = 0; i < len; i++) {
needtrim = FALSE;
Expand Down

0 comments on commit 8fbae5f

Please sign in to comment.