Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Nikita Zlobin
In Sun, 4 Jul 2021 12:34:54 +0200 Laslo Hunhold wrote: > the arg.h in st has some "low-hanging" fruits regarding improvements, > and I modified it accordingly in quark and farbfeld back in 2017 (see > [0]) to fix some issues. > > One example is that in my modified form, you can actually access >

Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Nikita Zlobin
In Sun, 4 Jul 2021 11:55:53 +0200 Hiltjo Posthuma wrote: > Hi, > > Thanks, but I prefer the current style one. > > I'm not confident this patch doesn't modify any behaviour. > For example I see the `i` variable was removed, but it is actually > important to not modify argv as this causes issues

Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Laslo Hunhold
On Sun, 4 Jul 2021 11:55:53 +0200 Hiltjo Posthuma wrote: Dear Hiltjo, > Thanks, but I prefer the current style one. > > I'm not confident this patch doesn't modify any behaviour. > For example I see the `i` variable was removed, but it is actually > important to not modify argv as this causes i

Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Nikita Zlobin
В Sun, 4 Jul 2021 11:55:53 +0200 Hiltjo Posthuma пишет: > On Sun, Jul 04, 2021 at 12:30:27PM +0500, Nikita Zlobin wrote: > > - improved code readability > > - cleaned redundant variables and checks > > - isolated reusable part for (E)ARGF > > --- > > arg.h | 65 > > +-

Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Nikita Zlobin
In Sun, 4 Jul 2021 11:55:53 +0200 Hiltjo Posthuma wrote: > On Sun, Jul 04, 2021 at 12:30:27PM +0500, Nikita Zlobin wrote: > > - improved code readability > > - cleaned redundant variables and checks > > - isolated reusable part for (E)ARGF > > --- > > arg.h | 65 > > +

Re: [hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Hiltjo Posthuma
On Sun, Jul 04, 2021 at 12:30:27PM +0500, Nikita Zlobin wrote: > - improved code readability > - cleaned redundant variables and checks > - isolated reusable part for (E)ARGF > --- > arg.h | 65 +-- > 1 file changed, 32 insertions(+), 33 dele

[hackers] [st][PATCH] arg.h: optimize & style

2021-07-04 Thread Nikita Zlobin
- improved code readability - cleaned redundant variables and checks - isolated reusable part for (E)ARGF --- arg.h | 65 +-- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/arg.h b/arg.h index a22e019..ee0bbc6 100644 --- a/ar