diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:43 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:43 +0200 |
| commit | f038883a6e004eb4312ba1e761da06b596e14d3f (patch) | |
| tree | 358f989cac07885cfa913c66a0d563d18c021b26 /src | |
| parent | 98eac951f8087b213f5850bd126dcb279db360a8 (diff) | |
tagging ychat-0.7.7.0ychat-0.7.7.0
Diffstat (limited to 'src')
70 files changed, 1538 insertions, 2712 deletions
diff --git a/src/CVS/Entries b/src/CVS/Entries index 9f8fee6..f1ff71c 100644 --- a/src/CVS/Entries +++ b/src/CVS/Entries @@ -1,23 +1,21 @@ /Makefile.in/1.22/Tue Sep 7 17:14:39 2004// -/configure/1.39/Sun Mar 6 20:44:47 2005// -/glob.h/1.74/Wed Mar 9 21:09:31 2005// -/html.cpp/1.23/Wed Feb 23 20:23:31 2005// -/html.h/1.11/Wed Feb 23 03:12:05 2005// -/incl.h/1.7/Wed Feb 23 03:12:05 2005// -/logd.cpp/1.15/Sun Feb 27 06:28:53 2005// -/logd.h/1.11/Wed Feb 23 03:12:05 2005// -/main.cpp/1.38/Sun Mar 6 20:44:47 2005// -/modl.cpp/1.19/Sun Mar 6 20:44:47 2005// -/modl.h/1.11/Sun Mar 6 20:44:47 2005// -/msgs.h/1.207/Thu Mar 10 22:01:54 2005// +/configure/1.34/Thu Feb 17 00:25:26 2005// +/glob.h/1.60/Mon Feb 21 02:02:48 2005// +/html.cpp/1.20/Mon Feb 21 01:55:49 2005// +/html.h/1.10/Mon Feb 21 01:55:49 2005// +/incl.h/1.6/Sat Feb 19 11:08:50 2005// +/logd.cpp/1.12/Mon Feb 21 01:55:49 2005// +/logd.h/1.10/Mon Feb 21 01:55:49 2005// +/main.cpp/1.34/Mon Feb 21 01:55:49 2005// +/modl.cpp/1.18/Mon Feb 21 01:55:49 2005// +/modl.h/1.10/Mon Feb 21 01:55:49 2005// +/msgs.h/1.176/Mon Feb 21 02:02:48 2005// /name.cpp/1.8/Mon Feb 21 01:55:49 2005// /name.h/1.6/Mon Feb 21 01:55:49 2005// -/reqp.cpp/1.42/Sun Mar 6 20:44:47 2005// -/reqp.h/1.15/Wed Feb 23 03:12:05 2005// -/sign.cpp/1.3/Mon Mar 7 00:24:57 2005// -/sign.h/1.1/Fri Mar 4 02:41:30 2005// +/reqp.cpp/1.36/Mon Feb 21 01:55:49 2005// +/reqp.h/1.14/Mon Feb 21 01:55:49 2005// /stats.cpp/1.10/Mon Feb 21 01:55:49 2005// /stats.h/1.7/Mon Feb 21 01:55:49 2005// -/wrap.cpp/1.18/Sun Mar 6 20:44:47 2005// -/wrap.h/1.25/Sun Mar 6 20:44:47 2005// +/wrap.cpp/1.16/Mon Feb 21 01:55:49 2005// +/wrap.h/1.23/Mon Feb 21 01:55:49 2005// D diff --git a/src/Makefile.in b/src/Makefile.in index 6f43bf9..0382389 100755 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,17 +1,21 @@ -SRCS=chat.cpp s_chat.cpp conf.cpp s_conf.cpp cont.cpp html.cpp s_html.cpp lang.cpp s_lang.cpp main.cpp mutx.cpp s_mutx.cpp name.cpp pool.cpp reqp.cpp room.cpp sock.cpp s_sock.cpp thrd.cpp s_tool.cpp user.cpp sess.cpp sman.cpp s_sman.cpp -#logd.cpp modl.cpp s_modl.cpp cmnd.cpp -OBJS=$(SRCS:.cpp=.o) -CC=g++ -LDFLAGS=@LDFLAGS@ -lstdc++ -g -LDADD=-pthread -D_THREAD_SAFE +SRCS=WILLBEADDEDBYCONFIGURE +OBJS=$(addprefix ../obj/,$(SRCS:.cpp=.o)) +CC=WILLBEADDEDBYCONFIGURE +LIBADD=`cat libs.add` +LDFLAGS=$(LIBADD) -lstdc++ +LDADD=-pthread -D_THREAD_SAFE -export-dynamic -ldl +INCLUDES=`cat includes.add` +CFLAGS=-fno-inline -fno-default-inline -frepo all: ychat $(SRCS): - $(CC) $(CFLAGS) -c $*.cpp -ychat: $(OBJS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD) - @mv -f ychat .. -mrproper: clean - @rm -f Makefile config.log config.cache config.status - rm -f ../ychat -clean: - rm *.o + $(CC) $(INCLUDES) $(CFLAGS) -c $*.cpp +infotext: + @echo Compiling base +ychat: infotext $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD) + @mv ychat ../bin + @echo -n "Size of linked executable: " + @du -hc ../bin/ychat | tail -n 1 +clean: + @echo Cleaning base obj + @if test -d ../obj; then rm -Rf ../obj; fi diff --git a/src/chat/CVS/Entries b/src/chat/CVS/Entries index 1eaa9f0..7eb1a75 100644 --- a/src/chat/CVS/Entries +++ b/src/chat/CVS/Entries @@ -1,17 +1,17 @@ /base.h/1.8/Mon Feb 21 01:55:49 2005// /base.tmpl/1.6/Mon Feb 21 01:55:49 2005// -/chat.cpp/1.20/Fri Feb 25 00:15:38 2005// -/chat.h/1.12/Wed Feb 23 03:12:05 2005// +/chat.cpp/1.18/Mon Feb 21 01:55:49 2005// +/chat.h/1.11/Mon Feb 21 01:55:49 2005// /gcol.cpp/1.7/Mon Feb 21 01:55:49 2005// /gcol.h/1.5/Mon Feb 21 01:55:49 2005// /perm.cpp/1.10/Mon Feb 21 01:55:49 2005// /perm.h/1.8/Mon Feb 21 01:55:49 2005// -/room.cpp/1.11/Fri Mar 4 00:34:29 2005// -/room.h/1.8/Fri Mar 4 00:34:29 2005// +/room.cpp/1.10/Mon Feb 21 01:55:49 2005// +/room.h/1.7/Mon Feb 21 01:55:49 2005// /sess.cpp/1.6/Mon Feb 21 01:55:49 2005// /sess.h/1.6/Mon Feb 21 01:55:49 2005// /sman.cpp/1.11/Mon Feb 21 01:55:49 2005// /sman.h/1.6/Mon Feb 21 01:55:49 2005// -/user.cpp/1.18/Sun Mar 6 20:44:47 2005// +/user.cpp/1.16/Mon Feb 21 01:55:49 2005// /user.h/1.11/Mon Feb 21 01:55:49 2005// D diff --git a/src/chat/chat.cpp b/src/chat/chat.cpp index 0839261..019f939 100755 --- a/src/chat/chat.cpp +++ b/src/chat/chat.cpp @@ -74,7 +74,7 @@ chat::get_user_( room *room_obj, void *v_arg ) } void -chat::login( map<string,string> &map_params ) +chat::login( hashmap<string> &map_params ) { string s_user = map_params["nick"]; @@ -123,15 +123,6 @@ chat::login( map<string,string> &map_params ) return; } - // prove if maxpoolsize (threads) allows this login - else if ( !wrap::POOL->allow_user_login() ) - { - map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.maxuserlimit" ); - map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. - wrap::system_message( LOGINE5 + s_user); - return; - } - bool b_flag; // prove if nick is already online / logged in. @@ -279,7 +270,7 @@ chat::login( map<string,string> &map_params ) } void -chat::post( user* p_user, map<string,string> &map_params ) +chat::post( user* p_user, hashmap<string> &map_params ) { p_user->renew_timeout(); diff --git a/src/chat/chat.h b/src/chat/chat.h index 47645c3..8508508 100755 --- a/src/chat/chat.h +++ b/src/chat/chat.h @@ -46,10 +46,10 @@ public: static void get_user_( room* room_obj, void *v_arg ); // will be called every time a user tries to login. - void login( map<string,string> &map_params ); + void login( hashmap<string> &map_params ); // will be called if a user posts a message. - void post ( user* u_user, map<string,string> &map_params ); + void post ( user* u_user, hashmap<string> &map_params ); void del_elem( string s_name ) { diff --git a/src/chat/room.cpp b/src/chat/room.cpp index b927d40..00dc463 100755 --- a/src/chat/room.cpp +++ b/src/chat/room.cpp @@ -75,7 +75,8 @@ room::clean_room() void room::reload_onlineframe() { - javascript_post("parent.online.location.reload();"); + string s_msg = "<script language=\"JavaScript\"> parent.online.location.reload(); </script>\n"; + msg_post( &s_msg ); } void diff --git a/src/chat/room.h b/src/chat/room.h index 06b0a9a..572e68b 100755 --- a/src/chat/room.h +++ b/src/chat/room.h @@ -57,7 +57,6 @@ public: { msg_post( &s_msg ); } - void msg_post( string *p_msg ) { #ifdef LOGGING @@ -67,12 +66,6 @@ public: base<user>::msg_post( p_msg ); } - void javascript_post( string s_msg ) - { - string s_js = "<script language=\"JavaScript\">"+s_msg+"</script>\n"; - base<user>::msg_post( &s_js ); - } - string get_bold_name() { return "<b>" + get_name() + "</b>"; diff --git a/src/chat/user.cpp b/src/chat/user.cpp index d46f853..c5699e2 100755 --- a/src/chat/user.cpp +++ b/src/chat/user.cpp @@ -411,7 +411,7 @@ user::command( string &s_command ) string s_command2 = s_command.substr(0, pos2-1); s_mod.append( s_command2 ).append( ".so" ); - dynmod *mod = wrap::MODL->get_module( s_mod, get_name() ); + dynmod *mod = wrap::MODL->get_module( s_mod ); if ( mod == NULL || wrap::CHAT->get_command_disabled( s_command2 ) || @@ -454,7 +454,7 @@ user::command( string &s_command ) c->elem[2] = (void*) ¶ms; c->elem[3] = (void*) wrap::WRAP; - ( *(mod->the_func) ) ( static_cast<void*>(c) ); + ( *(mod->the_func) ) ( (void*) c ); delete c; } diff --git a/src/cli/CVS/Entries b/src/cli/CVS/Entries index 10c9656..a4cf157 100644 --- a/src/cli/CVS/Entries +++ b/src/cli/CVS/Entries @@ -1,3 +1,3 @@ -/cli.cpp/1.28/Mon Feb 28 18:03:02 2005// -/cli.h/1.13/Mon Feb 21 02:14:23 2005// +/cli.cpp/1.26/Mon Feb 21 01:55:49 2005// +/cli.h/1.12/Mon Feb 21 01:55:49 2005// D diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 96a0010..2956264 100755 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -30,15 +30,15 @@ cli::parse_input( string s_input ) if ( s_input.compare("help") == 0 || s_input.compare("h") == 0) { - cout << CLIPRMO << "COMMAND LINE INTERFACE HELP MENU" << endl - << CLIPRMO << " !command - Uses system to run a command" << endl; + cout << CLIPRMO << "COMMAND LINE INTERFACE HELP MENU" << endl; + cout << CLIPRMO << " !command - Uses system to run a command" << endl; #ifdef DEBUG cout << CLIPRMO << " (d)ebug - Starts debug routine (cli.cpp)" << endl; #endif - cout << CLIPRMO << " (e)cho VAR - Prints out configuration value of VAR" << endl; - cout << CLIPRMO << " Wildcards can be used too, example: echo http*" << endl; + cout << CLIPRMO << " (e)cho VAR - Prints out configuration value of VAR" << endl + << CLIPRMO << " Wildcards can be used too, example: echo http*" << endl; #ifdef NCURSES cout << CLIPRMO << " (ex)it - Quits CLI mode and respawns ncurses mode" << endl; @@ -70,9 +70,8 @@ cli::parse_input( string s_input ) system( s_input.substr(1).c_str() ); cout << CLIPRMI; } - #ifdef DEBUG - else if ( s_input.compare("d") == 0 || s_input.compare("debug") == 0 ) + else if( s_input.compare("d") == 0 || s_input.compare("debug") == 0 ) { debug_routine(); cout << CLIPRMI; diff --git a/src/cli/cli.h b/src/cli/cli.h index 23e1d1c..88b99ef 100755 --- a/src/cli/cli.h +++ b/src/cli/cli.h @@ -24,14 +24,13 @@ using namespace std; +class cli #ifndef NCURSES -class cli : public thro -{ -#else -class cli -{ + : public thro #endif -private: +{ + + private: int parse_input(string s_input); public: diff --git a/src/conf/CVS/Entries b/src/conf/CVS/Entries index cfb51ed..f88663f 100644 --- a/src/conf/CVS/Entries +++ b/src/conf/CVS/Entries @@ -1,3 +1,3 @@ -/conf.cpp/1.14/Sun Feb 27 06:28:53 2005// -/conf.h/1.11/Sun Feb 27 06:28:53 2005// +/conf.cpp/1.13/Mon Feb 21 01:55:49 2005// +/conf.h/1.10/Mon Feb 21 01:55:49 2005// D diff --git a/src/conf/conf.cpp b/src/conf/conf.cpp index 38c29c4..f053d85 100755 --- a/src/conf/conf.cpp +++ b/src/conf/conf.cpp @@ -36,7 +36,6 @@ conf::conf( string s_conf, map<string,string>* p_start_params ) : name::name( s_ cout << CFILEFA << endl; exit(1); } - else { cout << CFILEOK << "..." << endl; @@ -77,18 +76,12 @@ conf::parse_xml(TiXmlNode* p_node, vector<string>* p_vec) { //cout << p_vec->size() << ": (Value:" << p_child->Value() << ") (Type:" << p_child->Type() << ")" << endl; - if ( strcmp(p_child->Value(),"config") == 0 ) - { - parse_xml(p_child, p_vec); - } - - else if ( strcmp(p_child->Value(),"category") == 0 ) + if ( strcmp(p_child->Value(),"category") == 0 ) { p_vec->push_back(p_child->ToElement()->Attribute("name")); parse_xml(p_child, p_vec); p_vec->pop_back(); } - else if ( strcmp(p_child->Value(),"option") == 0 ) { string s_option_name = ""; @@ -171,10 +164,4 @@ conf::colored_error_msg(string s_key) } //*>> -int -conf::get_int(string s_key) -{ - return tool::string2int(get_elem(s_key)); -} - #endif diff --git a/src/conf/conf.h b/src/conf/conf.h index 5be2740..20aa91c 100755 --- a/src/conf/conf.h +++ b/src/conf/conf.h @@ -22,8 +22,7 @@ public: conf(string s_conf, map<string,string>* p_start_params); ~conf(); - string colored_error_msg(string s_key); //<< - int get_int(string s_key); + string colored_error_msg( string s_key ); //<< }; #endif diff --git a/src/configure b/src/configure index 8c5f0a7..7bb48df 100755 --- a/src/configure +++ b/src/configure @@ -1,1555 +1,262 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +#!/bin/sh +# +# The yChat Project (2003 - 2004) # -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] |
