-/* $OpenBSD: main.c,v 1.67 2015/10/19 02:15:45 mmcc Exp $ */
+/* $OpenBSD: main.c,v 1.68 2015/10/19 14:01:37 mmcc Exp $ */
/*
* startup, main loop, environments and error handling
int subst_exstat;
const char *safe_prompt;
+Area aperm;
+
+struct env *e;
+
+char shell_flags[FNFLAGS];
+
/*
* shell initialization
*/
-/* $OpenBSD: sh.h,v 1.40 2015/10/18 18:05:35 mmcc Exp $ */
+/* $OpenBSD: sh.h,v 1.41 2015/10/19 14:01:37 mmcc Exp $ */
/*
* Public Domain Bourne/Korn shell
struct link *freelist; /* free list */
} Area;
-EXTERN Area aperm; /* permanent object space */
+extern Area aperm; /* permanent object space */
#define APERM &aperm
#define ATEMP &e->area
/*
* parsing & execution environment
*/
-EXTERN struct env {
+struct env {
short type; /* environment type - see below */
short flags; /* EF_* */
Area area; /* temporary allocation area */
struct env *oenv; /* link to previous environment */
sigjmp_buf jbuf; /* long jump back to env creator */
struct temp *temps; /* temp files */
-} *e;
+};
+extern struct env *e;
/* struct env.type values */
#define E_NONE 0 /* dummy environment */
#define Flag(f) (shell_flags[(int) (f)])
-EXTERN char shell_flags [FNFLAGS];
+extern char shell_flags[FNFLAGS];
EXTERN char null [] I__(""); /* null value for variable */