sh: Remove "LOCAL" define
authorAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 20:32:20 +0000 (21:32 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 20:32:20 +0000 (21:32 +0100)
Applications/V7/cmd/sh/args.c
Applications/V7/cmd/sh/cmd.c
Applications/V7/cmd/sh/expand.c
Applications/V7/cmd/sh/mac.h
Applications/V7/cmd/sh/macro.c
Applications/V7/cmd/sh/main.c
Applications/V7/cmd/sh/name.c
Applications/V7/cmd/sh/service.c
Applications/V7/cmd/sh/word.c
Applications/V7/cmd/sh/xec.c

index c92e551..04eb131 100644 (file)
@@ -13,8 +13,8 @@
 #include <stdlib.h>
 #include       "defs.h"
 
-LOCAL STRING *copyargs();
-LOCAL DOLPTR   dolh;
+static STRING *copyargs();
+static DOLPTR  dolh;
 
 CHAR   flagadr[10];
 
@@ -103,7 +103,7 @@ freeargs(blk)
        return(argr);
 }
 
-LOCAL STRING * copyargs(from, n)
+static STRING *        copyargs(from, n)
        STRING          from[];
 {
        REG STRING *    np=(STRING *)alloc(sizeof(STRING*)*n+3*BYTESPERWORD);
index d539b33..50d4162 100644 (file)
 #include       "defs.h"
 #include       "sym.h"
 
-LOCAL IOPTR    inout();
-LOCAL void     chkword();
-LOCAL void     chksym();
-LOCAL TREPTR   term();
-LOCAL TREPTR   makelist();
-LOCAL TREPTR   list();
-LOCAL REGPTR   syncase();
-LOCAL TREPTR   item();
-LOCAL int      skipnl();
-LOCAL void     prsym();
-LOCAL void     synbad();
+static IOPTR   inout();
+static void    chkword();
+static void    chksym();
+static TREPTR  term();
+static TREPTR  makelist();
+static TREPTR  list();
+static REGPTR  syncase();
+static TREPTR  item();
+static int     skipnl();
+static void    prsym();
+static void    synbad();
 
 
 /* ========    command line decoding   ========*/
@@ -44,7 +44,7 @@ TREPTR        makefork(flgs, i)
        return(TREPTR)(t);
 }
 
