Re: [hackers] [dwm] [PATCH] Replace str[n]cpy with strlcpy

2016-06-07 Thread Hiltjo Posthuma
On Mon, Jun 06, 2016 at 08:50:31PM +0200, FRIGN wrote: > On Mon, 6 Jun 2016 20:12:19 +0200 > k...@shike2.com wrote: > >> ... > > Nope, it's not. Keep in mind strlcpy fills the rest > of the memory area with 0's. No it doesn't, but strncpy does that. > Also, I suspect you have not understood str

Re: [hackers] [sent][patch] load slide image on-demand

2016-06-04 Thread Hiltjo Posthuma
On Sat, Jun 04, 2016 at 05:28:31PM +0200, Markus Teich wrote: > Hiltjo Posthuma wrote: > > previously an image file would be opened but only ffread when advancing to > > the slide, but when the slide was not used it gave an error: > > > > /usr/local/bin/2ff:

[hackers] [sent][patch] load slide image on-demand

2016-06-04 Thread Hiltjo Posthuma
Hi, >From f63134043f065eaa7ccce666160e9a05785ecd54 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 4 Jun 2016 16:29:07 +0200 Subject: [PATCH] load slide image on-demand previously an image file would be opened but only ffread when advancing to the slide, but when the slide was

Re: [hackers] [dmenu] import new drw from libsl and minor fixes.

2016-06-03 Thread Hiltjo Posthuma
On Fri, Jun 03, 2016 at 07:42:37PM +0200, Markus Teich wrote: > Hiltjo Posthuma wrote: > > Your patch fixes the slowness for me, but we need to think of a more > > accurate > > but faster way indeed. > > Heyho, > > I plan to clean up the drw_text function so

Re: [hackers] [dmenu] import new drw from libsl and minor fixes.

2016-06-03 Thread Hiltjo Posthuma
On Fri, Jun 03, 2016 at 06:55:36PM +0200, Markus Teich wrote: > Hiltjo Posthuma wrote: > > I noticed a regression, dmenu seems really slow to load on my machine in the > > function readstdin(). Was the font cache behaviour removed from drw? > > Heyho, > Heya!, > that

Re: [hackers] [dwm] [PATCH] Replace str[n]cpy with strlcpy

2016-06-03 Thread Hiltjo Posthuma
On Thu, Jun 02, 2016 at 09:57:01PM +0200, FRIGN wrote: > Hello fellow hackers, > > I'll drop this little patch here so we finally make the switch to the > safe OpenBSD-functions for string copying. A good compromise might be using snprintf(buf, sizeof(buf), "%s", text) this is standard and functi

Re: [hackers] [dmenu] import new drw from libsl and minor fixes.

