char_u *s;
char_u **varp;
char_u *oldval;
+#if defined(FEAT_EVAL)
char_u *oldval_l = NULL;
char_u *oldval_g = NULL;
-#if defined(FEAT_EVAL)
char_u *saved_oldval = NULL;
char_u *saved_oldval_l = NULL;
char_u *saved_oldval_g = NULL;
? OPT_GLOBAL : OPT_LOCAL)
: opt_flags);
oldval = *varp;
+#if defined(FEAT_EVAL)
if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
{
oldval_l = *(char_u **)get_varp_scope(&(options[opt_idx]),
oldval_g = *(char_u **)get_varp_scope(&(options[opt_idx]),
OPT_GLOBAL);
}
+#endif
*varp = s;
#if defined(FEAT_EVAL)
int opt_flags) /* OPT_LOCAL and/or OPT_GLOBAL */
{
int old_value = *(int *)varp;
+#if defined(FEAT_EVAL)
int old_global_value = 0;
+#endif
/* Disallow changing some options from secure mode */
if ((secure
) && (options[opt_idx].flags & P_SECURE))
return e_secure;
+#if defined(FEAT_EVAL)
// Save the global value before changing anything. This is needed as for
// a global-only option setting the "local value" in fact sets the global
// value (since there is only one value).
if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
old_global_value = *(int *)get_varp_scope(&(options[opt_idx]),
OPT_GLOBAL);
+#endif
*(int *)varp = value; /* set the new value */
#ifdef FEAT_EVAL
{
char *errmsg = NULL;
long old_value = *(long *)varp;
+#if defined(FEAT_EVAL)
long old_global_value = 0; // only used when setting a local and
// global option
+#endif
long old_Rows = Rows; // remember old Rows
long old_Columns = Columns; // remember old Columns
long *pp = (long *)varp;
) && (options[opt_idx].flags & P_SECURE))
return e_secure;
+#if defined(FEAT_EVAL)
// Save the global value before changing anything. This is needed as for
// a global-only option setting the "local value" infact sets the global
// value (since there is only one value).
if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
- old_global_value = *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL);
+ old_global_value = *(long *)get_varp_scope(&(options[opt_idx]),
+ OPT_GLOBAL);
+#endif
*pp = value;
#ifdef FEAT_EVAL