]> git.armaanb.net Git - dwmblocks.git/blobdiff - dwmblocks.c
Fixed argument order for gcc
[dwmblocks.git] / dwmblocks.c
index ad8e91cb0f26d865cf87b1c5fd4ccfb22443635b..2f3b774664cfca6eac7e016b946b1eed3088f9cf 100644 (file)
@@ -14,14 +14,15 @@ typedef struct {
        unsigned int signal;
 } Block;
 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);
 
 
@@ -35,14 +36,6 @@ static char statusstr[2][256];
 static int statusContinue = 1;
 static void (*writestatus) () = setroot;
 
-void replace(char *str, char old, char new)
-{
-       int N = strlen(str);
-       for(int i = 0; i < N; i++)
-               if(str[i] == old)
-                       str[i] = new;
-}
-
 //opens process *cmd and stores output in *output
 void getcmd(const Block *block, char *output)
 {
@@ -72,6 +65,7 @@ void getcmds(int time)
        }
 }
 
+#ifndef __OpenBSD__
 void getsigcmds(int signal)
 {
        const Block *current;
@@ -92,6 +86,7 @@ void setupsignals()
        }
 
 }
+#endif
 
 int getstatus(char *str, char *last)
 {
@@ -128,7 +123,9 @@ void pstdout()
 
 void statusloop()
 {
+#ifndef __OpenBSD__
        setupsignals();
+#endif
        int i = 0;
        getcmds(-1);
        while(statusContinue)
@@ -140,12 +137,13 @@ void statusloop()
        }
 }
 
-
+#ifndef __OpenBSD__
 void sighandler(int signum)
 {
        getsigcmds(signum-SIGRTMIN);
        writestatus();
 }
+#endif
 
 void termhandler(int signum)
 {