svn commit: r213811 - head/bin/sh

David E. O'Brien obrien at FreeBSD.org
Wed Oct 13 22:18:04 UTC 2010


Author: obrien
Date: Wed Oct 13 22:18:03 2010
New Revision: 213811
URL: http://svn.freebsd.org/changeset/base/213811

Log:
  In the spirit of r90111, depend on c89 and remove the "STATIC" macro
  and its usage.

Modified:
  head/bin/sh/Makefile
  head/bin/sh/alias.c
  head/bin/sh/cd.c
  head/bin/sh/error.c
  head/bin/sh/eval.c
  head/bin/sh/exec.c
  head/bin/sh/expand.c
  head/bin/sh/histedit.c
  head/bin/sh/input.c
  head/bin/sh/jobs.c
  head/bin/sh/main.c
  head/bin/sh/memalloc.c
  head/bin/sh/nodes.c.pat
  head/bin/sh/options.c
  head/bin/sh/output.c
  head/bin/sh/parser.c
  head/bin/sh/redir.c
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/trap.c
  head/bin/sh/var.c

Modified: head/bin/sh/Makefile
==============================================================================
--- head/bin/sh/Makefile	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/Makefile	Wed Oct 13 22:18:03 2010	(r213811)
@@ -21,7 +21,7 @@ LDADD= -ll -ledit -ltermcap
 LFLAGS= -8	# 8-bit lex scanner for arithmetic
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
-# DEBUG_FLAGS+= -g -DDEBUG=3 -fno-inline
+# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
 WARNS?=	2
 WFORMAT=0
 

Modified: head/bin/sh/alias.c
==============================================================================
--- head/bin/sh/alias.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/alias.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
 static struct alias *atab[ATABSIZE];
 static int aliases;
 
-STATIC void setalias(const char *, const char *);
-STATIC int unalias(const char *);
-STATIC struct alias **hashalias(const char *);
+static void setalias(const char *, const char *);
+static int unalias(const char *);
+static struct alias **hashalias(const char *);
 
