1
0

eggmain.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * eggmain.h
  3. * include file to include most other include files
  4. *
  5. */
  6. #ifndef _EGG_MAIN_H
  7. #define _EGG_MAIN_H
  8. #ifdef HAVE_CONFIG_H
  9. # include "config.h"
  10. #endif
  11. #include "garble.h"
  12. #include <stdarg.h>
  13. #define EGG_VARARGS(type, name) (type name, ...)
  14. #define EGG_VARARGS_DEF(type, name) (type name, ...)
  15. #define EGG_VARARGS_START(type, name, list) (va_start(list, name), name)
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #ifdef HAVE_STRINGS_H
  20. # include <strings.h>
  21. #endif
  22. #include <sys/types.h>
  23. #include "lang.h"
  24. #include "eggdrop.h"
  25. #include "flags.h"
  26. #ifdef HAVE_ZLIB_H
  27. # include <zlib.h>
  28. #endif /* HAVE_ZLIB_H */
  29. #include "tclegg.h"
  30. #include "tclhash.h"
  31. #include "chan.h"
  32. #include "compat/compat.h"
  33. #ifndef MAKING_MODS
  34. extern struct dcc_table DCC_CHAT, DCC_BOT, DCC_LOST, DCC_BOT_NEW,
  35. DCC_RELAY, DCC_RELAYING, DCC_FORK_RELAY, DCC_PRE_RELAY, DCC_CHAT_PASS,
  36. DCC_FORK_BOT, DCC_SOCKET, DCC_TELNET_ID, DCC_TELNET_NEW, DCC_TELNET_PW,
  37. DCC_TELNET, DCC_IDENT, DCC_IDENTWAIT, DCC_DNSWAIT;
  38. #endif
  39. /* This macro copies (_len - 1) bytes from _source to _target. The
  40. * target string is NULL-terminated.
  41. */
  42. #define strncpyz(_target, _source, _len) do { \
  43. strncpy((_target), (_source), (_len) - 1); \
  44. (_target)[(_len) - 1] = 0; \
  45. } while (0)
  46. #endif /* _EGG_MAIN_H */