Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-05-02 Thread Markus Wichmann
On Fri, Apr 25, 2014 at 04:42:09PM +0200, Roberto E. Vargas Caballero wrote: The problem is Wall change from one system to another (this is something OpenBSD users know with strcpy calls...), and it doesn't force how to remove the warning, so at the end I think style is not really improved

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-28 Thread Roberto E. Vargas Caballero
The problem is Wall change from one system to another (this is something OpenBSD users know with strcpy calls...), and it doesn't force how to remove the warning, so at the end I think style is not really improved with Wall (and guys, some of the warning are really, really stupid). There

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-25 Thread noname
On Thu, Apr 24, 2014 at 07:29:35AM +0200, Roberto E. Vargas Caballero wrote: Hello, u suffix was here for a purpose. The patch has comment about multibyte characters. As 0x20u is unsigned, c was converted to unsigned char before comparison so multibyte characters were not considered

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-25 Thread Roberto E. Vargas Caballero
Hi, We use ‐Wall to show all warnings. If the compiler complains, fix the warning. Easy. At least this keeps the code to a certain style. St was The problem is Wall change from one system to another (this is something OpenBSD users know with strcpy calls...), and it doesn't force how to

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-25 Thread Christoph Lohmann
Greetings. On Fri, 25 Apr 2014 16:51:15 +0200 Roberto E. Vargas Caballero k...@shike2.com wrote: Hi, We use ‐Wall to show all warnings. If the compiler complains, fix the warning. Easy. At least this keeps the code to a certain style. St was The problem is Wall change from one

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-25 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-24 Thread Christoph Lohmann
Greetings. On Thu, 24 Apr 2014 18:20:20 +0200 Roberto E. Vargas Caballero k...@shike2.com wrote: Thinking a bit more about this, I don't know why we are using -Wall, because it moves people to follow the GNU criteria, that is the more suck criteria I know (I think it is because they come from

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-23 Thread Roberto E. Vargas Caballero
Applied with a small modification. Thanks -- Roberto E. Vargas Caballero

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-23 Thread noname
On Wed, Apr 23, 2014 at 08:26:32PM +0200, Roberto E. Vargas Caballero wrote: Applied with a small modification. Thanks u suffix was here for a purpose. The patch has comment about multibyte characters. As 0x20u is unsigned, c was converted to unsigned char before comparison so multibyte

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-23 Thread Roberto E. Vargas Caballero
Hello, u suffix was here for a purpose. The patch has comment about multibyte characters. As 0x20u is unsigned, c was converted to unsigned char before comparison so multibyte characters were not considered control characters. I realized it after send the patch. I prefer use uchar instead