summaryrefslogtreecommitdiff
path: root/src/glob.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glob.h')
-rwxr-xr-x[-rw-r--r--]src/glob.h199
1 files changed, 80 insertions, 119 deletions
diff --git a/src/glob.h b/src/glob.h
index 66cada0..99954b0 100644..100755
--- a/src/glob.h
+++ b/src/glob.h
@@ -1,35 +1,11 @@
-/*:*
- *: File: ./src/glob.h
- *:
- *: yChat; Homepage: www.yChat.org; Version 0.7.9.5-RELEASE
- *:
- *: Copyright (C) 2003 Paul C. Buetow, Volker Richter
- *: Copyright (C) 2004 Paul C. Buetow
- *: Copyright (C) 2005 EXA Digital Solutions GbR
- *:
- *: 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.
- *:*/
-
/*
Notice:
-
+
All #defines which start with an CONFIG can be edited through
gmake config in the main directory!
*/
-#include "maps/hashmap.h"
+#include <map>
// global variables.
#ifndef GLOB_H
@@ -39,51 +15,79 @@
#define true 1
#define false 0
-//<<*
-/* FIRST THE YCHAT ONLY OPTIONS */
+/* - CONFIG -
+ What should be the name of the config file?
+*/
+#define CONFILE "ychat.conf"
/* - CONFIG -
+ In which prefix should yChat be installed if typing gmake inst-
+ all?
+*/
+#define PREFIX "/usr/local"
+
+//<<*
+/* - CONFIG -
Should yChat get compiled with database support? Currently MyS-
QL only is a supported database.
*/
-//#define DATABASE
+#define DATABASE
#ifdef DATABASE
-#define USE_MYSQL
-/* - CONFIG -
+/* - CONFIG -
Should all database queries printed out at the admin interface?
(This option wont take action if database support has not been
chosen)
*/
#define DATA_PRINT_QUERIES
+
+#define USE_MYSQL
#endif
+//*>>
/* - CONFIG -
- Defines the amount of newlines which have to be sent to the clie-
- nt's chat stream after the first log-in. It prevents a white scr-
- een because of browser buffers or proxies.
+ Please enter the highest networking port which is allowed to be
+ used. If yChat is unable to create the server socket on a cert-
+ ain port, it will increment the port number and retries to cre-
+ ate another socket on the incremented port number. This proced-
+ ure will continue until MAXPORT has been reached.
*/
-#define PUSHSTR 500
+#define MAXPORT 65535
-/* AFTERWARDS THE YCHAT AND YHTTPD OPTIONS */
-//*>>
+/* - CONFIG -
+ Please specify the maximum length of a line read from a socket
+ or a file. ( config-file, html-template )
+*/
+#define READSOCK 2048
-/* - CONFIG -
- Should yChat get compiled with comand line interface support?
+/* - CONFIG -
+ Please specify the size of a temporary buffer. (Will be used f-
+ or different tasks)
*/
-#define CLI
+#define READBUF 2048
-/* - CONFIG -
- What should be the name of the config file?
+/* - CONFIG -
+ Please specify the maximum length of a HTTP post request.
*/
-#define CONFILE "ychat.conf"
+#define POSTBUF 512
-/* - DISABLED -
- Enable debugging options.
+/* - CONFIG -
+ Please specify the maximum occupancy of the internal hash-map
+ data structures given in percentage. 0.9 means 90% iccupancy.
*/
-//#define DEBUG
+#define HMAPOCC .9
-/* - DISABLED -
+/* - CONFIG -
+ Please chose if you want to use verbose server outputs or not.
+ The verbose messages will appear in the ncurses menu if ncurses
+ is enabled or in the server-window if yChat has been compiled
+ without ncurses support. This option shows you all incoming
+ requests with the client IP and port numbers. You probably want
+ this to be turned off if you have heavy server load.
+*/
+//#define VERBOSE
+
+/* - CONFIG -
If you want to enable EXPERIMENTAL features, then set this val-
ue to true. Else use false which is recommended! All experimen-
al features are marked inside of the running yChat!
@@ -92,55 +96,19 @@
/* - CONFIG -
Should yChat get compiled with logging support?
-*/
+*/
#define LOGGING
/* - CONFIG -
- Please enter the highest networking port which is allowed to be
- used. If yChat is unable to create the server socket on a cert-
- ain port, it will increment the port number and retries to cre-
- ate another socket on the incremented port number. This proced-
- ure will continue until MAXPORT has been reached.
-*/
-#define MAXPORT 65535
-
-/* Specifies the max amount of lines to read from a HTTP request
- header
-*/
-#define MAXLINES 30
-
-/* Specifies the max length of a lines to read from a HTTP request
- header
-*/
-#define MAXLENGTH 1024
-
-/* - CONFIG -
Should yChat get compiled with ncurses support?
-*/
+*/
#define NCURSES
/* - CONFIG -
- Please specify the maximum length of a HTTP post request.
-*/
-#define POSTBUF 512
-
-/* - CONFIG -
- Please specify the size of a temporary buffer. (Will be used f-
- or different tasks)
-*/
-#define READBUF 2048
-
-/* - CONFIG -
- Please specify the maximum length of a line read from a socket
- or a file. ( config-file, html-template )
+ Should yChat get compiled with comand line interface support?
*/
-#define READSOCK 2048
+#define CLI
-/* - CONFIG -
- In which prefix should yChat be installed if typing gmake inst-
- all?
-*/
-#define PREFIX "/usr/local"
/* - CONFIG -
DO NOT USE TOGETHER WITH NCURSES! Displays important server mes-
@@ -150,65 +118,58 @@
*/
//#define SERVMSG
-/* - CONFIG -
- Set to true if you want yChat to catch the SIGSEGV signal. yChat
- will print a warning message into the system messages and will
- not core dump if an error occurs.
-*/
-//#define CTCSEGV
+// Enables debugging options
+//#define DEBUG
+//<<*
/* - CONFIG -
- Please chose if you want to use verbose server outputs or not.
- The verbose messages will appear in the ncurses menu if ncurses
- is enabled or in the server-window if yChat has been compiled
- without ncurses support. This option shows you all incoming
- requests with the client IP and port numbers. You probably want
- this to be turned off if you have heavy server load.
+ Defines the amount of newlines which have to be sent to the clie-
+ nt's chat stream after the first log-in. It prevents a white scr-
+ een because of browser buffers or proxies.
*/
-//#define VERBOSE
-
-
+#define PUSHSTR 500
+//*>>
// The following values define the positions of the data stats in the NCURSES interface.
#ifdef NCURSES
#define NCUR_SERVER_HEADER_X 21
-#define NCUR_SERVER_HEADER_Y 2
+#define NCUR_SERVER_HEADER_Y 2
#define NCUR_PORT_X 22
#define NCUR_PORT_Y 2
#define NCUR_HITS_X 23
#define NCUR_HITS_Y 2
#define NCUR_POOL_HEADER_X 21
-#define NCUR_POOL_HEADER_Y 16
-#define NCUR_POOL_WAIT_X 22
-#define NCUR_POOL_WAIT_Y 16
+#define NCUR_POOL_HEADER_Y 18
+#define NCUR_POOL_SIZE_X 22
+#define NCUR_POOL_SIZE_Y 18
#define NCUR_POOL_RUNNING_X 23
-#define NCUR_POOL_RUNNING_Y 16
+#define NCUR_POOL_RUNNING_Y 18
#define NCUR_DATA_HEADER_X 21
-#define NCUR_DATA_HEADER_Y 35
+#define NCUR_DATA_HEADER_Y 35
#define NCUR_GARBAGE_X 22
#define NCUR_GARBAGE_Y 35
-#define NCUR_CON_QUEUE_X 23
+#define NCUR_CON_QUEUE_X 23
#define NCUR_CON_QUEUE_Y 35
#define NCUR_CHAT_HEADER_X 21
#define NCUR_CHAT_HEADER_Y 52
#define NCUR_NUM_ROOMS_X 22
-#define NCUR_NUM_ROOMS_Y 52
+#define NCUR_NUM_ROOMS_Y 52
#define NCUR_SESSION_X 23
-#define NCUR_SESSION_Y 52
+#define NCUR_SESSION_Y 52
#define NCUR_CACHED_HEADER_X 21
-#define NCUR_CACHED_HEADER_Y 68
+#define NCUR_CACHED_HEADER_Y 68
#define NCUR_CACHED_DOCS_X 22
-#define NCUR_CACHED_DOCS_Y 68
-#define NCUR_CACHED_MODS_X 23
-#define NCUR_CACHED_MODS_Y 68
+#define NCUR_CACHED_DOCS_Y 68
+#define NCUR_CACHED_MODS_X 23
+#define NCUR_CACHED_MODS_Y 68
#define NCUR_MENU_CHAR_X 0
-#define NCUR_MENU_CHAR_Y 33
+#define NCUR_MENU_CHAR_Y 33
#define NCUR_UPTIME_X 0
#define NCUR_UPTIME_Y 44
#define NCUR_TIME_X 0
@@ -226,13 +187,13 @@ typedef int function( void *v_arg );
struct container
{
- void* elem[4];
+ void* elem[4];
};
struct dynmod
{
- function *the_func ;
- void *the_module;
+ function *the_func ;
+ void *the_module;
};
typedef enum method_ {