Re: cat(1): simplify/flatten argument loops

2020-11-30 Thread Martijn van Duren
This one reads a lot better to me and even shaves of 2LoC. :-) OK martijn@ On Mon, 2020-11-30 at 18:28 -0600, Scott Cheloha wrote: > Hi, > > The cook_args() and raw_args() functions in cat(1) are too clever. > They handle multiple special cases in a single big loop with lots of > branches. 

cat(1): simplify/flatten argument loops

2020-11-30 Thread Scott Cheloha
Hi, The cook_args() and raw_args() functions in cat(1) are too clever. They handle multiple special cases in a single big loop with lots of branches. It's been like this since at least 1989: https://svnweb.freebsd.org/csrg/bin/cat/cat.c?view=markup=37179 The goal seems to be to avoid calling