Message ID | 20230209131154.zbh3tagewd7u6vq5@tarta.nabijaczleweli.xyz (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Series | [v2] Prototype all function definitions for C23 compat | expand |
On Thu, Feb 09, 2023 at 02:11:54PM +0100, наб wrote: > > STATIC int > -describe_command(out, command, path, verbose) > - struct output *out; > - char *command; > - const char *path; > - int verbose; > +describe_command(struct output *out, char *command, > + const char *path, int verbose) This looks exactly the same as the first patch. Did you send out the wrong one perhaps? Just to recap if we're touching the function definition they should now look like: static int describe_command(struct output *out, char *command, const char *path, int verbose) Thanks,
On 10/02/2023 02:43, Herbert Xu wrote: > On Thu, Feb 09, 2023 at 02:11:54PM +0100, наб wrote: >> >> STATIC int >> -describe_command(out, command, path, verbose) >> - struct output *out; >> - char *command; >> - const char *path; >> - int verbose; >> +describe_command(struct output *out, char *command, >> + const char *path, int verbose) > > This looks exactly the same as the first patch. Did you send > out the wrong one perhaps? It is not the same as the first patch. > Just to recap if we're touching the function definition they > should now look like: > > static int describe_command(struct output *out, char *command, > const char *path, int verbose) > > Thanks, It looks like наб took this as a request to break the parameters over multiple lines, and updated the patch accordingly. The initial patch had them all on a single line. This is also how I had read the request. It is only in this second message that I notice that you no longer have a line break before the function name, so to hopefully help avoid misunderstandings, I am spelling this out explicitly here. Cheers, Harald van Dijk
On Fri, Feb 10, 2023 at 02:51:18AM +0000, Harald van Dijk wrote: . > It looks like наб took this as a request to break the parameters over > multiple lines, and updated the patch accordingly. The initial patch had > them all on a single line. This is also how I had read the request. It is > only in this second message that I notice that you no longer have a line > break before the function name, so to hopefully help avoid > misunderstandings, I am spelling this out explicitly here. Oh yes indeed. Sorry for the confusion. Thanks,
diff --git a/src/exec.c b/src/exec.c index 83cba94..712b84e 100644 --- a/src/exec.c +++ b/src/exec.c @@ -776,11 +776,8 @@ typecmd(int argc, char **argv) } STATIC int -describe_command(out, command, path, verbose) - struct output *out; - char *command; - const char *path; - int verbose; +describe_command(struct output *out, char *command, + const char *path, int verbose) { struct cmdentry entry; struct tblentry *cmdp; @@ -882,9 +879,7 @@ out: } int -commandcmd(argc, argv) - int argc; - char **argv; +commandcmd(int argc, char **argv) { char *cmd; int c; diff --git a/src/jobs.c b/src/jobs.c index f3b9ffc..6176d0c 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -244,9 +244,7 @@ close: int -killcmd(argc, argv) - int argc; - char **argv; +killcmd(int argc, char **argv) { extern char *signal_names[]; int signo = -1; diff --git a/src/mksignames.c b/src/mksignames.c index a832eab..8ccdf38 100644 --- a/src/mksignames.c +++ b/src/mksignames.c @@ -361,8 +361,7 @@ initialize_signames () } void -write_signames (stream) - FILE *stream; +write_signames (FILE *stream) { register int i; diff --git a/src/nodes.c.pat b/src/nodes.c.pat index 9125bc7..463f7f5 100644 --- a/src/nodes.c.pat +++ b/src/nodes.c.pat @@ -88,8 +88,7 @@ copyfunc(union node *n) STATIC void -calcsize(n) - union node *n; +calcsize(union node *n) { %CALCSIZE } @@ -97,8 +96,7 @@ calcsize(n) STATIC void -sizenodelist(lp) - struct nodelist *lp; +sizenodelist(struct nodelist *lp) { while (lp) { funcblocksize += SHELL_ALIGN(sizeof(struct nodelist)); @@ -110,8 +108,7 @@ sizenodelist(lp) STATIC union node * -copynode(n) - union node *n; +copynode(union node *n) { union node *new; @@ -121,8 +118,7 @@ copynode(n) STATIC struct nodelist * -copynodelist(lp) - struct nodelist *lp; +copynodelist(struct nodelist *lp) { struct nodelist *start; struct nodelist **lpp; @@ -143,8 +139,7 @@ copynodelist(lp) STATIC char * -nodesavestr(s) - char *s; +nodesavestr(char *s) { char *rtn = funcstring; diff --git a/src/options.c b/src/options.c index 2d4bd3b..2cf40b4 100644 --- a/src/options.c +++ b/src/options.c @@ -390,8 +390,7 @@ setcmd(int argc, char **argv) void -getoptsreset(value) - const char *value; +getoptsreset(const char *value) { shellparam.optind = number(value) ?: 1; shellparam.optoff = -1; diff --git a/src/redir.c b/src/redir.c index 631ddc9..a3c6baa 100644 --- a/src/redir.c +++ b/src/redir.c @@ -283,16 +283,11 @@ ecreate: STATIC void #ifdef notyet -dupredirect(redir, f, memory) +dupredirect(union node *redir, int f, char memory[10]) #else -dupredirect(redir, f) +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;