pinentry-dmenu

a pinentry program based on dmenu
git clone anongit@rnpnr.xyz:pinentry-dmenu.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 572bc67a6bb1a3d6bdbac4fad13af942c25d8a06
Parent: f826adcdcdf15115a37797ff4ca76bae43a2104e
Author: Hiltjo Posthuma
Date:   Fri, 25 May 2018 13:03:25 +0200

code-style for pledge(2)

feedback from Klemens, thanks

Diffstat:
Mpinentry-dmenu.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c @@ -33,12 +33,6 @@ #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) #define MINDESCLEN 8 -#ifdef __OpenBSD__ -#include <unistd.h> -#else -#define pledge(a,b) 0 -#endif - enum { SchemePrompt, SchemeNormal, SchemeSelect, SchemeDesc, SchemeLast }; enum { WinPin, WinConfirm }; enum { Ok, NotOk, Cancel }; @@ -684,8 +678,10 @@ cmdhandler(pinentry_t received_pinentry) { } lrpad = drw->fonts->h; +#ifdef __OpenBSD__ if (pledge("stdio rpath", NULL) < 0) die("pledge"); +#endif drw_setscheme(drw, scheme[SchemePrompt]);