aboutsummarylogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorAnselm R. Garbe2006-07-15 17:00:56 +0200
committerAnselm R. Garbe2006-07-15 17:00:56 +0200
commit936bbccb2135775fcd5f16360120484dd01ad156 (patch)
tree8c7e5dd9912fa57522eaa77e351fbdb72360f6fa /util.c
parent5bb4ab0472e6c63df319ad9af1110bf3c8f392f6 (diff)
downloadaur-936bbccb2135775fcd5f16360120484dd01ad156.tar.gz
proceeded with cleaning up, sorting functions, etc
Diffstat (limited to 'util.c')
-rw-r--r--util.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/util.c b/util.c
index 930b37492958..f7e3e6fe5fae 100644
--- a/util.c
+++ b/util.c
@@ -2,24 +2,15 @@
* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
+#include "dwm.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#include "dwm.h"
-
-void
-eprint(const char *errstr, ...) {
- va_list ap;
- va_start(ap, errstr);
- vfprintf(stderr, errstr, ap);
- va_end(ap);
- exit(1);
-}
+/* static functions */
static void
bad_malloc(unsigned int size)
@@ -29,6 +20,8 @@ bad_malloc(unsigned int size)
exit(1);
}
+/* extern functions */
+
void *
emallocz(unsigned int size)
{
@@ -39,6 +32,15 @@ emallocz(unsigned int size)
}
void
+eprint(const char *errstr, ...) {
+ va_list ap;
+ va_start(ap, errstr);
+ vfprintf(stderr, errstr, ap);
+ va_end(ap);
+ exit(1);
+}
+
+void
spawn(Arg *arg)
{
char **argv = (char **)arg->argv;