Re: [dev] Fwd: mod patrick295767 - adding ~/.dwmrc

2013-10-01 Thread Martti Kühne
On Sat, Sep 28, 2013 at 11:45 PM, patrick295767 patrick295767 wrote: > Hi, > > I would like to share a mod of the config.h and dwm.c. > > Please create a file ~/.dwmrc with its content, before running dwm: >xterm -bg blue -fg yellow > > This mod uses the window key flag, which is used because

Re: [dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread Roberto E. Vargas Caballero
> I was thinking the same until I checked back on the ISO C11 specification and > - there's no strnlen function :D Yes, it is true, but take a look to strnlen(3): The strlen() and strnlen() functions conform to IEEE Std 1003.1-2008 (``POSIX.1''). ;). -- Roberto E. Vargas Caballero -

Re: [dev] [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread koneu
>> Isn't there strnlen() function? > > This was the same I was thinking before of reading this new version, > but it is not necessary now. I was thinking the same until I checked back on the ISO C11 specification and - there's no strnlen function :D ~koneu

Re: [dev] Re: [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread Roberto E. Vargas Caballero
> >> > +#define STRNLEN(s) ((s)[LEN((s)) - 1] == '\0' ? strlen((s)) : LEN((s))) > >> This trick is only useful when you usually have strings with a size of > >> LEN(s)-1, but in our case we will usually have string with a small size, > >> so it means we always will add a new test before of calling

Re: [dev] [st][PATCH] Add support for multiple charset definitions

2013-10-01 Thread Silvan Jegen
On Tue, Oct 01, 2013 at 10:33:40PM +0200, Roberto E. Vargas Caballero wrote: > > I applied the patch to tip ( eeae9b0 ) but compilation fails due to > > a redefinition of a the tsetchar function: > > Sorry, I don't know why my gcc version doesn't give me the error (some > type of overloading).

Re: [dev] [st][PATCH] Add support for multiple charset definitions

2013-10-01 Thread Roberto E. Vargas Caballero
> I applied the patch to tip ( eeae9b0 ) but compilation fails due to > a redefinition of a the tsetchar function: Sorry, I don't know why my gcc version doesn't give me the error (some type of overloading). This version uses a different name for this new function. -- >8 -- Subject: [PATCH]

Re: [dev] [st][PATCH] Add support for multiple charset definitions

2013-10-01 Thread Silvan Jegen
Hi Roberto On Tue, Oct 01, 2013 at 09:32:16PM +0200, Roberto E. Vargas Caballero wrote: > vt100 has support for two defined charset, G0 and G1. Each charset > can be defined, but in each moment is selected only one of both > charset. This is usually used selecting a national charset in G0 > and gr

Re: [dev] Re: [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread Alexander S.
2013/10/2 Mark Edgar : > On Mon, 23 Sep 2013 10:06:13 +0200, Roberto E. Vargas Caballero wrote: >> On Sat, Sep 21, 2013 at 03:41:01PM +0200, Mark Edgar wrote: >> I don't agree here, because if you insert a escape sequence is not dificult >> get more of 16 characters (for example a key combination w

[dev] Re: [st] [PATCH] Avoid buffer overflows in the case of key-mapped strings.

2013-10-01 Thread Mark Edgar
On Mon, 23 Sep 2013 10:06:13 +0200, Roberto E. Vargas Caballero wrote: > On Sat, Sep 21, 2013 at 03:41:01PM +0200, Mark Edgar wrote: > I don't agree here, because if you insert a escape sequence is not dificult > get more of 16 characters (for example a key combination which updates the > bar title

[dev] [st][PATCH] Add support for multiple charset definitions

2013-10-01 Thread Roberto E. Vargas Caballero
vt100 has support for two defined charset, G0 and G1. Each charset can be defined, but in each moment is selected only one of both charset. This is usually used selecting a national charset in G0 and graphic charset in G1, so you can switch between graphic charset and text charset without losing th

Re: [dev] [st] [PATCH] More compatible with xterm

2013-10-01 Thread Roberto E. Vargas Caballero
> > It look like problem not related to save/restore cursor position. This > test have strange sequence: ESC[m ESC(B ESC)B > What this sequence should do? ESC[m = SGR. Parameter=0 restore default graphic rendering values ESC(B = SCS. Selects USASCII in primary charset (G0) ESC)B = SCS. Selects US