Re: [dev] [st utf8 3/4] Change internal character representation.

2015-05-24 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-05-22 Thread Jan Christoph Ebersbach
Hi, I just realized that UTF-8 characters aren't supported as word delimiters. The attached patch fixes this issue. For a higher usefulness of the utf8strchr function, the index of the UTF-8 character could be returned in addition with a Rune instead of a char*. Since utf8strchr is currently on

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-05-04 Thread Connor Lane Smith
On 4 May 2015 at 11:30, Roberto E. Vargas Caballero wrote: > But uint32_t is not guaranteed to be present in all the implementations uint32_t is guaranteed in POSIX 2004, but you may not want to rely on that. uint32_least_t, which would suffice, is guaranteed in C99. cls

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-05-04 Thread Roberto E. Vargas Caballero
> > For what it's worth, I agree with this approach. uint32_t is > guaranteed (since C99) to be just the right size to hold all Unicode > points (as well as their UTF-8 representation) without wasting (too > much) space. But uint32_t is not guaranteed to be present in all the implementations, alt

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread suigin
On Mon, Apr 27, 2015 at 09:58:37AM +0200, Roberto E. Vargas Caballero wrote: > Uhmmm, so do you propose don't use long arrays ever? because in > some implementations long may be 4, but in others may be > 8. We also should forbid int arrays for the same reason. I would say it depends on the context

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread Silvan Jegen
On Mon, Apr 27, 2015 at 10:05 AM, koneu wrote: > On April 27, 2015 9:58:37 AM CEST, "Roberto E. Vargas Caballero" > wrote: >> >>> >>> GCC and Clang define long as 64-bits by default for x86_64, AArch64, >>> and many other 64-bit target architectures, which is wasteful for >>> Unicode code points

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread koneu
On April 27, 2015 9:58:37 AM CEST, "Roberto E. Vargas Caballero" wrote: > >> >> GCC and Clang define long as 64-bits by default for x86_64, AArch64, >> and many other 64-bit target architectures, which is wasteful for >> Unicode code points. > >Uhmmm, so do you propose don't use long arrays ever

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread Roberto E. Vargas Caballero
> > GCC and Clang define long as 64-bits by default for x86_64, AArch64, > and many other 64-bit target architectures, which is wasteful for > Unicode code points. Uhmmm, so do you propose don't use long arrays ever? because in some implementations long may be 4, but in others may be 8. We also

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread Roberto E. Vargas Caballero
Applied (with minor changes), thanks.

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-22 Thread suigin
On Tue, Apr 21, 2015 at 09:28:38PM +, noname wrote: > typedef struct { > - char c[UTF_SIZ]; /* character code */ > - ushort mode; /* attribute flags */ > - uint32_t fg; /* foreground */ > - uint32_t bg; /* background */ > + long u; /* character code *

[dev] [st utf8 3/4] Change internal character representation.

2015-04-21 Thread noname
--- st.c | 79 +--- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/st.c b/st.c index 0c31fc5..fa21c4e 100644 --- a/st.c +++ b/st.c @@ -72,6 +72,7 @@ char *argv0; #define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) ==