/* eggdrop.h: header for eggdrop.c * * Copyright (C) 2002, 2003, 2004 Eggheads Development Team * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: eggdrop.h,v 1.49 2007-11-06 00:05:39 sven Exp $ */ #ifndef _EGG_EGGDROP_H_ #define _EGG_EGGDROP_H_ #ifndef NULL # define NULL 0 #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Gettext macros */ #ifdef ENABLE_NLS # include # define _(x) gettext(x) # define N_(x) gettext_noop(x) # define P_(x1, x2, n) ngettext(x1, x2, n) #else # define _(x) (x) # define N_(x) (x) # define P_(x1, x2, n) ( ((n) == 1) ? (x1) : (x2) ) #endif /* Bind table names for eggdrop events */ #define BTN_EVENT "event" #define egg_assert(test) \ do { \ if (!(test)) { \ fprintf (stderr, _("*** Assertion failed at %s in line %i: %s\n"), \ __FILE__, __LINE__, # test); \ return; \ } \ } while (0); #define egg_assert_val(test, val) \ do { \ if (!(test)) { \ fprintf (stderr, _("*** Assertion failed at %s in line %i: %s\n"), \ __FILE__, __LINE__, # test); \ return val; \ } \ } while (0); #define egg_return_if_fail(test) \ if (!(test)) return; #define egg_return_val_if_fail(test, val) \ if (!(test)) return val; extern int eggdrop_init(void); extern int eggdrop_shutdown(void); extern int eggdrop_event(const char *event); extern const char *eggdrop_get_param(const char *key); extern int eggdrop_set_params(const char **params, int nparams); #endif /* !_EGG_EGGDROP_H_ */