-LOCAL TREPTR   makelist(type,i,r)
+static TREPTR  makelist(type,i,r)
        INT             type;
        TREPTR          i, r;
 {
@@ -118,7 +118,7 @@ TREPTR      cmd(sym,flg)
  *     list || term
  */
 
-LOCAL TREPTR   list(flg)
+static TREPTR  list(flg)
 {
        REG TREPTR      r;
        REG INT         b;
@@ -136,7 +136,7 @@ LOCAL TREPTR        list(flg)
  *     item |^ term
  */
 
-LOCAL TREPTR   term(flg)
+static TREPTR  term(flg)
 {
        REG TREPTR      t;
 
@@ -152,7 +152,7 @@ LOCAL TREPTR        term(flg)
        FI
 }
 
-LOCAL REGPTR   syncase(esym)
+static REGPTR  syncase(esym)
        REG INT esym;
 {
        skipnl();
@@ -191,7 +191,7 @@ LOCAL REGPTR        syncase(esym)
  *     begin ... end
  */
 
-LOCAL TREPTR   item(flag)
+static TREPTR  item(flag)
        BOOL            flag;
 {
        REG TREPTR      t;
@@ -313,13 +313,13 @@ LOCAL TREPTR      item(flag)
 }
 
 
-LOCAL int      skipnl()
+static int     skipnl()
 {
        WHILE (reserv++, word()==NL) DO chkpr(NL) OD
        return(wdval);
 }
 
-LOCAL IOPTR    inout(lastio)
+static IOPTR   inout(lastio)
        IOPTR           lastio;
 {
        REG INT         iof;
@@ -365,14 +365,14 @@ LOCAL IOPTR       inout(lastio)
        return(iop);
 }
 
-LOCAL void     chkword()
+static void    chkword()
 {
        IF word()
        THEN    synbad();
        FI
 }
 
-LOCAL void     chksym(sym)
+static void    chksym(sym)
 {
        REG INT         x = sym&wdval;
        IF ((x&SYMFLG) ? x : sym) != wdval
@@ -380,7 +380,7 @@ LOCAL void  chksym(sym)
        FI
 }
 
-LOCAL void     prsym(sym)
+static void    prsym(sym)
 {
        IF sym&SYMFLG
        THEN    REG SYSPTR      sp=reserved;
@@ -398,7 +398,7 @@ LOCAL void  prsym(sym)
        FI
 }
 
-LOCAL void     synbad()
+static void    synbad()
 {
        prp(); prs(synmsg);
        IF (flags&ttyflg)==0
index 97fdcb5..5dfc3b1 100644 (file)
@@ -27,7 +27,7 @@
  *
  */
 
-LOCAL void     addg();
+static void    addg();
 
 
 INT    expand(as,rflg)
@@ -160,7 +160,7 @@ gmatch(s, p)
        ENDSW
 }
 
-LOCAL void     addg(as1,as2,as3)
+static void    addg(as1,as2,as3)
        STRING          as1, as2, as3;
 {
        REG STRING      s1, s2;
index 29e5b95..011009d 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#define LOCAL  static
 #define PROC   extern
 #define TYPE   typedef
 #define STRUCT TYPE struct
index 7f5eccf..1c8e4dd 100644 (file)
 #include       "defs.h"
 #include       "sym.h"
 
-LOCAL CHAR     quote;  /* used locally */
-LOCAL CHAR     quoted; /* used locally */
+static CHAR    quote;  /* used locally */
+static CHAR    quoted; /* used locally */
 
-LOCAL  getch();
-LOCAL  comsubst();
-LOCAL  flush();
+static getch();
+static comsubst();
+static flush();
 
 
-LOCAL STRING   copyto(endch)
+static STRING  copyto(endch)
        REG CHAR        endch;
 {
        REG CHAR        c;
@@ -32,7 +32,7 @@ LOCAL STRING  copyto(endch)
        IF c!=endch THEN error(badsub) FI
 }
 
-LOCAL  skipto(endch)
+static skipto(endch)
        REG CHAR        endch;
 {
        /* skip chars up to } */
@@ -52,7 +52,7 @@ LOCAL skipto(endch)
        IF c!=endch THEN error(badsub) FI
 }
 
-LOCAL  getch(endch)
+static getch(endch)
        CHAR            endch;
 {
        REG CHAR        d;
@@ -171,7 +171,7 @@ STRING      macro(as)
        return(fixstak());
 }
 
-LOCAL  comsubst()
+static comsubst()
 {
        /* command substn */
        FILEBLK         cb;
@@ -231,7 +231,7 @@ subst(in,ot)
        pop();
 }
 
-LOCAL  flush(ot)
+static flush(ot)
 {
        write(ot,stakbot,staktop-stakbot);
        IF flags&execpr THEN write(output,stakbot,staktop-stakbot) FI
index a1cd5e8..075d955 100644 (file)
 #include       <sys/stat.h>
 
 UFD            output = 2;
-LOCAL BOOL     beenhere = FALSE;
+static BOOL    beenhere = FALSE;
 CHAR           tmpout[20] = "/tmp/sh-";
 FILEBLK                stdfile;
 FILE           standin = &stdfile;
 
-LOCAL void     exfile();
+static void    exfile();
 
 
 
@@ -93,7 +93,7 @@ main(c, v)
        done();
 }
 
-LOCAL void     exfile(prof)
+static void    exfile(prof)
 BOOL           prof;
 {
        REG L_INT       mailtime = 0;
index 290d568..9e6fc50 100644 (file)
@@ -12,8 +12,8 @@
 
 #include       "defs.h"
 
-LOCAL BOOL     chkid();
-LOCAL void     namwalk();
+static BOOL    chkid();
+static void    namwalk();
 
 
 NAMNOD ps2nod  = {(NAMPTR)NIL, (NAMPTR)NIL,    ps2name},
@@ -202,7 +202,7 @@ NAMPTR              lookup(nam)
        return(*prev = nscan);
 }
 
-LOCAL BOOL     chkid(nam)
+static BOOL    chkid(nam)
        STRING          nam;
 {
        REG CHAR *      cp=nam;
@@ -218,7 +218,7 @@ LOCAL BOOL  chkid(nam)
        return(TRUE);
 }
 
-LOCAL void (*namfn)();
+static void (*namfn)();
 namscan(fn)
        void            (*fn)();
 {
@@ -226,7 +226,7 @@ namscan(fn)
        namwalk(namep);
 }
 
-LOCAL void     namwalk(np)
+static void    namwalk(np)
        REG NAMPTR      np;
 {
        IF np
@@ -249,7 +249,7 @@ void        printnam(n)
        FI
 }
 
-LOCAL STRING   staknam(n)
+static STRING  staknam(n)
        REG NAMPTR      n;
 {
        REG STRING      p;
@@ -293,7 +293,7 @@ void        sh_getenv(void)
        DO setname(*e++, N_ENVNAM) OD
 }
 
-LOCAL INT      namec;
+static INT     namec;
 
 void   countnam(n)
        NAMPTR          n;
@@ -301,7 +301,7 @@ void        countnam(n)
        namec++;
 }
 
-LOCAL STRING   *argnam;
+static STRING  *argnam;
 
 void   pushnam(n)
        NAMPTR          n;
index 2df4599..8f77a71 100644 (file)
@@ -13,9 +13,9 @@
 #include       "defs.h"
 
 
-LOCAL STRING   execs();
-LOCAL void     gsort();
-LOCAL INT      split();
+static STRING  execs();
+static void    gsort();
+static INT     split();
 
 #define ARGMK  01
 
@@ -111,8 +111,8 @@ STRING      catpath(path,name)
        return(path);
 }
 
-LOCAL STRING   xecmsg;
-LOCAL STRING   *xecenv;
+static STRING  xecmsg;
+static STRING  *xecenv;
 
 void   execa(at)
        STRING          at[];
@@ -129,7 +129,7 @@ void        execa(at)
        FI
 }
 
-LOCAL STRING   execs(ap,t)
+static STRING  execs(ap,t)
        STRING          ap;
        REG STRING      t[];
 {
@@ -172,8 +172,8 @@ LOCAL STRING        execs(ap,t)
 
 /* for processes to be waited for */
 #define MAXP 20
-LOCAL INT      pwlist[MAXP];
-LOCAL INT      pwc;
+static INT     pwlist[MAXP];
+static INT     pwc;
 
 postclr()
 {
@@ -299,7 +299,7 @@ STRING      *scan(argn)
        return(comargn);
 }
 
-LOCAL void     gsort(from,to)
+static void    gsort(from,to)
        STRING          from[], to[];
 {
        INT             k, m, n;
@@ -342,7 +342,7 @@ INT getarg(ac)
        return(count);
 }
 
-LOCAL INT      split(s)
+static INT     split(s)
        REG STRING      s;
 {
        REG STRING      argp;
index 294bcaa..2cc10f7 100644 (file)
@@ -13,7 +13,7 @@
 #include       "defs.h"
 #include       "sym.h"
 
-LOCAL  readb();
+static readb();
 
 
 /* ========    character handling for command lines    ========*/
@@ -118,7 +118,7 @@ retry:
        return(c);
 }
 
-LOCAL  readb()
+static readb()
 {
        REG FILE        f=standin;
        REG INT         len;
index 3db942f..d6e6802 100644 (file)
@@ -13,7 +13,7 @@
 #include       "defs.h"
 #include       "sym.h"
 
-LOCAL INT      parent;
+static INT     parent;
 
 SYSTAB         commands;