X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dwmblocks.c;h=88bdfb0b08f23616f70b6e2b08c643824eeea3a3;hb=9c9e08d2bc44f2c800c20ea9ac432133ff86d62e;hp=ad8e91cb0f26d865cf87b1c5fd4ccfb22443635b;hpb=377f9903318d89934593348cda91c3c8fef4158c;p=dwmblocks.git diff --git a/dwmblocks.c b/dwmblocks.c index ad8e91c..88bdfb0 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -16,12 +16,14 @@ typedef struct { void sighandler(int num); void replace(char *str, char old, char new); void getcmds(int time); +#ifndef __OpenBSD__ void getsigcmds(int signal); void setupsignals(); +void sighandler(int signum); +#endif int getstatus(char *str, char *last); void setroot(); void statusloop(); -void sighandler(int signum); void termhandler(int signum); @@ -72,6 +74,7 @@ void getcmds(int time) } } +#ifndef __OpenBSD__ void getsigcmds(int signal) { const Block *current; @@ -92,6 +95,7 @@ void setupsignals() } } +#endif int getstatus(char *str, char *last) { @@ -128,7 +132,9 @@ void pstdout() void statusloop() { +#ifndef __OpenBSD__ setupsignals(); +#endif int i = 0; getcmds(-1); while(statusContinue) @@ -140,12 +146,13 @@ void statusloop() } } - +#ifndef __OpenBSD__ void sighandler(int signum) { getsigcmds(signum-SIGRTMIN); writestatus(); } +#endif void termhandler(int signum) {