Re: [dev] [st] [PATCH] Got rid of Glyph state, because it was redundant anyway.

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon, 15 Apr 2013 09:14:31 +0200

> + while(--last >= gp && !(selected(last - gp, y) && \
> + strcmp(last->c, " ") != 0))
> /* nothing */;

I think you could write here only:


        while(--last >= gp && strcmp(last->c, " "))
                /* nothing */


because it is not important if it is selected or not, you only want to
remove the trailing white spaces, and the next loop will look if the
character is selected or not:


        for(x = 0; gp <= last; x++, ++gp) {
                    if(!selected(x, y))
                         continue;

                isselected = 1;
                size = utf8size(p);
                memcpy(ptr, p, size);
                ptr += size;
        }
Received on Mon Apr 15 2013 - 09:14:31 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 15 2013 - 09:24:05 CEST