-/* $OpenBSD: config.h,v 1.17 2018/01/05 15:44:31 jca Exp $ */
+/* $OpenBSD: config.h,v 1.18 2018/01/14 16:04:21 anton Exp $ */
/* config.h. NOT generated automatically. */
#ifndef CONFIG_H
#define CONFIG_H
-/* Include brace-expansion? */
-#define BRACE_EXPAND 1
-
/* Include any history? */
#define HISTORY 1
-/* $OpenBSD: emacs.c,v 1.82 2018/01/08 13:01:31 millert Exp $ */
+/* $OpenBSD: emacs.c,v 1.83 2018/01/14 16:04:21 anton Exp $ */
/*
* Emacs-like command line editing and history
return (xlp);
}
-#endif /* EDIT */
+#endif /* EMACS */
-/* $OpenBSD: eval.c,v 1.57 2018/01/06 16:28:58 millert Exp $ */
+/* $OpenBSD: eval.c,v 1.58 2018/01/14 16:04:21 anton Exp $ */
/*
* Expansion - quoting, separation, substitution, globbing
static char *maybe_expand_tilde(char *, XString *, char **, int);
static char *tilde(char *);
static char *homedir(char *);
-#ifdef BRACE_EXPAND
static void alt_expand(XPtrV *, char *, char *, char *, int);
-#endif
/* compile and expand word */
char *
f &= ~DOGLOB;
if (Flag(FMARKDIRS))
f |= DOMARKDIRS;
-#ifdef BRACE_EXPAND
if (Flag(FBRACEEXPAND) && (f & DOGLOB))
f |= DOBRACE_;
-#endif /* BRACE_EXPAND */
Xinit(ds, dp, 128, ATEMP); /* init dest. string */
type = XBASE;
*dp++ = '\0';
p = Xclose(ds, dp);
-#ifdef BRACE_EXPAND
if (fdo & DOBRACE_)
/* also does globbing */
alt_expand(wp, p, p,
p + Xlength(ds, (dp - 1)),
fdo | (f & DOMARKDIRS));
- else
-#endif /* BRACE_EXPAND */
- if (fdo & DOGLOB)
+ else if (fdo & DOGLOB)
glob(p, wp, f & DOMARKDIRS);
else if ((f & DOPAT) || !(fdo & DOMAGIC_))
XPput(*wp, p);
*dp++ = MAGIC;
}
break;
-#ifdef BRACE_EXPAND
case OBRACE:
case ',':
case CBRACE:
*dp++ = MAGIC;
}
break;
-#endif /* BRACE_EXPAND */
case '=':
/* Note first unquoted = for ~ */
if (!(f & DOTEMP_) && !saw_eq) {
return ap->val.s;
}
-#ifdef BRACE_EXPAND
static void
alt_expand(XPtrV *wp, char *start, char *exp_start, char *end, int fdo)
{
}
return;
}
-#endif /* BRACE_EXPAND */
-/* $OpenBSD: main.c,v 1.86 2018/01/05 15:44:31 jca Exp $ */
+/* $OpenBSD: main.c,v 1.87 2018/01/14 16:04:21 anton Exp $ */
/*
* startup, main loop, environments and error handling
* brace expansion, so set this before setting up FPOSIX
* (change_flag() clears FBRACEEXPAND when FPOSIX is set).
*/
-#ifdef BRACE_EXPAND
Flag(FBRACEEXPAND) = 1;
-#endif /* BRACE_EXPAND */
/* set posix flag just before environment so that it will have
* exactly the same effect as the POSIXLY_CORRECT environment
-/* $OpenBSD: misc.c,v 1.65 2018/01/06 16:28:58 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.66 2018/01/14 16:04:21 anton Exp $ */
/*
* Miscellaneous functions
* entries MUST match the order of sh_flag F* enumerations in sh.h.
*/
{ "allexport", 'a', OF_ANY },
-#ifdef BRACE_EXPAND
{ "braceexpand", 0, OF_ANY }, /* non-standard */
-#endif
{ "bgnice", 0, OF_ANY },
{ NULL, 'c', OF_CMDLINE },
{ "csh-history", 0, OF_ANY }, /* non-standard */
setgroups(1, &gid);
setresuid(ksheuid, ksheuid, ksheuid);
} else if (f == FPOSIX && newval) {
-#ifdef BRACE_EXPAND
- Flag(FBRACEEXPAND) = 0
-#endif /* BRACE_EXPAND */
- ;
+ Flag(FBRACEEXPAND) = 0;
}
/* Changing interactive flag? */
if (f == FTALKING) {
-/* $OpenBSD: sh.h,v 1.68 2018/01/06 16:28:58 millert Exp $ */
+/* $OpenBSD: sh.h,v 1.69 2018/01/14 16:04:21 anton Exp $ */
/*
* Public Domain Bourne/Korn shell
*/
enum sh_flag {
FEXPORT = 0, /* -a: export all */
-#ifdef BRACE_EXPAND
FBRACEEXPAND, /* enable {} globbing */
-#endif
FBGNICE, /* bgnice */
FCOMMAND, /* -c: (invocation) execute specified command */
FCSHHISTORY, /* csh-style history enabled */