[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.c#n397 .

Also on OpenBSD I got a warning for a possible case for uninitialised
variable in drw.c drw_text(): XftDraw *d . I looked into this, but I
think this is a false positive and didn't change it.



[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 fixed a few oddities in libsl which were mentioned on
this ML by Markus Teich and Eric Pruitt before.

- libdraw, util: add drw.{c,h}, util.{c,h} and update code.
- libdraw: fix drw_rect(): use w and h parameter.
- libdraw: die(): print errstr if last character in string was ":" (sbase).
- libdraw: drw_clr_free: allow valid free(NULL).
- config.def.h: set default font to monospace.
- cleanup() on exit.
- LICENSE: update license string for dmenu -v to 2015.
- LICENSE: add myself to LICENSE

Considering this is a big change it would be very welcome if people
would review this and give feedback.

Kind regards,
Hiltjo


0001-Use-libdraw-add-Xft-and-fallback-fonts-support-to-gr.patch
Description: Binary data