> We can modify it as follows: > if(BETWEEN(c, 0x00, 0x1f) || c == 0x7f) { /* control code */
I like this solution because make explicit what we want to do. With the u suffix is a bit obscure and can generate some errors. > I also thought about using incntrl(). It should work the same way > everywhere but it is still possible to break it with locales. Yeah, I have also thought about it, but there are 8 bit version of the control characters [1]. Since we are emulating a piece of hardware we should avoid the functions of ctype. If you send a patch with the version with BETWEEN I will apply it. Regards, -- Roberto E. Vargas Caballero