summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-01-19 22:12:08 +0000
committerjilles <jilles@FreeBSD.org>2013-01-19 22:12:08 +0000
commit3d71dcf315f0eb0c363219aa04d2227cb3a3a8c7 (patch)
tree8ca112543d4d770d2e87d1edfc5bcb0b0345fa0d /bin
parent1d1de12ebe495899bdbd18be4a6c294b7ac9d960 (diff)
downloadFreeBSD-src-3d71dcf315f0eb0c363219aa04d2227cb3a3a8c7.zip
FreeBSD-src-3d71dcf315f0eb0c363219aa04d2227cb3a3a8c7.tar.gz
sh: Replace an mkinit use with an initialization.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/input.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c
index 2005a87..84580ad 100644
--- a/bin/sh/input.c
+++ b/bin/sh/input.c
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
#define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */
-MKINIT
struct strpush {
struct strpush *prev; /* preceding string on stack */
char *prevstring;
@@ -78,7 +77,6 @@ struct strpush {
* contains information about the current file being read.
*/
-MKINIT
struct parsefile {
struct parsefile *prev; /* preceding file on stack */
int linno; /* current line */
@@ -96,8 +94,11 @@ int plinno = 1; /* input line number */
int parsenleft; /* copy of parsefile->nleft */
MKINIT int parselleft; /* copy of parsefile->lleft */
char *parsenextc; /* copy of parsefile->nextc */
-MKINIT struct parsefile basepf; /* top level input file */
-char basebuf[BUFSIZ + 1]; /* buffer for top level input file */
+static char basebuf[BUFSIZ + 1];/* buffer for top level input file */
+static struct parsefile basepf = { /* top level input file */
+ .nextc = basebuf,
+ .buf = basebuf
+};
static struct parsefile *parsefile = &basepf; /* current input file */
int whichprompt; /* 1 == PS1, 2 == PS2 */
@@ -111,12 +112,6 @@ static void popstring(void);
INCLUDE "input.h"
INCLUDE "error.h"
-MKINIT char basebuf[];
-
-INIT {
- basepf.nextc = basepf.buf = basebuf;
-}
-
RESET {
popallfiles();
parselleft = parsenleft = 0; /* clear input buffer */
OpenPOWER on IntegriCloud