[dev] [st][PATCH] Unset mode when clearing regions

2014-08-07 Thread Roberto E. Vargas Caballero
tclearregion() was clearing regions using spaces and the current attributes of the terminal. It was correct with all the modes excepct underline, because they didn't affect the space character, but in the case of underline it was a problem. A easy way of seeing this problem is writing this in the l

[dev] [st][PATCH] Remove ul capability

2014-08-07 Thread Roberto E. Vargas Caballero
This capability indicates that underscore '_' overstrike current letter under the cursor. It means that you can generate a underline 'b' using 'b^H_', because it writes a 'b' then backward one characther and then overstrike '_'. St has not such behaviour, so it is an error to have this capability.

[dev] [st][PATCH] Set correct value of variable SHELL

2014-08-07 Thread Roberto E. Vargas Caballero
SHELL must contain the value of the SHELL of the user. execsh() was reading this variable from the environment of the user, and in case of being NULL it was setting SHELL with the value of /etc/passwd, but in this case it was executing the default shell specified in config.h. --- st.c | 6 +++---

[dev] [utmp][PATCH] Pass name of shell as first parameter of child process

2014-08-07 Thread Roberto E. Vargas Caballero
This is important because this is the value that is usually shown by ps (and it is also used by some windows managers to display who is running). --- utmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utmp.c b/utmp.c index 6ab5289..c893ae1 100644 --- a/utmp.c +++ b/utmp.c

[dev] [utmp][PATH] Avoid race conditions between fork and wait

2014-08-07 Thread Roberto E. Vargas Caballero
If some signal arrives to the parent between these two points then it is possible to have dirty entries in utmp. --- utmp.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/utmp.c b/utmp.c index c893ae1..6cdc5d2 100644 --- a/utmp.c +++ b/utmp.c @@ -6,6 +6,7 @@

[dev] [utmp][PATCH] Return the status of child as status of utmp

2014-08-07 Thread Roberto E. Vargas Caballero
It makes possible to can know what was the the exit status of the command passed to utmp. --- utmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utmp.c b/utmp.c index 53429a8..de0064d 100644 --- a/utmp.c +++ b/utmp.c @@ -80,5 +80,5 @@ main(int argc, char *argv[])

[dev] [utmp][PATCH] Use same die() call in parent and child

2014-08-07 Thread Roberto E. Vargas Caballero
--- utmp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utmp.c b/utmp.c index d0d556c..53429a8 100644 --- a/utmp.c +++ b/utmp.c @@ -41,6 +41,7 @@ main(int argc, char *argv[]) int status; uid_t uid; sigset_t set; + char *err; extern

Re: [dev] [utmp][PATCH] Use same die() call in parent and child

2014-08-07 Thread Markus Teich
Roberto E. Vargas Caballero wrote: > @@ -41,6 +41,7 @@ main(int argc, char *argv[]) > + char *err; > @@ -58,15 +59,16 @@ main(int argc, char *argv[]) > + err = "error spawning child:%s"; Heyho Roberto, why not immediately initialize the variable? > - die("error executing shel

Re: [dev] [utmp][PATCH] Use same die() call in parent and child

2014-08-07 Thread Roberto E. Vargas Caballero
> why not immediately initialize the variable? Uhmmm, yes maybe it is better. I set the value there because I thought it was better to have all the assignations near between them, so it was easier to know what was the value of err in the call to die. > Also I think this (unmarked!) fallthrough wa

Re: [dev] [utmp][PATCH] Use same die() call in parent and child

2014-08-07 Thread Markus Teich
Roberto E. Vargas Caballero wrote: > I am used to fallthrough (maybe because I didn't put mark ever), > but maybe is not the same for all the programmers :?. > This patch is more about style that real benefit of the changes. I > usually reuse all the possible paths of a switch to avoid code duplica

Re: [dev] Announcing smdev

2014-08-07 Thread Jack L. Frost
Note that the currently latest tag doesn't change permissions on already existing device nodes. If you need it to do that, grab the latest commit. On Sat, Aug 02, 2014 at 01:59:47PM +0100, Dimitris Papastamos wrote: > Greetings everyone. > > smdev[0] is now hosted on suckless.org. It is a simple

Re: [dev] Announcing smdev

2014-08-07 Thread Jack L. Frost
Also smdev is available from AUR on Arch. On Sat, Aug 02, 2014 at 01:59:47PM +0100, Dimitris Papastamos wrote: > Greetings everyone. > > smdev[0] is now hosted on suckless.org. It is a simple/suckless > mdev alternative. smdev has similar semantics to mdev. For those > used to mdev it should b

[dev][dwm] Remove unused width and height parameters from drw_rect

2014-08-07 Thread Jente Hidskes
Good evening, It just came to my attention that the width and height parameters in drw_rect aren't currently used. It was a quick fix, so here's the patch. Cheers, Jente From 40f2998cdac439a9ebdc0d2094208c8d4459f0ab Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Thu, 7 Aug 2014 19:00:29 +02

Re: [dev] [utmp][PATCH] Use same die() call in parent and child

2014-08-07 Thread Roberto E. Vargas Caballero
> Heyho Roberto, > > usually the compiler should fix this code duplication, at least with -Os set. > So, before the patch, the code is easier to read and the compiler takes care > of > code deduplication. After the patch you save some compiler optimization time I don't think compiler can optimiz

Re: [dev] [st][PATCH] Unset mode when clearing regions

2014-08-07 Thread Roberto E. Vargas Caballero
Hi, Related to this problem there is another problem. I have background black and foreground green, and it works perfectly except in the case of underline, where the font always is printed in white. I was looking the code but I don't understand why it happens. could someone else check this issue?