
#ifndef __UTIL_H
#define __UTIL_H

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <X11/X.h>


/* SVN Revision from autoconf-script stub */
#ifndef REVISION
#define REVISION "UNKNOWN"
#endif

/* Builddate stub */
#ifndef BUILDDATE
#define BUILDDATE "unknown"
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif


#define SPOT_MIN_WIDTH 0
#define SPOT_MIN_HEIGHT 0
#define SPOT_MAX_WIDTH 255
#define SPOT_MAX_HEIGHT 255


/* macros */
#define _ERROR if(!prefs_get_quiet())
#define _VERBOSE1 if(prefs_get_verbose() >= 1)
#define _VERBOSE2 if(prefs_get_verbose() >= 2)
#define _VERBOSE3 if(prefs_get_verbose() >= 3)
#define _VERBOSE4 if(prefs_get_verbose() >= 4)
#define _VERBOSE5 if(prefs_get_verbose() >= 5)


void u_print_help(char *name);
char *u_strReplace(const char *string, char *find, const char *replace);

#endif
