From owner-svn-src-head@FreeBSD.ORG Thu Jul 25 19:48:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4D303CBA; Thu, 25 Jul 2013 19:48:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 290112C78; Thu, 25 Jul 2013 19:48:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6PJmH1l071428; Thu, 25 Jul 2013 19:48:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6PJmF9I071419; Thu, 25 Jul 2013 19:48:15 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201307251948.r6PJmF9I071419@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 25 Jul 2013 19:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253658 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jul 2013 19:48:17 -0000 Author: jilles Date: Thu Jul 25 19:48:15 2013 New Revision: 253658 URL: http://svnweb.freebsd.org/changeset/base/253658 Log: sh: Remove #define MKINIT. MKINIT only served for the removed mkinit. Many variables can be static now. Modified: head/bin/sh/eval.c head/bin/sh/input.c head/bin/sh/jobs.c head/bin/sh/parser.c head/bin/sh/redir.c head/bin/sh/shell.h head/bin/sh/trap.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/eval.c Thu Jul 25 19:48:15 2013 (r253658) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); int evalskip; /* set if we are skipping commands */ int skipcount; /* number of levels to skip */ -MKINIT int loopnest; /* current loop nesting level */ +static int loopnest; /* current loop nesting level */ int funcnest; /* depth of function calls */ static int builtin_flags; /* evalcommand flags for builtins */ Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/input.c Thu Jul 25 19:48:15 2013 (r253658) @@ -92,7 +92,7 @@ struct parsefile { int plinno = 1; /* input line number */ int parsenleft; /* copy of parsefile->nleft */ -MKINIT int parselleft; /* copy of parsefile->lleft */ +static int parselleft; /* copy of parsefile->lleft */ const char *parsenextc; /* copy of parsefile->nextc */ static char basebuf[BUFSIZ + 1];/* buffer for top level input file */ static struct parsefile basepf = { /* top level input file */ Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/jobs.c Thu Jul 25 19:48:15 2013 (r253658) @@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$"); static struct job *jobtab; /* array of jobs */ static int njobs; /* size of array */ -MKINIT pid_t backgndpid = -1; /* pid of last background process */ -MKINIT struct job *bgjob = NULL; /* last background process */ +static pid_t backgndpid = -1; /* pid of last background process */ +static struct job *bgjob = NULL; /* last background process */ #if JOBS static struct job *jobmru; /* most recently used job list */ static pid_t initialpgrp; /* pgrp of shell on invocation */ @@ -116,7 +116,7 @@ static void showjob(struct job *, int); * Turn job control on and off. */ -MKINIT int jobctl; +static int jobctl; #if JOBS void Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/parser.c Thu Jul 25 19:48:15 2013 (r253658) @@ -96,9 +96,9 @@ static struct heredoc *heredoclist; /* l static int doprompt; /* if set, prompt the user */ static int needprompt; /* true if interactive and at start of line */ static int lasttoken; /* last token read */ -MKINIT int tokpushback; /* last token pushed back */ +int tokpushback; /* last token pushed back */ static char *wordtext; /* text of last word returned by readtoken */ -MKINIT int checkkwd; /* 1 == check for kwds, 2 == also eat newlines */ +static int checkkwd; /* 1 == check for kwds, 2 == also eat newlines */ static struct nodelist *backquotelist; static union node *redirnode; static struct heredoc *heredoc; Modified: head/bin/sh/redir.c ============================================================================== --- head/bin/sh/redir.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/redir.c Thu Jul 25 19:48:15 2013 (r253658) @@ -66,14 +66,13 @@ __FBSDID("$FreeBSD$"); #define CLOSED -1 /* fd was not open before redir */ -MKINIT struct redirtab { struct redirtab *next; int renamed[10]; }; -MKINIT struct redirtab *redirlist; +static struct redirtab *redirlist; /* * We keep track of whether or not fd0 has been redirected. This is for Modified: head/bin/sh/shell.h ============================================================================== --- head/bin/sh/shell.h Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/shell.h Thu Jul 25 19:48:15 2013 (r253658) @@ -63,7 +63,6 @@ typedef intmax_t arith_t; #define ARITH_MAX INTMAX_MAX typedef void *pointer; -#define MKINIT /* empty */ #include Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Thu Jul 25 19:37:49 2013 (r253657) +++ head/bin/sh/trap.c Thu Jul 25 19:48:15 2013 (r253658) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define S_RESET 5 /* temporary - to reset a hard ignored sig */ -MKINIT char sigmode[NSIG]; /* current value of signal */ +static char sigmode[NSIG]; /* current value of signal */ volatile sig_atomic_t pendingsig; /* indicates some signal received */ int in_dotrap; /* do we execute in a trap handler? */ static char *volatile trap[NSIG]; /* trap handler commands */