On Aug 28 2022, Greg Wooledge wrote: > On Sun, Aug 28, 2022 at 10:47:38AM -0400, Yair Lenga wrote: >> Hi, >> >> I've noticed Bash code uses "old-style" C89 declarations: >> * Parameters are separated from the prototype >> * Variables declared only at the beginning of the function >> * No mixed declaration/statements >> * No block local variables >> >> intmax_t >> evalexp (expr, flags, validp) >> char *expr; >> int flags; >> int *validp; >> { >> intmax_t val; >> int c; >> procenv_t oevalbuf; >> >> val = 0; >> noeval = 0; >> already_expanded = (flags&EXP_EXPANDED); > > You're mistaken. What you're seeing is the "K&R" coding style, which > predates C89.
Note that the next revision of the C standard removes support for K&R declarations. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."