summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-10-07 21:02:47 +0000
committerBram Moolenaar <Bram@vim.org>2004-10-07 21:02:47 +0000
commit3fdfa4a9a52ab3d1a790262ee872a49853ad4626 (patch)
tree76f57a06a5f3b9e0abc15446b38722658fde7e1e /src/eval.c
parente5f258eb4c4b87ea1d6f61c1a0a9deecbb5d9726 (diff)
downloadvim-3fdfa4a9a52ab3d1a790262ee872a49853ad4626.zip
updated for version 7.0017
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/eval.c b/src/eval.c
index df83da5a8..492feba59 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -8526,46 +8526,46 @@ set_cmdarg(eap, oldarg)
unsigned len;
oldval = vimvars[VV_CMDARG].val;
- if (eap != NULL)
+ if (eap == NULL)
{
- if (eap->force_bin == FORCE_BIN)
- len = 6;
- else if (eap->force_bin == FORCE_NOBIN)
- len = 8;
- else
- len = 0;
- if (eap->force_ff != 0)
- len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
+ vim_free(oldval);
+ vimvars[VV_CMDARG].val = oldarg;
+ return NULL;
+ }
+
+ if (eap->force_bin == FORCE_BIN)
+ len = 6;
+ else if (eap->force_bin == FORCE_NOBIN)
+ len = 8;
+ else
+ len = 0;
+ if (eap->force_ff != 0)
+ len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
# ifdef FEAT_MBYTE
- if (eap->force_enc != 0)
- len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
+ if (eap->force_enc != 0)
+ len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
# endif
- newval = alloc(len + 1);
- if (newval == NULL)
- return NULL;
+ newval = alloc(len + 1);
+ if (newval == NULL)
+ return NULL;
- if (eap->force_bin == FORCE_BIN)
- sprintf((char *)newval, " ++bin");
- else if (eap->force_bin == FORCE_NOBIN)
- sprintf((char *)newval, " ++nobin");
- else
- *newval = NUL;
- if (eap->force_ff != 0)
- sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
- eap->cmd + eap->force_ff);
+ if (eap->force_bin == FORCE_BIN)
+ sprintf((char *)newval, " ++bin");
+ else if (eap->force_bin == FORCE_NOBIN)
+ sprintf((char *)newval, " ++nobin");
+ else
+ *newval = NUL;
+ if (eap->force_ff != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
+ eap->cmd + eap->force_ff);
# ifdef FEAT_MBYTE
- if (eap->force_enc != 0)
- sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
- eap->cmd + eap->force_enc);
+ if (eap->force_enc != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
+ eap->cmd + eap->force_enc);
# endif
- vimvars[VV_CMDARG].val = newval;
- return oldval;
- }
-
- vim_free(oldval);
- vimvars[VV_CMDARG].val = oldarg;
- return NULL;
+ vimvars[VV_CMDARG].val = newval;
+ return oldval;
}
#endif