dwm-meillo

diff util.c @ 76:4bd49f404f10

proceeded with cleaning up, sorting functions, etc
author Anselm R. Garbe <garbeam@wmii.de>
date Sat, 15 Jul 2006 17:00:56 +0200
parents f08271b7cb20
children 052fe7498930
line diff
     1.1 --- a/util.c	Sat Jul 15 16:30:50 2006 +0200
     1.2 +++ b/util.c	Sat Jul 15 17:00:56 2006 +0200
     1.3 @@ -2,24 +2,15 @@
     1.4   * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
     1.5   * See LICENSE file for license details.
     1.6   */
     1.7 +#include "dwm.h"
     1.8  
     1.9  #include <stdarg.h>
    1.10  #include <stdio.h>
    1.11  #include <stdlib.h>
    1.12 -#include <sys/types.h>
    1.13  #include <sys/wait.h>
    1.14  #include <unistd.h>
    1.15  
    1.16 -#include "dwm.h"
    1.17 -
    1.18 -void
    1.19 -eprint(const char *errstr, ...) {
    1.20 -	va_list ap;
    1.21 -	va_start(ap, errstr);
    1.22 -	vfprintf(stderr, errstr, ap);
    1.23 -	va_end(ap);
    1.24 -	exit(1);
    1.25 -}
    1.26 +/* static functions */
    1.27  
    1.28  static void
    1.29  bad_malloc(unsigned int size)
    1.30 @@ -29,6 +20,8 @@
    1.31  	exit(1);
    1.32  }
    1.33  
    1.34 +/* extern functions */
    1.35 +
    1.36  void *
    1.37  emallocz(unsigned int size)
    1.38  {
    1.39 @@ -39,6 +32,15 @@
    1.40  }
    1.41  
    1.42  void
    1.43 +eprint(const char *errstr, ...) {
    1.44 +	va_list ap;
    1.45 +	va_start(ap, errstr);
    1.46 +	vfprintf(stderr, errstr, ap);
    1.47 +	va_end(ap);
    1.48 +	exit(1);
    1.49 +}
    1.50 +
    1.51 +void
    1.52  spawn(Arg *arg)
    1.53  {
    1.54  	char **argv = (char **)arg->argv;