proceeded with cleaning up, sorting functions, etc

This commit is contained in:
Anselm R. Garbe 2006-07-15 17:00:56 +02:00
parent dba23062ba
commit adaa28a6e6
7 changed files with 540 additions and 551 deletions

24
util.c
View file

@ -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)
{
@ -38,6 +31,15 @@ emallocz(unsigned int size)
return res;
}
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)
{