[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH 4/5] chars: speed up the determination whether s
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH 4/5] chars: speed up the determination whether something is a control character |
Date: |
Sun, 05 Jun 2016 09:54:14 +0200 |
On Sun, Jun 5, 2016, at 09:46, Benno Schulenberg wrote:
> + return ((c[0] & 0xE0) == 0 || c[0] == 127 ||
> + (c[0] == -62 && c[1] < -96));
My question is: is it permissible to assume that variables of type char
will have values in the range -128 .. 127? Or are there platforms where
there are treated as all postive, 0 .. 255?
Benno
--
http://www.fastmail.com - Accessible with your email software
or over the web
- [Nano-devel] [PATCH 1/5] chars: represent the high-bit controls more intelligibly, Benno Schulenberg, 2016/06/05
- [Nano-devel] [PATCH 2/5] chars: the representation of a control character is always two bytes, Benno Schulenberg, 2016/06/05
- [Nano-devel] [PATCH 3/5] chars: delete a now-unused function, Benno Schulenberg, 2016/06/05
- [Nano-devel] [PATCH 4/5] chars: speed up the determination whether something is a control character, Benno Schulenberg, 2016/06/05
- Re: [Nano-devel] [PATCH 4/5] chars: speed up the determination whether something is a control character,
Benno Schulenberg <=
- [Nano-devel] [PATCH 5/5] chars: look at bytes in their context, so only valid sequences are accepted, Benno Schulenberg, 2016/06/05