core.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright (C) 2000,2001 Florian Sander
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #ifndef assert
  19. #include <assert.h>
  20. #endif
  21. #ifndef Assert
  22. #define Assert assert
  23. #endif
  24. #ifdef NO_EGG
  25. #include "core/compat/noegg.h"
  26. #include "core/compat/noegg.c"
  27. #endif
  28. #ifndef NO_MEM_DEBUG
  29. #ifndef DYNAMIC_MEM_DEBUG
  30. #include "core/dynamic_mem_debug.c"
  31. #endif
  32. #endif
  33. #ifndef DYNAMIC_MEM_DEBUG
  34. # ifndef nmalloc
  35. # define nmalloc(x) malloc(x)
  36. # endif
  37. # ifndef nfree
  38. # define nfree(x) free(x)
  39. # endif
  40. # ifndef nreallc
  41. # define nrealloc(p, i) realloc(p, i)
  42. # endif
  43. #endif
  44. #ifndef Context
  45. #define Context
  46. #endif
  47. #include "core/generic_linked_list.c"
  48. #include "core/llists.c"
  49. #include "core/data.h"
  50. #include "core/schan.h"
  51. #include "core/schan_members.h"
  52. #include "core/userrec.h"
  53. #include "core/slang.h"
  54. #include "core/mini_httpd.h"
  55. #include "core/templates.h"
  56. #include "core/misc.h"
  57. static struct stats_global *sdata = NULL;
  58. static struct stats_userlist *suserlist = NULL;
  59. static struct slang_header *coreslangs = NULL;
  60. static struct llist_header schanset = {NULL, NULL, 0, schan_compare, schan_expmem, schan_free};
  61. #include "core/vars.c"
  62. #include "core/global_vars.c"
  63. #include "core/slang.c"
  64. #include "core/datahandling.c"
  65. #include "core/data_sorting.c"
  66. #include "core/mini_httpd.c"
  67. #include "core/slang_stats_commands.c"
  68. #include "core/schan.c"
  69. #include "core/schan_members.c"
  70. #include "core/schan_interface.c"
  71. #include "core/sensors.c"
  72. #include "core/userrec.c"
  73. #include "core/user.c"
  74. #include "core/templates.c"
  75. #include "core/templates_stats_commands.c"
  76. #include "core/templates_httpd_commands.c"
  77. #include "core/http_processing.c"
  78. #include "core/misc.c"
  79. static void stats_core_init()
  80. {
  81. sdata = NULL;
  82. suserlist = NULL;
  83. coreslangs = NULL;
  84. }
  85. static void stats_core_unload()
  86. {
  87. slang_free(coreslangs);
  88. }