global_vars.c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (C) 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. static globstats *glob_globstats;
  19. static locstats *glob_locstats;
  20. static int glob_timerange, glob_sorting, glob_place, glob_cl_timerange;
  21. static int glob_au_percent, glob_wordplace, glob_graph_total, glob_range;
  22. static int glob_loginerror, glob_activity_timerange, glob_activity;
  23. static int glob_activity_percent, glob_top_start, glob_top_end;
  24. static char *glob_toptype, *glob_nick, *glob_word;
  25. static struct stats_url *glob_url;
  26. static float glob_au_users, glob_graph_percent, glob_graph_width_percent;
  27. static hoststr *glob_isp, *glob_tld;
  28. static topicstr *glob_topic;
  29. static struct stats_kick *glob_kick;
  30. static struct stats_quote *glob_kick_context;
  31. static wordstats *glob_wordstats;
  32. #ifndef NO_EGG
  33. //static memberlist *glob_chanmember;
  34. #endif
  35. static struct stats_member *glob_statsmember;
  36. static struct slang_header *glob_slang;
  37. static struct template_skin *glob_skin;
  38. static struct stats_userlist *glob_user;
  39. static void init_global_vars()
  40. {
  41. // slang_text_buffer = 0;
  42. }
  43. static void reset_global_vars()
  44. {
  45. glob_globstats = NULL;
  46. glob_locstats = NULL;
  47. glob_toptype = NULL;
  48. glob_timerange = T_ERROR;
  49. glob_sorting = T_ERROR;
  50. glob_place = 0;
  51. glob_au_users = 0.0;
  52. glob_au_percent = 0;
  53. glob_url = NULL;
  54. glob_isp = glob_tld = NULL;
  55. glob_topic = NULL;
  56. glob_kick = NULL;
  57. glob_kick_context = NULL;
  58. glob_wordstats = NULL;
  59. glob_wordplace = 0;
  60. #ifndef NO_EGG
  61. // glob_chanmember = NULL;
  62. #endif
  63. glob_statsmember = NULL;
  64. glob_graph_percent = 0.0;
  65. glob_graph_width_percent = 0.0;
  66. glob_slang = NULL;
  67. glob_nick = NULL;
  68. glob_range = 0;
  69. glob_word = NULL;
  70. glob_loginerror = 0;
  71. glob_user = NULL;
  72. glob_activity_timerange = glob_activity = glob_activity_percent = 0;
  73. glob_cl_timerange = 0;
  74. glob_top_start = 1;
  75. glob_top_end = webnr;
  76. }
  77. static void free_global_vars()
  78. {
  79. Context;
  80. }