Re: [dev] [st PATCH] Simplify tputtab.

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon, 28 Apr 2014 10:54:21 +0200

> - for(++x; x < term.col && !term.tabs[x]; ++x)
> + while(++x < term.col && !term.tabs[x])
...
> - for(--x; x > 0 && !term.tabs[x]; --x)
> + while(--x > 0 && !term.tabs[x])

I'm sorry, but this patch is incorrect, because it is implementation defined
when side effects of expressions are applied, so x of !term.tabs[x] can
be x before decrement, or x after decrement.

Regards,

-- 
Roberto E. Vargas Caballero
Received on Mon Apr 28 2014 - 10:54:21 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 28 2014 - 11:00:13 CEST