2016-06-03 Thread Hiltjo Posthuma
On Sun, May 22, 2016 at 10:34:30PM +0200, Markus Teich wrote: > - extract drawitem function (code deduplication) > - fix bug where inputw was not correctly calculated from the widest item, but > just from the one with the longest strlen() which is not the same. > - minor code style fixes (indenta

Re: [hackers] [PATCH 4/8] drw: simplify color schemes

2016-05-23 Thread Hiltjo Posthuma
On Mon, May 23, 2016 at 07:40:14PM +0200, Markus Teich wrote: > Hiltjo Posthuma wrote: > > I'm willing to apply your unification patches to dmenu and dwm, but can you > > make a patch for dwm/dmenu if it breaks it? > > Heyho Hiltjo, > > sorry, I don't quit

Re: [hackers] [PATCH 4/8] drw: simplify color schemes

2016-05-23 Thread Hiltjo Posthuma
On Sun, May 22, 2016 at 10:29:21PM +0200, Markus Teich wrote: > - Use simple XftColor type instead of Clr struct => No need for drw_clr_free > function. > - Replace ClrScheme struct with simple array of XftColor items `Scm`. > - Add Enum with ColFg and ColBg for indexing Scm type variables. > - R

Re: [hackers] [scc] Implement proper #pragma support || sin

2016-05-12 Thread Hiltjo Posthuma
On Thu, May 12, 2016 at 7:29 PM, wrote: > commit c9cccba538e9870b1177ae4c57dad716e9f02185 > Author: sin > AuthorDate: Wed May 11 17:38:15 2016 +0100 > Commit: Roberto E. Vargas Caballero > CommitDate: Wed May 11 17:35:52 2016 +0200 > > Implement proper #pragma support > This patch

Re: [hackers] Re: [ii] [GIGA-patchset] Hiltjo-branch

2016-05-09 Thread Hiltjo Posthuma
On Mon, May 9, 2016 at 7:52 PM, Nico Golde wrote: > Hi, > > This is massive, pretty exciting! > Hi and thanks! It came as a bit of a surprise to me too, but it is nice FRIGN posted it. There can be some silly commits though since it is an incremental patchset, so the changeset seems bigger than

[hackers] [scc] fix test001, uninitialized value after include

2016-05-06 Thread Hiltjo Posthuma
>From 9d83c63ab6557d1a7effbcb6c88cac00bc507ef2 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 6 May 2016 22:18:53 +0200 Subject: [PATCH] fix uninitialized value after include(), fixes test001 The issue manifests after the line "#include " is parsed. The codeflow is lik

Re: [hackers] [ubase][PATCH] hwclock: [-rsw] => (-r | -s | -w) and fix flag check

2016-04-22 Thread Hiltjo Posthuma
On Fri, Apr 22, 2016 at 03:24:47AM +0200, Mattias Andrée wrote: > Also in man page: [-r | -s | -w] => (-r | -s | -w) > > 8< ... snippity snip ...>8 > > int > @@ -141,7 +141,7 @@ main(int argc, char *argv[]) > else if (argc == 1) > dev = argv[0]; > > - if ((rflag ^ sfla

Re: [hackers][farbfeld][patch] ffcrop tool.

2016-04-08 Thread Hiltjo Posthuma
On Fri, Apr 08, 2016 at 01:13:09PM +, ra...@openmailbox.org wrote: > This adds a crop tool to farbfeld, the use is: ffcrop x y w h. > > What do you think? Cool idea, I think farbfeld should have some useful tools included, maybe in a separate tools/ directory or something. Another tool I lik

Re: [hackers] [sbase][PATCH] Move setsid to ubase

2016-03-29 Thread Hiltjo Posthuma
On Tue, Mar 29, 2016 at 08:41:00PM +0200, Mattias Andr??e wrote: > Signed-off-by: Mattias Andr??e > --- > Makefile | 1 - > setsid.1 | 17 - > setsid.c | 40 > 3 files changed, 58 deletions(-) > delete mode 100644 setsid.1 > delete mode

Re: [hackers] [ubase][PATCH v2] Add pwdx(1)

2016-03-26 Thread Hiltjo Posthuma
On Sat, Mar 26, 2016 at 12:58:37PM +0100, Mattias Andr??e wrote: > + > + for (; argc > 0; argc--, argv++) { > + n = snprintf(path, sizeof(path), "/proc/%s/cwd", *argv); > + if (n < 0 || n > sizeof(path)) { > + errno = ESRCH; The line: > +

Re: [hackers] [ubase][PATCH] Add pwdx(1)

2016-03-26 Thread Hiltjo Posthuma
On Sat, Mar 26, 2016 at 12:30:50AM +0100, Mattias Andr??e wrote: > Signed-off-by: Mattias Andr??e > diff --git a/pwdx.c b/pwdx.c > new file mode 100644 > index 000..b9836b7 > --- /dev/null > +++ b/pwdx.c > @@ -0,0 +1,53 @@ > +/* See LICENSE file for copyright and license details. */ > +#includ

Re: [hackers] dmenu][PATCH reversed

2016-02-21 Thread Hiltjo Posthuma
On Sat, Feb 20, 2016 at 10:28 PM, Maurycy Skier wrote: > Hi, I hope I am doing everything right. > > I added a new option (-r) which reverses the list and puts the input under > it. If you've used Vimperator or CtrlP plugin in Vim you can say it tries to > make dmenu lookalike (with -b and -l opti

Re: [hackers][sbase][PATCH] arg.h: fixed argv checks order

2016-02-19 Thread Hiltjo Posthuma
On Fri, Feb 19, 2016 at 8:43 PM, Lucas Gabriel Vuotto wrote: > this is a small fix for arg.h where it's possible to perform an > out-of-boundary memory access in argv's internal string. In particular, this > is a fix for sbase's arg.h, but I've also seen it in st repo, and I suppose > that this "b

Re: [hackers] [dmenu] Typofix, patches rebased

2016-01-11 Thread Hiltjo Posthuma
On Mon, Jan 11, 2016 at 6:29 PM, Klemens Nanni wrote: > Hey, > Hi! > cc596365a (unbolify dmenu) "breaks" some of the patches provided at > tools.suckless.org/dmenu/patches. Basically 's,bool,int' was all I had > to do besides some offset correction. Since this is the first time I'm > dealing wit

Re: [hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-11-30 Thread Hiltjo Posthuma
On Mon, Nov 30, 2015 at 3:28 PM, Silvan Jegen wrote: > Heyho! > > On Sat, Nov 28, 2015 at 11:25 PM, Hiltjo Posthuma > wrote: >> On Fri, Nov 27, 2015 at 7:38 PM, Silvan Jegen wrote: >> This can be implemented in a few lines of shell (wc, sort) and maybe awk. > > I

Re: [hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-11-28 Thread Hiltjo Posthuma
On Fri, Nov 27, 2015 at 7:38 PM, Silvan Jegen wrote: > Heyhey > > I kept thinking about a more general way to implement history > functionality for dmenu and this is what I came up with. > > We use the sort command to generate an input list for dmenu sorted by > count (first patch). dmenu itself i

Re: [hackers] [sent] drw.c: Avoid potential memory leak in drw_cur_create()

2015-11-21 Thread Hiltjo Posthuma
On Wed, Nov 18, 2015 at 10:54 PM, Markus Teich wrote: > The drw code of sent diverged from the drw code of dmenu/dwm/… a couple of > months ago. I submitted my changes earlier this year, they were never merged > into upstream libdrw. Now we have two different histories and should probably > try to

Re: [hackers] [dmenu] Command History Patch

2015-11-20 Thread Hiltjo Posthuma
On Fri, Nov 20, 2015 at 7:04 AM, Stephen Sherratt wrote: > I made a patch to add suggestions to dmenu based on previously run commands. > I know there already exists such a patch > (http://tools.suckless.org/dmenu/patches/history) but it seems to be quite > old and doesn't work with the latest ver

Re: [hackers] [dwm] setfullscreen: don't process the property twice

2015-11-06 Thread Hiltjo Posthuma
On Thu, Nov 5, 2015 at 2:39 PM, Alexander Huemer wrote: > Hi, > > this patch solved an inconvenience for me regarding at least mpv and > firefox. > In case there are no strong objections I recommend to mainline it. > > Kind regards, > -Alex^Wblackbit Can you explain in some greater detail what is

Re: [hackers] [dmenu] paste fix

2015-10-04 Thread Hiltjo Posthuma
On Sun, Oct 4, 2015 at 6:22 PM, shua lloret wrote: > You should change the website if git diff is not the correct way to create > patches. > > http://dwm.suckless.org/patches/ > http://surf.suckless.org/patches/ > http://tools.suckless.org/dmenu/patches/ > http://tools.suckless.org/ii/patches/ > h

Re: [hackers] [dmenu] Fix incorrect ordering of matching results

2015-10-04 Thread Hiltjo Posthuma
On Fri, Aug 14, 2015 at 6:28 PM, Davide Del Zompo wrote: > dmenu incorrectly orders matching results: > > $ dmenu < suck xless > suck less > EOF > > Typing 'suck less' shows 'suck xless' as first result, however, according to a > comment in the source code, this is not the intended behaviour: >

Re: [hackers] [dmenu] paste fix

2015-10-04 Thread Hiltjo Posthuma
On Sat, Oct 3, 2015 at 3:09 AM, shua lloret wrote: > attached is a small patch to enable pasting from clipboard, as well as > primary. > > It seems like there was already code in there to allow this, but since there > was never any case to match the upper case 'Y', that inline if would always > ev

Re: [hackers] Created od, with improvements suggested by FRIGN

2015-09-29 Thread Hiltjo Posthuma
On Tue, Sep 29, 2015 at 8:41 PM, Greg Reagle wrote: > My two patches combined with FRIGN's feedback. See attached. > Nice work!

Re: [hackers] [dmenu] add a new dmenu option to trigger immediately when theres a single option left

2015-08-30 Thread Hiltjo Posthuma
On Sun, Aug 30, 2015 at 2:57 PM, Michael Stummvoll wrote: > From 12b254047d5f4fe0c254a3e686a36965ff50a266 Mon Sep 17 00:00:00 2001 > From: Michael Stummvoll > Date: Sun, 30 Aug 2015 14:49:51 +0200 > Subject: [PATCH] Introduce instant match option > > with the instant match option, dmenu will clos

Re: [hackers] [dmenu] [PATCH] Typo Patch

2015-08-06 Thread Hiltjo Posthuma
On Thu, Aug 6, 2015 at 4:20 AM, Eric Pruitt wrote: > This patch fixes a typo in dmenu. > Hi! Applied! Thanks for the patch. Kind regards, Hiltjo

Re: [hackers] [scc][patch] fix build + some whitespace fixes

2015-07-17 Thread Hiltjo Posthuma
fprintf(stderr, "PAR%d:%s\n", n, arglist[n]); copymacro(buffer, s+3, INPUTSIZ-1, arglist); -- 2.3.0 From 88eb60a95be178120f204bc80d6a011cece4522b Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 17 Jul 2015 20:29:28 +0200 Subject: [PATCH 2/3] make fp of type FILE * and use needed includes

[hackers] [scc][patch] fix build + some whitespace fixes

2015-07-17 Thread Hiltjo Posthuma
Hi, patch 1: whitespace fixes patch 2: make fp of type FILE * and use needed includes patch 3: fix missing ; Kind regards, Hiltjo

[hackers] [patch][scc] fix parsing end of comment

2015-07-15 Thread Hiltjo Posthuma
Hi, This patch fixes parsing the end of a comment, there was a missing ; Kind regards, Hiltjo From 2dc0d42b51973d0e9106a2fd487d9f485178ac34 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Wed, 15 Jul 2015 22:34:42 +0200 Subject: [PATCH] lex: fix parsing end of comment --- cc1/lex.c | 4

[hackers] [patch][scc] minor fixes (whitespace and such)

2015-07-15 Thread Hiltjo Posthuma
Hi, Just some minor fixes (whitespace and such). Kind regards, Hiltjo From c79b4339fc477e2d0212d442f38c50326e430f2a Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Wed, 15 Jul 2015 21:37:32 +0200 Subject: [PATCH] whitespace + typo fixes change exit(-1) to exit(1), just use 1 instead of

Re: [hackers] [st] [5 PATCHES] Code layout changes

2015-07-08 Thread Hiltjo Posthuma
On Wed, Jul 8, 2015 at 8:45 PM, FRIGN wrote: > Good evening everybody! > > I've taken a look at st today and made some changes that have proven to > improve the code while working on sbase and ubase in the last few months. > > These patches imply layout and style changes in most places of the code

Re: [hackers] Re: [dmenu] Use libsl/libdraw code and add Xft support

2015-06-28 Thread Hiltjo Posthuma
On Sat, Jun 27, 2015 at 9:50 PM, Anselm R Garbe wrote: > > You are very welcome to take over libsl+dmenu. But I'd like to keep > the dwm maintainership, though all plans back from 2013 are still > valid. If you keep working on libsl+dmenu, I'd be willing to > adopt/adjust dwm accordingly for the n

Re: [hackers] Re: [dmenu] Use libsl/libdraw code and add Xft support

2015-06-27 Thread Hiltjo Posthuma
On Sat, Jun 13, 2015 at 11:51 AM, Dimitris Papastamos wrote: > > Works well for me. > > Anselm, can we merge this? > Bump. Can this get merged to master? I'd be willing to take over maintainership for dwm and dmenu if the current maintainer(s) don't have the time or energy to do it. Also I'd li

[hackers] Re: [dmenu] Use libsl/libdraw code and add Xft support

2015-06-12 Thread Hiltjo Posthuma
On Mon, Jun 8, 2015 at 11:48 PM, Hiltjo Posthuma wrote: > On Mon, Jun 8, 2015 at 11:05 PM, Hiltjo Posthuma > wrote: >> ... snip ... >> > Some more thoughts: in drw.c these functions don't check if drw == NULL before use: drw_load_fonts, drw_font_xcreate. We should p

[hackers] Re: [dmenu] Use libsl/libdraw code and add Xft support

2015-06-08 Thread Hiltjo Posthuma
On Mon, Jun 8, 2015 at 11:05 PM, Hiltjo Posthuma wrote: > ... snip ... > I forgot to mention I also changed the odd case in drw_cur_create where if you pass NULL for drw it would allocate memory but never expose it and return NULL (possible leak): http://git.suckless.org/dwm/tree/drw.

[hackers] [dmenu] Use libsl/libdraw code and add Xft support

2015-06-08 Thread Hiltjo Posthuma
Hi guys, This is a resend of the patch to add Xft support to upstream dmenu. There was some stray whitespace in the previous patch which I fixed. Based on the work of libsl I have modified dmenu to use the new libsl/libdraw code which adds Xft and fallback-fonts support aswell. Addtionally I fix

Re: [hackers] [sbase] config.mk: make cc the default $CC || Hiltjo Posthuma

2014-11-11 Thread Hiltjo Posthuma
On Tue, Nov 11, 2014 at 11:05 AM, Dimitris Papastamos wrote: > > I agree on this, I think Hiltjo had some trouble because it > was defaulting to "c99" as opposed to "cc" and that did not > exist on his system. > > Hiltjo, can you clarify again? > Yeah that was my problem. ".POSIX:" in the Makefil

<    1   2   3   4   5