-STATIC
+static
 void
 setalias(const char *name, const char *val)
 {
@@ -111,7 +111,7 @@ setalias(const char *name, const char *v
 	INTON;
 }
 
-STATIC int
+static int
 unalias(const char *name)
 {
 	struct alias *ap, **app;
@@ -191,7 +191,7 @@ lookupalias(const char *name, int check)
 	return (NULL);
 }
 
-STATIC int
+static int
 comparealiases(const void *p1, const void *p2)
 {
 	const struct alias *const *a1 = p1;
@@ -200,7 +200,7 @@ comparealiases(const void *p1, const voi
 	return strcmp((*a1)->name, (*a2)->name);
 }
 
-STATIC void
+static void
 printalias(const struct alias *a)
 {
 	char *p;
@@ -214,7 +214,7 @@ printalias(const struct alias *a)
 	out1c('\n');
 }
 
-STATIC void
+static void
 printaliases(void)
 {
 	int i, j;
@@ -276,7 +276,7 @@ unaliascmd(int argc __unused, char **arg
 	return (i);
 }
 
-STATIC struct alias **
+static struct alias **
 hashalias(const char *p)
 {
 	unsigned int hashval;

Modified: head/bin/sh/cd.c
==============================================================================
--- head/bin/sh/cd.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/cd.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -64,14 +64,14 @@ __FBSDID("$FreeBSD$");
 #include "show.h"
 #include "cd.h"
 
-STATIC int cdlogical(char *);
-STATIC int cdphysical(char *);
-STATIC int docd(char *, int, int);
-STATIC char *getcomponent(void);
-STATIC char *findcwd(char *);
-STATIC void updatepwd(char *);
-STATIC char *getpwd(void);
-STATIC char *getpwd2(void);
+static int cdlogical(char *);
+static int cdphysical(char *);
+static int docd(char *, int, int);
+static char *getcomponent(void);
+static char *findcwd(char *);
+static void updatepwd(char *);
+static char *getpwd(void);
+static char *getpwd2(void);
 
 static char *curdir = NULL;	/* current working directory */
 static char *prevdir;		/* previous working directory */
@@ -145,7 +145,7 @@ cdcmd(int argc, char **argv)
  * Actually change the directory.  In an interactive shell, print the
  * directory name if "print" is nonzero.
  */
-STATIC int
+static int
 docd(char *dest, int print, int phys)
 {
 
@@ -161,7 +161,7 @@ docd(char *dest, int print, int phys)
 	return 0;
 }
 
-STATIC int
+static int
 cdlogical(char *dest)
 {
 	char *p;
@@ -213,7 +213,7 @@ cdlogical(char *dest)
 	return (0);
 }
 
-STATIC int
+static int
 cdphysical(char *dest)
 {
 	char *p;
@@ -232,7 +232,7 @@ cdphysical(char *dest)
  * Get the next component of the path name pointed to by cdcomppath.
  * This routine overwrites the string pointed to by cdcomppath.
  */
-STATIC char *
+static char *
 getcomponent(void)
 {
 	char *p;
@@ -253,7 +253,7 @@ getcomponent(void)
 }
 
 
-STATIC char *
+static char *
 findcwd(char *dir)
 {
 	char *new;
@@ -296,7 +296,7 @@ findcwd(char *dir)
  * cd command.  We also call hashcd to let the routines in exec.c know
  * that the current directory has changed.
  */
-STATIC void
+static void
 updatepwd(char *dir)
 {
 	hashcd();				/* update command hash table */
@@ -352,7 +352,7 @@ pwdcmd(int argc, char **argv)
 /*
  * Get the current directory and cache the result in curdir.
  */
-STATIC char *
+static char *
 getpwd(void)
 {
 	char *p;
@@ -372,7 +372,7 @@ getpwd(void)
 /*
  * Return the current directory.
  */
-STATIC char *
+static char *
 getpwd2(void)
 {
 	char *pwd;

Modified: head/bin/sh/error.c
==============================================================================
--- head/bin/sh/error.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/error.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -67,7 +67,7 @@ volatile sig_atomic_t intpending;
 char *commandname;
 
 
-STATIC void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;
+static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;
 
 /*
  * Called to raise an exception.  Since C doesn't include exceptions, we
@@ -139,7 +139,7 @@ onint(void)
  * is not NULL then error prints an error message using printf style
  * formatting.  It then raises the error exception.
  */
-STATIC void
+static void
 exverror(int cond, const char *msg, va_list ap)
 {
 	/*

Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/eval.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -87,15 +87,15 @@ int exitstatus;			/* exit status of last
 int oexitstatus;		/* saved exit status */
 
 
-STATIC void evalloop(union node *, int);
-STATIC void evalfor(union node *, int);
-STATIC void evalcase(union node *, int);
-STATIC void evalsubshell(union node *, int);
-STATIC void evalredir(union node *, int);
-STATIC void expredir(union node *);
-STATIC void evalpipe(union node *);
-STATIC void evalcommand(union node *, int, struct backcmd *);
-STATIC void prehash(union node *);
+static void evalloop(union node *, int);
+static void evalfor(union node *, int);
+static void evalcase(union node *, int);
+static void evalsubshell(union node *, int);
+static void evalredir(union node *, int);
+static void expredir(union node *);
+static void evalpipe(union node *);
+static void evalcommand(union node *, int, struct backcmd *);
+static void prehash(union node *);
 
 
 /*
@@ -289,7 +289,7 @@ out:
 }
 
 
-STATIC void
+static void
 evalloop(union node *n, int flags)
 {
 	int status;
@@ -327,7 +327,7 @@ skipping:	  if (evalskip == SKIPCONT && 
 
 
 
-STATIC void
+static void
 evalfor(union node *n, int flags)
 {
 	struct arglist arglist;
@@ -367,7 +367,7 @@ out:
 
 
 
-STATIC void
+static void
 evalcase(union node *n, int flags)
 {
 	union node *cp;
@@ -400,7 +400,7 @@ out:
  * Kick off a subshell to evaluate a tree.
  */
 
-STATIC void
+static void
 evalsubshell(union node *n, int flags)
 {
 	struct job *jp;
@@ -425,7 +425,7 @@ evalsubshell(union node *n, int flags)
  * Evaluate a redirected compound command.
  */
 
-STATIC void
+static void
 evalredir(union node *n, int flags)
 {
 	struct jmploc jmploc;
@@ -466,7 +466,7 @@ evalredir(union node *n, int flags)
  * Compute the names of the files in a redirection list.
  */
 
-STATIC void
+static void
 expredir(union node *n)
 {
 	union node *redir;
@@ -504,7 +504,7 @@ expredir(union node *n)
  * of all the rest.)
  */
 
-STATIC void
+static void
 evalpipe(union node *n)
 {
 	struct job *jp;
@@ -617,7 +617,7 @@ out:
  * Execute a simple command.
  */
 
-STATIC void
+static void
 evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
 {
 	struct stackmark smark;
@@ -1028,7 +1028,7 @@ out:
  * check that the name will not be subject to expansion.
  */
 
-STATIC void
+static void
 prehash(union node *n)
 {
 	struct cmdentry entry;

Modified: head/bin/sh/exec.c
==============================================================================
--- head/bin/sh/exec.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/exec.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -96,10 +96,10 @@ static int builtinloc = -1;		/* index in
 int exerrno = 0;			/* Last exec error */
 
 
-STATIC void tryexec(char *, char **, char **);
-STATIC void printentry(struct tblentry *, int);
-STATIC struct tblentry *cmdlookup(const char *, int);
-STATIC void delete_cmd_entry(void);
+static void tryexec(char *, char **, char **);
+static void printentry(struct tblentry *, int);
+static struct tblentry *cmdlookup(const char *, int);
+static void delete_cmd_entry(void);
 
 
 
@@ -147,7 +147,7 @@ shellexec(char **argv, char **envp, cons
 }
 
 
-STATIC void
+static void
 tryexec(char *cmd, char **argv, char **envp)
 {
 	int e;
@@ -265,7 +265,7 @@ hashcmd(int argc __unused, char **argv _
 }
 
 
-STATIC void
+static void
 printentry(struct tblentry *cmdp, int verbose)
 {
 	int idx;
@@ -618,7 +618,7 @@ deletefuncs(void)
 static struct tblentry **lastcmdentry;
 
 
-STATIC struct tblentry *
+static struct tblentry *
 cmdlookup(const char *name, int add)
 {
 	int hashval;
@@ -655,7 +655,7 @@ cmdlookup(const char *name, int add)
  * Delete the command entry returned on the last lookup.
  */
 
-STATIC void
+static void
 delete_cmd_entry(void)
 {
 	struct tblentry *cmdp;

Modified: head/bin/sh/expand.c
==============================================================================
--- head/bin/sh/expand.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/expand.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -95,25 +95,25 @@ static struct ifsregion ifsfirst;	/* fir
 static struct ifsregion *ifslastp;	/* last struct in list */
 static struct arglist exparg;		/* holds expanded arg list */
 
-STATIC void argstr(char *, int);
-STATIC char *exptilde(char *, int);
-STATIC void expbackq(union node *, int, int);
-STATIC int subevalvar(char *, char *, int, int, int, int);
-STATIC char *evalvar(char *, int);
-STATIC int varisset(char *, int);
-STATIC void varvalue(char *, int, int, int);
-STATIC void recordregion(int, int, int);
-STATIC void removerecordregions(int);
-STATIC void ifsbreakup(char *, struct arglist *);
-STATIC void expandmeta(struct strlist *, int);
-STATIC void expmeta(char *, char *);
-STATIC void addfname(char *);
-STATIC struct strlist *expsort(struct strlist *);
-STATIC struct strlist *msort(struct strlist *, int);
-STATIC char *cvtnum(int, char *);
-STATIC int collate_range_cmp(int, int);
+static void argstr(char *, int);
+static char *exptilde(char *, int);
+static void expbackq(union node *, int, int);
+static int subevalvar(char *, char *, int, int, int, int);
+static char *evalvar(char *, int);
+static int varisset(char *, int);
+static void varvalue(char *, int, int, int);
+static void recordregion(int, int, int);
+static void removerecordregions(int);
+static void ifsbreakup(char *, struct arglist *);
+static void expandmeta(struct strlist *, int);
+static void expmeta(char *, char *);
+static void addfname(char *);
+static struct strlist *expsort(struct strlist *);
+static struct strlist *msort(struct strlist *, int);
+static char *cvtnum(int, char *);
+static int collate_range_cmp(int, int);
 
-STATIC int
+static int
 collate_range_cmp(int c1, int c2)
 {
 	static char s1[2], s2[2];
@@ -210,7 +210,7 @@ expandarg(union node *arg, struct arglis
  * characters to allow for further processing.
  * If EXP_FULL is set, also preserve CTLQUOTEMARK characters.
  */
-STATIC void
+static void
 argstr(char *p, int flag)
 {
 	char c;
@@ -276,7 +276,7 @@ breakloop:;
  * Perform tilde expansion, placing the result in the stack string and
  * returning the next position in the input string to process.
  */
-STATIC char *
+static char *
 exptilde(char *p, int flag)
 {
 	char c, *startp = p;
@@ -329,7 +329,7 @@ lose:
 }
 
 
-STATIC void
+static void
 removerecordregions(int endoff)
 {
 	if (ifslastp == NULL)
@@ -428,7 +428,7 @@ expari(int flag)
 /*
  * Perform command substitution.
  */
-STATIC void
+static void
 expbackq(union node *cmd, int quoted, int flag)
 {
 	struct backcmd in;
@@ -508,7 +508,7 @@ expbackq(union node *cmd, int quoted, in
 
 
 
-STATIC int
+static int
 subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
   int varflags)
 {
@@ -636,7 +636,7 @@ recordleft:
  * input string.
  */
 
-STATIC char *
+static char *
 evalvar(char *p, int flag)
 {
 	int subtype;
@@ -824,7 +824,7 @@ record:
  * Test whether a specialized variable is set.
  */
 
-STATIC int
+static int
 varisset(char *name, int nulok)
 {
 
@@ -866,7 +866,7 @@ varisset(char *name, int nulok)
  * Add the value of a specialized variable to the stack string.
  */
 
-STATIC void
+static void
 varvalue(char *name, int quoted, int subtype, int flag)
 {
 	int num;
@@ -956,7 +956,7 @@ numvar:
  * string for IFS characters.
  */
 
-STATIC void
+static void
 recordregion(int start, int end, int inquotes)
 {
 	struct ifsregion *ifsp;
@@ -993,7 +993,7 @@ recordregion(int start, int end, int inq
  * This pass treats them as a regular character, making the string non-empty.
  * Later, they are removed along with the other CTL* characters.
  */
-STATIC void
+static void
 ifsbreakup(char *string, struct arglist *arglist)
 {
 	struct ifsregion *ifsp;
@@ -1101,7 +1101,7 @@ static char expdir[PATH_MAX];
  * At this point, the only control characters should be CTLESC and CTLQUOTEMARK.
  * The results are stored in the list exparg.
  */
-STATIC void
+static void
 expandmeta(struct strlist *str, int flag __unused)
 {
 	char *p;
@@ -1148,7 +1148,7 @@ nometa:
  * Do metacharacter (i.e. *, ?, [...]) expansion.
  */
 
-STATIC void
+static void
 expmeta(char *enddir, char *name)
 {
 	char *p;
@@ -1284,7 +1284,7 @@ expmeta(char *enddir, char *name)
  * Add a file name to the list.
  */
 
-STATIC void
+static void
 addfname(char *name)
 {
 	char *p;
@@ -1305,7 +1305,7 @@ addfname(char *name)
  * work.
  */
 
-STATIC struct strlist *
+static struct strlist *
 expsort(struct strlist *str)
 {
 	int len;
@@ -1318,7 +1318,7 @@ expsort(struct strlist *str)
 }
 
 
-STATIC struct strlist *
+static struct strlist *
 msort(struct strlist *list, int len)
 {
 	struct strlist *p, *q = NULL;
@@ -1541,7 +1541,7 @@ casematch(union node *pattern, const cha
  * Our own itoa().
  */
 
-STATIC char *
+static char *
 cvtnum(int num, char *buf)
 {
 	char temp[32];

Modified: head/bin/sh/histedit.c
==============================================================================
--- head/bin/sh/histedit.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/histedit.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -68,7 +68,7 @@ EditLine *el;	/* editline cookie */
 int displayhist;
 static FILE *el_in, *el_out, *el_err;
 
-STATIC char *fc_replace(const char *, char *, char *);
+static char *fc_replace(const char *, char *, char *);
 
 /*
  * Set history and editing status.  Called whenever the status may
@@ -402,7 +402,7 @@ histcmd(int argc, char **argv)
 	return 0;
 }
 
-STATIC char *
+static char *
 fc_replace(const char *s, char *p, char *r)
 {
 	char *dest;

Modified: head/bin/sh/input.c
==============================================================================
--- head/bin/sh/input.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/input.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -104,8 +104,8 @@ int whichprompt;		/* 1 == PS1, 2 == PS2 
 
 EditLine *el;			/* cookie for editline package */
 
-STATIC void pushfile(void);
-STATIC int preadfd(void);
+static void pushfile(void);
+static int preadfd(void);
 
 #ifdef mkinit
 INCLUDE "input.h"
@@ -169,7 +169,7 @@ pgetc(void)
 }
 
 
-STATIC int
+static int
 preadfd(void)
 {
 	int nr;
@@ -468,7 +468,7 @@ setinputstring(char *string, int push)
  * adds a new entry to the stack and popfile restores the previous level.
  */
 
-STATIC void
+static void
 pushfile(void)
 {
 	struct parsefile *pf;

Modified: head/bin/sh/jobs.c
==============================================================================
--- head/bin/sh/jobs.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/jobs.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -86,21 +86,21 @@ volatile sig_atomic_t breakwaitcmd = 0;	
 static int ttyfd = -1;
 
 #if JOBS
-STATIC void restartjob(struct job *);
+static void restartjob(struct job *);
 #endif
-STATIC void freejob(struct job *);
-STATIC struct job *getjob(char *);
-STATIC pid_t dowait(int, struct job *);
-STATIC pid_t waitproc(int, int *);
-STATIC void checkzombies(void);
-STATIC void cmdtxt(union node *);
-STATIC void cmdputs(const char *);
-#if JOBS
-STATIC void setcurjob(struct job *);
-STATIC void deljob(struct job *);
-STATIC struct job *getcurjob(struct job *);
+static void freejob(struct job *);
+static struct job *getjob(char *);
+static pid_t dowait(int, struct job *);
+static pid_t waitproc(int, int *);
+static void checkzombies(void);
+static void cmdtxt(union node *);
+static void cmdputs(const char *);
+#if JOBS
+static void setcurjob(struct job *);
+static void deljob(struct job *);
+static struct job *getcurjob(struct job *);
 #endif
-STATIC void showjob(struct job *, pid_t, int);
+static void showjob(struct job *, pid_t, int);
 
 
 /*
@@ -242,7 +242,7 @@ bgcmd(int argc, char **argv)
 }
 
 
-STATIC void
+static void
 restartjob(struct job *jp)
 {
 	struct procstat *ps;
@@ -301,7 +301,7 @@ jobscmd(int argc, char *argv[])
 	return (0);
 }
 
-STATIC void
+static void
 showjob(struct job *jp, pid_t pid, int mode)
 {
 	char s[64];
@@ -430,7 +430,7 @@ showjobs(int change, int mode)
  * Mark a job structure as unused.
  */
 
-STATIC void
+static void
 freejob(struct job *jp)
 {
 	struct procstat *ps;
@@ -543,7 +543,7 @@ jobidcmd(int argc __unused, char **argv)
  * Convert a job name to a job structure.
  */
 
-STATIC struct job *
+static struct job *
 getjob(char *name)
 {
 	int jobno;
@@ -686,7 +686,7 @@ makejob(union node *node __unused, int n
 }
 
 #if JOBS
-STATIC void
+static void
 setcurjob(struct job *cj)
 {
 	struct job *jp, *prev;
@@ -706,7 +706,7 @@ setcurjob(struct job *cj)
 	jobmru = cj;
 }
 
-STATIC void
+static void
 deljob(struct job *j)
 {
 	struct job *jp, *prev;
@@ -726,7 +726,7 @@ deljob(struct job *j)
  * Return the most recently used job that isn't `nj', and preferably one
  * that is stopped.
  */
-STATIC struct job *
+static struct job *
 getcurjob(struct job *nj)
 {
 	struct job *jp;
@@ -950,7 +950,7 @@ waitforjob(struct job *jp, int *origstat
  * Wait for a process to terminate.
  */
 
-STATIC pid_t
+static pid_t
 dowait(int block, struct job *job)
 {
 	pid_t pid;
@@ -1061,7 +1061,7 @@ dowait(int block, struct job *job)
  * stopped processes.  If block is zero, we return a value of zero
  * rather than blocking.
  */
-STATIC pid_t
+static pid_t
 waitproc(int block, int *status)
 {
 	int flags;
@@ -1102,7 +1102,7 @@ stoppedjobs(void)
 }
 
 
-STATIC void
+static void
 checkzombies(void)
 {
 	while (njobs > 0 && dowait(0, NULL) > 0)
@@ -1147,7 +1147,7 @@ commandtext(union node *n)
 }
 
 
-STATIC void
+static void
 cmdtxt(union node *n)
 {
 	union node *np;
@@ -1280,7 +1280,7 @@ redir:
 
 
 
-STATIC void
+static void
 cmdputs(const char *s)
 {
 	const char *p;

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/main.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -77,8 +77,8 @@ int rootpid;
 int rootshell;
 struct jmploc main_handler;
 
-STATIC void read_profile(const char *);
-STATIC char *find_dot_file(char *);
+static void read_profile(const char *);
+static char *find_dot_file(char *);
 
 /*
  * Main routine.  We initialize things, parse the arguments, execute
@@ -247,7 +247,7 @@ cmdloop(int top)
  * Read /etc/profile or .profile.  Return on error.
  */
 
-STATIC void
+static void
 read_profile(const char *name)
 {
 	int fd;
@@ -291,7 +291,7 @@ readcmdfile(const char *name)
  */
 
 
-STATIC char *
+static char *
 find_dot_file(char *basename)
 {
 	static char localname[FILENAME_MAX+1];

Modified: head/bin/sh/memalloc.c
==============================================================================
--- head/bin/sh/memalloc.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/memalloc.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -131,7 +131,7 @@ int sstrnleft;
 int herefd = -1;
 
 
-STATIC void
+static void
 stnewblock(int nbytes)
 {
 	struct stack_block *sp;

Modified: head/bin/sh/nodes.c.pat
==============================================================================
--- head/bin/sh/nodes.c.pat	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/nodes.c.pat	Wed Oct 13 22:18:03 2010	(r213811)
@@ -46,19 +46,19 @@
 #include "mystring.h"
 
 
-STATIC int     funcblocksize;	/* size of structures in function */
-STATIC int     funcstringsize;	/* size of strings in node */
-STATIC pointer funcblock;	/* block to allocate function from */
-STATIC char   *funcstring;	/* block to allocate strings from */
+static int     funcblocksize;	/* size of structures in function */
+static int     funcstringsize;	/* size of strings in node */
+static pointer funcblock;	/* block to allocate function from */
+static char   *funcstring;	/* block to allocate strings from */
 
 %SIZES
 
 
-STATIC void calcsize(union node *);
-STATIC void sizenodelist(struct nodelist *);
-STATIC union node *copynode(union node *);
-STATIC struct nodelist *copynodelist(struct nodelist *);
-STATIC char *nodesavestr(char *);
+static void calcsize(union node *);
+static void sizenodelist(struct nodelist *);
+static union node *copynode(union node *);
+static struct nodelist *copynodelist(struct nodelist *);
+static char *nodesavestr(char *);
 
 
 struct funcdef {
@@ -96,7 +96,7 @@ getfuncnode(struct funcdef *fn)
 }
 
 
-STATIC void
+static void
 calcsize(union node *n)
 {
 	%CALCSIZE
@@ -104,7 +104,7 @@ calcsize(union node *n)
 
 
 
-STATIC void
+static void
 sizenodelist(struct nodelist *lp)
 {
 	while (lp) {
@@ -116,7 +116,7 @@ sizenodelist(struct nodelist *lp)
 
 
 
-STATIC union node *
+static union node *
 copynode(union node *n)
 {
 	union node *new;
@@ -126,7 +126,7 @@ copynode(union node *n)
 }
 
 
-STATIC struct nodelist *
+static struct nodelist *
 copynodelist(struct nodelist *lp)
 {
 	struct nodelist *start;
@@ -146,7 +146,7 @@ copynodelist(struct nodelist *lp)
 
 
 
-STATIC char *
+static char *
 nodesavestr(char *s)
 {
 	char *p = s;

Modified: head/bin/sh/options.c
==============================================================================
--- head/bin/sh/options.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/options.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -69,10 +69,10 @@ char *nextopt_optptr;		/* used by nextop
 char *minusc;			/* argument to -c option */
 
 
-STATIC void options(int);
-STATIC void minus_o(char *, int);
-STATIC void setoption(int, int);
-STATIC int getopts(char *, char *, char **, char ***, char **);
+static void options(int);
+static void minus_o(char *, int);
+static void setoption(int, int);
+static int getopts(char *, char *, char **, char ***, char **);
 
 
 /*
@@ -138,7 +138,7 @@ optschanged(void)
  * to the argument list; we advance it past the options.
  */
 
-STATIC void
+static void
 options(int cmdline)
 {
 	char *kp, *p;
@@ -247,7 +247,7 @@ end_options2:
 	}
 }
 
-STATIC void
+static void
 minus_o(char *name, int val)
 {
 	int i;
@@ -284,7 +284,7 @@ minus_o(char *name, int val)
 }
 
 
-STATIC void
+static void
 setoption(int flag, int val)
 {
 	int i;
@@ -451,7 +451,7 @@ getoptscmd(int argc, char **argv)
 		       &shellparam.optptr);
 }
 
-STATIC int
+static int
 getopts(char *optstr, char *optvar, char **optfirst, char ***optnext,
     char **optptr)
 {

Modified: head/bin/sh/output.c
==============================================================================
--- head/bin/sh/output.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/output.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
 #define MEM_OUT -3		/* output to dynamically allocated memory */
 #define OUTPUT_ERR 01		/* error occurred on output */
 
-STATIC int doformat_wr(void *, const char *, int);
+static int doformat_wr(void *, const char *, int);
 
 struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
 struct output errout = {NULL, 0, NULL, 256, 2, 0};
@@ -281,7 +281,7 @@ fmtstr(char *outbuf, int length, const c
 		outbuf[length - 1] = '\0';
 }
 
-STATIC int
+static int
 doformat_wr(void *cookie, const char *buf, int len)
 {
 	struct output *o;

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Wed Oct 13 22:07:57 2010	(r213810)
+++ head/bin/sh/parser.c	Wed Oct 13 22:18:03 2010	(r213811)
@@ -105,25 +105,25 @@ static struct parser_temp *parser_temp;
 static int noaliases = 0;
 
 
-STATIC union node *list(int);
-STATIC union node *andor(void);
-STATIC union node *pipeline(void);
-STATIC union node *command(void);
-STATIC union node *simplecmd(union node **, union node *);
-STATIC union node *makename(void);
-STATIC void parsefname(void);
-STATIC void parseheredoc(void);
-STATIC int peektoken(void);
-STATIC int readtoken(void);
-STATIC int xxreadtoken(void);
-STATIC int readtoken1(int, char const *, char *, int);
-STATIC int noexpand(char *);
-STATIC void synexpect(int) __dead2;
-STATIC void synerror(const char *) __dead2;
-STATIC void setprompt(int);
+static union node *list(int);
+static union node *andor(void);
+static union node *pipeline(void);
+static union node *command(void);
+static union node *simplecmd(union node **, union node *);
+static union node *makename(void);
+static void parsefname(void);
+static void parseheredoc(void);
+static int peektoken(void);
+static int readtoken(void);
+static int xxreadtoken(void);
+static int readtoken1(int, char const *, char *, int);
+static int noexpand(char *);
+static void synexpect(int) __dead2;
+static void synerror(const char *) __dead2;
+static void setprompt(int);
 
 
-STATIC void *
+static void *
 parser_temp_alloc(size_t len)
 {
 	struct parser_temp *t;
@@ -139,7 +139,7 @@ parser_temp_alloc(size_t len)
 }
 
 
-STATIC void *
+static void *
 parser_temp_realloc(void *ptr, size_t len)
 {
 	struct parser_temp *t;
@@ -154,7 +154,7 @@ parser_temp_realloc(void *ptr, size_t le
 }
 
 
-STATIC void
+static void
 parser_temp_free_upto(void *ptr)
 {
 	struct parser_temp *t;
@@ -174,7 +174,7 @@ parser_temp_free_upto(void *ptr)
 }
 
 
-STATIC void
+static void
 parser_temp_free_all(void)
 {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-head mailing list