Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Don't treat NUL as a combining character



On May 10,  2:02am, Mikael Magnusson wrote:
} Subject: Re: PATCH: Don't treat NUL as a combining character
}
} > -#define IS_COMBINING(wc)       (WCWIDTH(wc) == 0 && !iswcntrl(wc))
} > +#define IS_COMBINING(wc)       (wc != 0 && WCWIDTH(wc) == 0 && !iswcntrl(wc))
} 
} Instead of making this path ever so slightly slower by adding an extra
} test that only matters a fraction of the time

I think the test would be no slower (or at least faster than what you have
there) if you just put the wc != 0 as the last branch of the && chain?

} could we actually make it wc > 127 instead?

I don't know the definitive answer to that, but it seems it should also go
at the end.  We're really micro-optimizing here, though.



Messages sorted by: Reverse Date, Date, Thread, Author