From owner-svn-src-stable@FreeBSD.ORG Wed Oct 20 18:25:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2C50106566B; Wed, 20 Oct 2010 18:25:00 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4938FC13; Wed, 20 Oct 2010 18:25:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9KIP0r9065265; Wed, 20 Oct 2010 18:25:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9KIP0dW065248; Wed, 20 Oct 2010 18:25:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201010201825.o9KIP0dW065248@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 20 Oct 2010 18:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214113 - stable/8/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2010 18:25:00 -0000 Author: obrien Date: Wed Oct 20 18:25:00 2010 New Revision: 214113 URL: http://svn.freebsd.org/changeset/base/214113 Log: MFC r213811: c89 linkage and storage class (also covers r213744, r213760) Modified: stable/8/bin/sh/alias.c stable/8/bin/sh/cd.c stable/8/bin/sh/eval.c stable/8/bin/sh/exec.c stable/8/bin/sh/expand.c stable/8/bin/sh/histedit.c stable/8/bin/sh/input.c stable/8/bin/sh/jobs.c stable/8/bin/sh/mail.c stable/8/bin/sh/main.c stable/8/bin/sh/memalloc.c stable/8/bin/sh/nodes.c.pat stable/8/bin/sh/options.c stable/8/bin/sh/output.c stable/8/bin/sh/parser.c stable/8/bin/sh/redir.c stable/8/bin/sh/shell.h stable/8/bin/sh/show.c stable/8/bin/sh/var.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/alias.c ============================================================================== --- stable/8/bin/sh/alias.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/alias.c Wed Oct 20 18:25:00 2010 (r214113) @@ -49,14 +49,14 @@ __FBSDID("$FreeBSD$"); #define ATABSIZE 39 -STATIC struct alias *atab[ATABSIZE]; -STATIC int aliases; +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; @@ -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: stable/8/bin/sh/cd.c ============================================================================== --- stable/8/bin/sh/cd.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/cd.c Wed Oct 20 18:25:00 2010 (r214113) @@ -64,17 +64,17 @@ __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 *getpwd2(void); - -STATIC char *curdir = NULL; /* current working directory */ -STATIC char *prevdir; /* previous working directory */ -STATIC char *cdcomppath; +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 *getpwd2(void); + +static char *curdir = NULL; /* current working directory */ +static char *prevdir; /* previous working directory */ +static char *cdcomppath; int cdcmd(int argc, char **argv) @@ -144,7 +144,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) { @@ -160,7 +160,7 @@ docd(char *dest, int print, int phys) return 0; } -STATIC int +static int cdlogical(char *dest) { char *p; @@ -212,7 +212,7 @@ cdlogical(char *dest) return (0); } -STATIC int +static int cdphysical(char *dest) { char *p; @@ -231,7 +231,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; @@ -252,7 +252,7 @@ getcomponent(void) } -STATIC char * +static char * findcwd(char *dir) { char *new; @@ -295,7 +295,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 */ @@ -371,7 +371,7 @@ getpwd(void) /* * Return the current directory. */ -STATIC char * +static char * getpwd2(void) { struct stat stdot, stpwd; Modified: stable/8/bin/sh/eval.c ============================================================================== --- stable/8/bin/sh/eval.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/eval.c Wed Oct 20 18:25:00 2010 (r214113) @@ -75,10 +75,10 @@ __FBSDID("$FreeBSD$"); int evalskip; /* set if we are skipping commands */ -STATIC int skipcount; /* number of levels to skip */ +static int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ int funcnest; /* depth of function calls */ -STATIC int builtin_flags; /* evalcommand flags for builtins */ +static int builtin_flags; /* evalcommand flags for builtins */ char *commandname; @@ -87,14 +87,14 @@ 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 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 expredir(union node *); +static void evalpipe(union node *); +static void evalcommand(union node *, int, struct backcmd *); +static void prehash(union node *); /* @@ -285,7 +285,7 @@ out: } -STATIC void +static void evalloop(union node *n, int flags) { int status; @@ -321,7 +321,7 @@ skipping: if (evalskip == SKIPCONT && -STATIC void +static void evalfor(union node *n, int flags) { struct arglist arglist; @@ -361,7 +361,7 @@ out: -STATIC void +static void evalcase(union node *n, int flags) { union node *cp; @@ -394,7 +394,7 @@ out: * Kick off a subshell to evaluate a tree. */ -STATIC void +static void evalsubshell(union node *n, int flags) { struct job *jp; @@ -420,7 +420,7 @@ evalsubshell(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; @@ -458,7 +458,7 @@ expredir(union node *n) * of all the rest.) */ -STATIC void +static void evalpipe(union node *n) { struct job *jp; @@ -571,7 +571,7 @@ out: * Execute a simple command. */ -STATIC void +static void evalcommand(union node *cmd, int flags, struct backcmd *backcmd) { struct stackmark smark; @@ -926,7 +926,7 @@ out: * check that the name will not be subject to expansion. */ -STATIC void +static void prehash(union node *n) { struct cmdentry entry; Modified: stable/8/bin/sh/exec.c ============================================================================== --- stable/8/bin/sh/exec.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/exec.c Wed Oct 20 18:25:00 2010 (r214113) @@ -91,15 +91,15 @@ struct tblentry { }; -STATIC struct tblentry *cmdtable[CMDTABLESIZE]; -STATIC int builtinloc = -1; /* index in path of %builtin, or -1 */ +static struct tblentry *cmdtable[CMDTABLESIZE]; +static int builtinloc = -1; /* index in path of %builtin, or -1 */ 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; @@ -604,10 +604,10 @@ deletefuncs(void) * entry. */ -STATIC struct tblentry **lastcmdentry; +static struct tblentry **lastcmdentry; -STATIC struct tblentry * +static struct tblentry * cmdlookup(const char *name, int add) { int hashval; @@ -644,7 +644,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: stable/8/bin/sh/expand.c ============================================================================== --- stable/8/bin/sh/expand.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/expand.c Wed Oct 20 18:25:00 2010 (r214113) @@ -88,32 +88,32 @@ struct ifsregion { }; -STATIC char *expdest; /* output of current string */ -STATIC struct nodelist *argbackq; /* list of back quote expressions */ -STATIC struct ifsregion ifsfirst; /* first struct in list of ifs regions */ -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 int pmatch(const char *, const char *, int); -STATIC char *cvtnum(int, char *); -STATIC int collate_range_cmp(int, int); +static char *expdest; /* output of current string */ +static struct nodelist *argbackq; /* list of back quote expressions */ +static struct ifsregion ifsfirst; /* first struct in list of ifs regions */ +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 int pmatch(const char *, const char *, 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]; @@ -201,7 +201,7 @@ expandarg(union node *arg, struct arglis * $@ like $* since no splitting will be performed. */ -STATIC void +static void argstr(char *p, int flag) { char c; @@ -263,7 +263,7 @@ argstr(char *p, int flag) breakloop:; } -STATIC char * +static char * exptilde(char *p, int flag) { char c, *startp = p; @@ -311,7 +311,7 @@ lose: } -STATIC void +static void removerecordregions(int endoff) { if (ifslastp == NULL) @@ -410,7 +410,7 @@ expari(int flag) * Expand stuff in backwards quotes. */ -STATIC void +static void expbackq(union node *cmd, int quoted, int flag) { struct backcmd in; @@ -490,7 +490,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) { @@ -616,7 +616,7 @@ recordleft: * input string. */ -STATIC char * +static char * evalvar(char *p, int flag) { int subtype; @@ -804,7 +804,7 @@ record: * Test whether a specialized variable is set. */ -STATIC int +static int varisset(char *name, int nulok) { @@ -846,7 +846,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; @@ -936,7 +936,7 @@ numvar: * string for IFS characters. */ -STATIC void +static void recordregion(int start, int end, int inquotes) { struct ifsregion *ifsp; @@ -967,7 +967,7 @@ recordregion(int start, int end, int inq * strings to the argument list. The regions of the string to be * searched for IFS characters have been stored by recordregion. */ -STATIC void +static void ifsbreakup(char *string, struct arglist *arglist) { struct ifsregion *ifsp; @@ -1073,10 +1073,10 @@ ifsbreakup(char *string, struct arglist * should be escapes. The results are stored in the list exparg. */ -STATIC char expdir[PATH_MAX]; +static char expdir[PATH_MAX]; #define expdir_end (expdir + sizeof(expdir)) -STATIC void +static void expandmeta(struct strlist *str, int flag __unused) { char *p; @@ -1123,7 +1123,7 @@ nometa: * Do metacharacter (i.e. *, ?, [...]) expansion. */ -STATIC void +static void expmeta(char *enddir, char *name) { char *p; @@ -1261,7 +1261,7 @@ expmeta(char *enddir, char *name) * Add a file name to the list. */ -STATIC void +static void addfname(char *name) { char *p; @@ -1282,7 +1282,7 @@ addfname(char *name) * work. */ -STATIC struct strlist * +static struct strlist * expsort(struct strlist *str) { int len; @@ -1295,7 +1295,7 @@ expsort(struct strlist *str) } -STATIC struct strlist * +static struct strlist * msort(struct strlist *list, int len) { struct strlist *p, *q = NULL; @@ -1353,7 +1353,7 @@ patmatch(const char *pattern, const char } -STATIC int +static int pmatch(const char *pattern, const char *string, int squoted) { const char *p, *q; @@ -1530,7 +1530,7 @@ casematch(union node *pattern, const cha * Our own itoa(). */ -STATIC char * +static char * cvtnum(int num, char *buf) { char temp[32]; Modified: stable/8/bin/sh/histedit.c ============================================================================== --- stable/8/bin/sh/histedit.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/histedit.c Wed Oct 20 18:25:00 2010 (r214113) @@ -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 @@ -383,7 +383,7 @@ histcmd(int argc, char **argv) return 0; } -STATIC char * +static char * fc_replace(const char *s, char *p, char *r) { char *dest; Modified: stable/8/bin/sh/input.c ============================================================================== --- stable/8/bin/sh/input.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/input.c Wed Oct 20 18:25:00 2010 (r214113) @@ -98,13 +98,13 @@ MKINIT int parselleft; /* copy of parse char *parsenextc; /* copy of parsefile->nextc */ MKINIT struct parsefile basepf; /* top level input file */ char basebuf[BUFSIZ]; /* buffer for top level input file */ -STATIC struct parsefile *parsefile = &basepf; /* current input file */ +static struct parsefile *parsefile = &basepf; /* current input file */ int init_editline = 0; /* editline library initialized? */ int whichprompt; /* 1 == PS1, 2 == PS2 */ EditLine *el; /* cookie for editline package */ -STATIC void pushfile(void); +static void pushfile(void); static int preadfd(void); #ifdef mkinit @@ -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: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/jobs.c Wed Oct 20 18:25:00 2010 (r214113) @@ -72,12 +72,12 @@ __FBSDID("$FreeBSD$"); #include "mystring.h" -STATIC struct job *jobtab; /* array of jobs */ -STATIC int njobs; /* size of array */ +static struct job *jobtab; /* array of jobs */ +static int njobs; /* size of array */ MKINIT pid_t backgndpid = -1; /* pid of last background process */ #if JOBS -STATIC struct job *jobmru; /* most recently used job list */ -STATIC pid_t initialpgrp; /* pgrp of shell on invocation */ +static struct job *jobmru; /* most recently used job list */ +static pid_t initialpgrp; /* pgrp of shell on invocation */ #endif int in_waitcmd = 0; /* are we in waitcmd()? */ int in_dowait = 0; /* are we in dowait()? */ @@ -85,20 +85,20 @@ 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 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 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); /* @@ -239,7 +239,7 @@ bgcmd(int argc, char **argv) } -STATIC void +static void restartjob(struct job *jp) { struct procstat *ps; @@ -298,7 +298,7 @@ jobscmd(int argc, char *argv[]) return (0); } -STATIC void +static void showjob(struct job *jp, pid_t pid, int mode) { char s[64]; @@ -423,7 +423,7 @@ showjobs(int change, int mode) * Mark a job structure as unused. */ -STATIC void +static void freejob(struct job *jp) { struct procstat *ps; @@ -519,7 +519,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; @@ -659,7 +659,7 @@ makejob(union node *node __unused, int n } #if JOBS -STATIC void +static void setcurjob(struct job *cj) { struct job *jp, *prev; @@ -679,7 +679,7 @@ setcurjob(struct job *cj) jobmru = cj; } -STATIC void +static void deljob(struct job *j) { struct job *jp, *prev; @@ -699,7 +699,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; @@ -915,7 +915,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; @@ -1021,7 +1021,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; @@ -1066,8 +1066,8 @@ stoppedjobs(void) * jobs command. */ -STATIC char *cmdnextc; -STATIC int cmdnleft; +static char *cmdnextc; +static int cmdnleft; #define MAXCMDTEXT 200 char * @@ -1083,7 +1083,7 @@ commandtext(union node *n) } -STATIC void +static void cmdtxt(union node *n) { union node *np; @@ -1216,7 +1216,7 @@ redir: -STATIC void +static void cmdputs(const char *s) { const char *p; Modified: stable/8/bin/sh/mail.c ============================================================================== --- stable/8/bin/sh/mail.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/mail.c Wed Oct 20 18:25:00 2010 (r214113) @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$"); #define MAXMBOXES 10 -STATIC int nmboxes; /* number of mailboxes */ -STATIC time_t mailtime[MAXMBOXES]; /* times of mailboxes */ +static int nmboxes; /* number of mailboxes */ +static time_t mailtime[MAXMBOXES]; /* times of mailboxes */ Modified: stable/8/bin/sh/main.c ============================================================================== --- stable/8/bin/sh/main.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/main.c Wed Oct 20 18:25:00 2010 (r214113) @@ -76,8 +76,8 @@ __FBSDID("$FreeBSD$"); int rootpid; int rootshell; -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 @@ -249,7 +249,7 @@ cmdloop(int top) * Read /etc/profile or .profile. Return on error. */ -STATIC void +static void read_profile(const char *name) { int fd; @@ -293,7 +293,7 @@ readcmdfile(const char *name) */ -STATIC char * +static char * find_dot_file(char *basename) { static char localname[FILENAME_MAX+1]; Modified: stable/8/bin/sh/memalloc.c ============================================================================== --- stable/8/bin/sh/memalloc.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/memalloc.c Wed Oct 20 18:25:00 2010 (r214113) @@ -123,8 +123,8 @@ struct stack_block { }; #define SPACE(sp) ((char*)(sp) + ALIGN(sizeof(struct stack_block))) -STATIC struct stack_block *stackp; -STATIC struct stackmark *markp; +static struct stack_block *stackp; +static struct stackmark *markp; char *stacknxt; int stacknleft; int sstrnleft; Modified: stable/8/bin/sh/nodes.c.pat ============================================================================== --- stable/8/bin/sh/nodes.c.pat Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/nodes.c.pat Wed Oct 20 18:25:00 2010 (r214113) @@ -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: stable/8/bin/sh/options.c ============================================================================== --- stable/8/bin/sh/options.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/options.c Wed Oct 20 18:25:00 2010 (r214113) @@ -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 **); /* @@ -135,7 +135,7 @@ optschanged(void) * to the argument list; we advance it past the options. */ -STATIC void +static void options(int cmdline) { char *kp, *p; @@ -244,7 +244,7 @@ end_options2: } } -STATIC void +static void minus_o(char *name, int val) { int i; @@ -281,7 +281,7 @@ minus_o(char *name, int val) } -STATIC void +static void setoption(int flag, int val) { int i; @@ -448,7 +448,7 @@ getoptscmd(int argc, char **argv) &shellparam.optptr); } -STATIC int +static int getopts(char *optstr, char *optvar, char **optfirst, char ***optnext, char **optptr) { Modified: stable/8/bin/sh/output.c ============================================================================== --- stable/8/bin/sh/output.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/output.c Wed Oct 20 18:25:00 2010 (r214113) @@ -167,7 +167,7 @@ outqstr(const char *p, struct output *fi outc('\'', file); } -STATIC char out_junk[16]; +static char out_junk[16]; void emptyoutbuf(struct output *dest) Modified: stable/8/bin/sh/parser.c ============================================================================== --- stable/8/bin/sh/parser.c Wed Oct 20 17:58:12 2010 (r214112) +++ stable/8/bin/sh/parser.c Wed Oct 20 18:25:00 2010 (r214113) @@ -82,41 +82,41 @@ struct heredoc { -STATIC struct heredoc *heredoclist; /* list of here documents to read */ -STATIC int parsebackquote; /* nonzero if we are inside backquotes */ -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 */ +static struct heredoc *heredoclist; /* list of here documents to read */ +static int parsebackquote; /* nonzero if we are inside backquotes */ +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 */ -STATIC char *wordtext; /* text of last word returned by readtoken */ +static char *wordtext; /* text of last word returned by readtoken */ MKINIT int checkkwd; /* 1 == check for kwds, 2 == also eat newlines */ -STATIC struct nodelist *backquotelist; -STATIC union node *redirnode; -STATIC struct heredoc *heredoc; -STATIC int quoteflag; /* set if (part of) last token was quoted */ -STATIC int startlinno; /* line # where last token started */ -STATIC int funclinno; /* line # where the current function started */ +static struct nodelist *backquotelist; +static union node *redirnode; +static struct heredoc *heredoc; +static int quoteflag; /* set if (part of) last token was quoted */ +static int startlinno; /* line # where last token started */ +static int funclinno; /* line # where the current function started */ /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ 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); -STATIC void synerror(const char *); -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); +static void synerror(const char *); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***