[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pre-lexer-2 1/4] command: Factor command name matching out of comma
From: |
Ben Pfaff |
Subject: |
Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c. |
Date: |
Sat, 25 Sep 2010 12:23:48 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Ben Pfaff <address@hidden> writes:
> I think you might be right that we need a wide-character
> [sub]string or at least a UTF-8 [sub]string.
>
> I'll think about this before I proceed.
I'm inclined to believe that we should adopt libunistring. It's
part of gnulib, so it would be easy to do so without adding extra
dependencies, and I believe that it has all the functionality
that we need.
libunistring uses uint8_t (unsigned char) for UTF-8. That's the
same as what PSPP uses currently for "union value". I'm inclined
to do this:
* Use uint8_t for UTF-8, via libunistring.
* Use char for multibyte strings in the current locale.
* Change "union value" to use signed char, in place of
its current use of unsigned char.
Then we'll be able to cleanly distinguish each of these types
(char vs. unsigned char vs. signed char) and get some help from
the compiler.
What do you think?
--
Ben Pfaff
http://benpfaff.org
- [pre-lexer-2 0/4] more preparation for new lexer, Ben Pfaff, 2010/09/25
- [pre-lexer-2 4/4] lexer: Get rid of lex_negative_to_dash()., Ben Pfaff, 2010/09/25
- [pre-lexer-2 1/4] command: Factor command name matching out of command.c., Ben Pfaff, 2010/09/25
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., John Darrington, 2010/09/25
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., Ben Pfaff, 2010/09/25
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c.,
Ben Pfaff <=
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., John Darrington, 2010/09/26
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., Ben Pfaff, 2010/09/26
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., John Darrington, 2010/09/26
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., Ben Pfaff, 2010/09/26
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., John Darrington, 2010/09/27
- Re: [pre-lexer-2 1/4] command: Factor command name matching out of command.c., Ben Pfaff, 2010/09/27
[pre-lexer-2 3/4] lexer: New type enum token_type., Ben Pfaff, 2010/09/25
[pre-lexer-2 2/4] str: Inline some trivial functions., Ben Pfaff, 2010/09/25