Date: Sat, 19 Jan 2013 22:12:09 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245676 - head/bin/sh Message-ID: <201301192212.r0JMC96J009110@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sat Jan 19 22:12:08 2013 New Revision: 245676 URL: http://svnweb.freebsd.org/changeset/base/245676 Log: sh: Replace an mkinit use with an initialization. Modified: head/bin/sh/input.c Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Sat Jan 19 22:08:16 2013 (r245675) +++ head/bin/sh/input.c Sat Jan 19 22:12:08 2013 (r245676) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301192212.r0JMC96J009110>