Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2013 19:48:15 +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: r253658 - head/bin/sh
Message-ID:  <201307251948.r6PJmF9I071419@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
 

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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307251948.r6PJmF9I071419>