#ifndef _COMMON_H_
#define _COMMON_H_

/*
 * common.h
 *
 * a few simple things to make life easier
 *
 */

#define MSTRUCT(x) ((x*)malloc(sizeof(x)))

typedef struct wuzzah_config {
	const char *progname;
	char *infile;
	const char *buddy_msg;
	const char *status_msg;
	short write_users;
	int sleep_interval;
	char *whoami;
	short no_newline;
	const char *eventcmd;
	short run_once;
	short process_current;
	short noloadfile;
	char *extrabuddies;
	short all_users;
} wuzzah_config_t;

extern wuzzah_config_t g_config;

extern int errno;

void process_args(int ac, char *av[], wuzzah_config_t *conf);
int string_to_argv(const char *str, char **av[]);
void bail(char *reason, int exitval);

#endif
