From 08b8d916b5887267ef963fd711f1e65b7d8378ac Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 13 Oct 2010 22:18:03 +0000 Subject: In the spirit of r90111, depend on c89 and remove the "STATIC" macro and its usage. --- bin/sh/expand.c | 70 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'bin/sh/expand.c') diff --git a/bin/sh/expand.c b/bin/sh/expand.c index f5a2f23..d33f0ac 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -95,25 +95,25 @@ 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 char *cvtnum(int, char *); -STATIC int collate_range_cmp(int, int); - -STATIC 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 collate_range_cmp(int c1, int c2) { static char s1[2], s2[2]; @@ -210,7 +210,7 @@ expandarg(union node *arg, struct arglist *arglist, int flag) * 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, int flag) -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 inquotes) * 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 char *val) * Our own itoa(). */ -STATIC char * +static char * cvtnum(int num, char *buf) { char temp[32]; -- cgit v1.1