From fa9dffc6d98a597bd15dad601c3d9db278e4ccdc Mon Sep 17 00:00:00 2001 From: mmcc Date: Mon, 19 Oct 2015 14:01:37 +0000 Subject: [PATCH] More removal of EXTERN. ok nicm@ --- bin/ksh/main.c | 8 +++++++- bin/ksh/sh.h | 11 ++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bin/ksh/main.c b/bin/ksh/main.c index 707f2eea150..4fe57cababc 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $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 @@ -32,6 +32,12 @@ int exstat; int subst_exstat; const char *safe_prompt; +Area aperm; + +struct env *e; + +char shell_flags[FNFLAGS]; + /* * shell initialization */ diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h index 058f87aad51..f2e59ff0a0c 100644 --- a/bin/ksh/sh.h +++ b/bin/ksh/sh.h @@ -1,4 +1,4 @@ -/* $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 @@ -73,7 +73,7 @@ typedef struct Area { 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 @@ -90,7 +90,7 @@ EXTERN Area aperm; /* permanent object space */ /* * parsing & execution environment */ -EXTERN struct env { +struct env { short type; /* environment type - see below */ short flags; /* EF_* */ Area area; /* temporary allocation area */ @@ -99,7 +99,8 @@ EXTERN struct env { 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 */ @@ -203,7 +204,7 @@ enum sh_flag { #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 */ -- 2.20.1