1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=b41b0d41228fe82991a63f475e0bef701f539db9 (rebased)
--- a/src/exec.c
+++ b/src/exec.c
@@ -769,12 +769,8 @@ typecmd(int argc, char **argv)
return err;
}
-STATIC int
-describe_command(out, command, path, verbose)
- struct output *out;
- char *command;
- const char *path;
- int verbose;
+static int describe_command(struct output *out, char *command,
+ const char *path, int verbose)
{
struct cmdentry entry;
struct tblentry *cmdp;
@@ -875,10 +871,7 @@ out:
return 0;
}
-int
-commandcmd(argc, argv)
- int argc;
- char **argv;
+int commandcmd(int argc, char **argv)
{
char *cmd;
int c;
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -243,10 +243,7 @@ close:
#endif
-int
-killcmd(argc, argv)
- int argc;
- char **argv;
+int killcmd(int argc, char **argv)
{
extern char *signal_names[];
int signo = -1;
--- a/src/mksignames.c
+++ b/src/mksignames.c
@@ -360,9 +360,7 @@ initialize_signames ()
}
}
-void
-write_signames (stream)
- FILE *stream;
+void write_signames(FILE *stream)
{
register int i;
--- a/src/nodes.c.pat
+++ b/src/nodes.c.pat
@@ -87,18 +87,14 @@ copyfunc(union node *n)
-STATIC void
-calcsize(n)
- union node *n;
+static void calcsize(union node *n)
{
%CALCSIZE
}
-STATIC void
-sizenodelist(lp)
- struct nodelist *lp;
+static void sizenodelist(struct nodelist *lp)
{
while (lp) {
funcblocksize += SHELL_ALIGN(sizeof(struct nodelist));
@@ -109,9 +105,7 @@ sizenodelist(lp)
-STATIC union node *
-copynode(n)
- union node *n;
+static union node *copynode(union node *n)
{
union node *new;
@@ -120,9 +114,7 @@ copynode(n)
}
-STATIC struct nodelist *
-copynodelist(lp)
- struct nodelist *lp;
+static struct nodelist *copynodelist(struct nodelist *lp)
{
struct nodelist *start;
struct nodelist **lpp;
@@ -142,9 +134,7 @@ copynodelist(lp)
-STATIC char *
-nodesavestr(s)
- char *s;
+static char *nodesavestr(char *s)
{
char *rtn = funcstring;
--- a/src/options.c
+++ b/src/options.c
@@ -389,9 +389,7 @@ setcmd(int argc, char **argv)
}
-void
-getoptsreset(value)
- const char *value;
+void getoptsreset(const char *value)
{
shellparam.optind = number(value) ?: 1;
shellparam.optoff = -1;
--- a/src/redir.c
+++ b/src/redir.c
@@ -281,18 +281,12 @@ ecreate:
}
-STATIC void
#ifdef notyet
-dupredirect(redir, f, memory)
+static void dupredirect(union node *redir, int f, char memory[10])
#else
-dupredirect(redir, f)
+static void dupredirect(union node *redir, int f)
#endif
- union node *redir;
- int f;
-#ifdef notyet
- char memory[10];
-#endif
- {
+{
int fd = redir->nfile.fd;
int err = 0;
|