summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
commitd3a0d11f93c1ebe38b4301c9bef952bfd24d01a1 (patch)
treefdcac37e722884d4a71e9dd96443ed76a3533103
parented634bc556af8997b9d2d5bf7334073731936365 (diff)
tagging ychat-0.8.1ychat-0.8.1
-rw-r--r--CHANGES11
-rwxr-xr-xMakefile107
-rwxr-xr-xREADME12
-rw-r--r--RELEASES4
-rwxr-xr-xhtml/frameset.html12
-rwxr-xr-xhtml/index.html63
-rwxr-xr-xhtml/input.html48
-rwxr-xr-xhtml/notfound.html4
-rwxr-xr-xhtml/online.html18
-rwxr-xr-xhtml/stream.html43
-rwxr-xr-xscripts/config.pl75
-rwxr-xr-xsrc/chat/chat.cpp2
-rwxr-xr-xsrc/configure139
-rwxr-xr-x[-rw-r--r--]src/msgs.h6
14 files changed, 344 insertions, 200 deletions
diff --git a/CHANGES b/CHANGES
index 104ec00..9b5ebf8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,13 +1,4 @@
--Changes from 0.8.1-RELEASE to 0.8.2-RELEASE
-$ Fixed some typos
-$ Added the - Versioning - paragraph into the README file
-$ Removed the yc_template command module source file
-$ scripts/config.pl now also accepts q and quit as a command
-$ Minor bugfix in scripts/config.pl
-$ Some improvements in src/configure
-$ Changed some default values in the src/glob.h
-
--Changes from 0.8-RELEASE to 0.8.1-RELEASE
+-Changes from 0.8-RELEASE to 0.8.1-CURRENT
$ Fixed a HTML bug in the stream html (h1 should get closed w/ /h1)
$ Fixed some typos in the README
$ Fixed a bug in the /q command
diff --git a/Makefile b/Makefile
index 7506171..27a8d90 100755
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,95 @@
-SRCS=base.cpp chat.cpp CHAT.cpp cmnd.cpp conf.cpp CONF.cpp cont.cpp html.cpp HTML.cpp main.cpp mutx.cpp MUTX.cpp name.cpp pool.cpp reqp.cpp room.cpp sock.cpp SOCK.cpp thrd.cpp TOOL.cpp user.cpp
-OBJS=$(SRCS:.cpp=.o)
-CC=c++
-LDFLAGS=-lstdc++ -g
-LDADD=-pthread -D_THREAD_SAFE
-all: ychat
-$(SRCS):
- $(CC) $(CFLAGS) -c $*.cpp
-ychat: $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD)
-clean:
- rm *.o
+MAKE=`tail -n 1 make.version`
+PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2`
+all: version base modules
+ @echo "Now edit the ychat.conf and run ychat!"
+ @echo "The config file is searched in the following order:"
+ @echo " ./ychat.conf "
+ @echo " ~/.ychat/ychat.conf "
+ @echo " ./etc/ychat.conf "
+ @echo " /etc/ychat.conf "
+ @echo " $(PREFIX)/etc/ychat.conf "
+ @echo If you want to help the yChat project please run gmake mail
+ @echo so that the developers receive an email about the platform
+ @echo being used.
+ @echo WARNING! This software is EXPERIMENTAL!
+mail:
+ @echo "VERSION:" > mail.tmp
+ @${MAKE} version >> mail.tmp
+ @echo >> mail.tmp
+ @echo "UNAME:" >> mail.tmp
+ @uname -a >> mail.tmp
+ @echo >> mail.tmp
+ @echo "DATE:" >> mail.tmp
+ @date >> mail.tmp
+ @echo >> mail.tmp
+ @echo "COMPILER AND MAKE:" >> mail.tmp
+ @cat g++.version make.version >> mail.tmp
+ @cat mail.tmp | mail -s "Successfull build of yChat" successfullbuild@yhttpd.org
+ @rm -f mail.tmp
+install: deinstall
+uninstall: deinstall
+deinstall:
+ @echo Install/deinstall is not supported!
+ @echo Start yChat with ./bin/ychat instead!
+ @exit 1
+modules:
+ @if test -d ./src/mods; then ${MAKE} -C ./src/mods; fi
+clean_modules:
+ @if test -d ./src/mods; then ${MAKE} -C ./src/mods clean; fi
+base:
+ @if test -f bin/ychat; then echo "Backing up old binary";if test -f bin/ychat.old; then rm -f bin/ychat.old; fi; mv bin/ychat bin/ychat.old; fi
+ @perl ./scripts/buildnr.pl
+ @perl ./scripts/setglobvals.pl
+ @${MAKE} -C ./src
+clean_base:
+ @${MAKE} -C ./src clean
+stats:
+ @perl scripts/stats.pl
+run:
+ ./bin/ychat
+base_start: base
+ ./bin/ychat
+gpl:
+ @more COPYING
+#//<<*
+yhttpdbase:
+ @perl scripts/makeyhttpd.pl || echo "You need to have perl to do this!"
+ @echo yhttpd code base has been generated in ../yhttpd
+#//*>>
+clean: clean_base clean_modules
+help:
+ @echo "You may run ${MAKE} with the following parameters:"
+ @grep "^ ${MAKE} " README
+ @echo "For more questions read the README file or contact mail@ychat.org!"
+setup:
+ @./configure
+ @${MAKE}
+config:
+ @sh -c "scripts/config.sh"
+ @echo If you run ${MAKE} config from the command line then you may need
+ @echo to rerun ./configure and recompile all now!
+
+mrproper: clean
+ @if test -f src/glob.h.org; then mv -f src/glob.h.org src/glob.h;fi
+ @if test -f g++.version; then rm -f g++.version; fi
+ @if test -f make.version; then rm -f make.version; fi
+ @if test -f src/Makefile; then rm -f src/Makefile; fi
+ @if test -f bin/ychat; then find bin/ -name "*ychat*" | xargs rm -f; fi
+ @if test -d src/mods; then find src/mods/*/ -name Makefile | xargs rm -f; fi
+ @find . -name "*.add" | xargs rm -f
+ @ls | grep core | xargs rm -f
+version:
+ @./scripts/version.sh
+debug:
+ @gdb bin/ychat ychat.core
+confdebug:
+ ./configure -g3 -ggdb
+dist:
+ @./scripts/makedist.sh
+ssltest:
+ openssl genrsa -des3 -out privkey.pem 2048
+ openssl req -new -x509 -key privkey.pem -out cert.pem -days 1095
+ @mv -f privkey.pem cert.pem etc
+
+
+
diff --git a/README b/README
index 81d32b1..324e560 100755
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-yChat; Homepage: www.yChat.org; Version 0.8.2-CURRENT
+yChat; Homepage: www.yChat.org; Version 0.8.1-RELEASE
Copyright (C) 2003 Paul C. Buetow, Volker Richter
Copyright (C) 2004 Paul C. Buetow
@@ -119,16 +119,6 @@ The short name of the chat is "yC"
The short name of the httpd is "yh"
The short name of ycurses is "yu"
-- Versioning -
-In general, versions are made up like X.Y.Z.W. X specifies the major version,
-Y specifies the branch of the major version, Z specifies a sub revision
-of a specific branch. The optional W can be used to specify a maintenance
-revision which only changes small issues. Version numbers can be also normal
-alphabetic characters. Example: Version 0.7.A follows 0.7.9. Version 0.T.Y.2
-would be also valid.
-
-Therefore: The lowest value is 0, the highest possible value is Z.
-
//<<*
1.2.0 YCHAT FEATURES
diff --git a/RELEASES b/RELEASES
index dae0e67..1d62ebc 100644
--- a/RELEASES
+++ b/RELEASES
@@ -5,10 +5,8 @@ Release date Release name and version Release focus
Planing: yChat 0.7.9.4-STABLERELEASE Maintenance
Planing: ycurses 0.1-RELEASE________ Initial release
Planing: yhttpd 0.8-RELEASE_________ Features
-Planing: yChat 0.9.0-RELEASE________ Major rewrite
-Planing: yChat 0.8.3-RELEASE________ Not yet defined
+Planing: yChat 0.8.2-RELEASE________ Features
-Aug 04th 05: yChat 0.8.2-RELEASE Minor enhancements
Jun 21st 05: yChat 0.8.1-RELEASE Major features
May 25th 05: yChat 0.8.0-RELEASE Major features
May 08th 05: yChat 0.7.9.3-STABLERELEASE Security bugfixes
diff --git a/html/frameset.html b/html/frameset.html
index fe6b973..672f8fa 100755
--- a/html/frameset.html
+++ b/html/frameset.html
@@ -1,19 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
- %%PGETITLE%%
+ %%ychat.version%%
</title>
</head>
- <frameset rows="*,60">
+ <frameset boders="0" rows="*,70">
<noframes>
Your browser does not support frames,
</noframes>
<frameset cols="*,150">
- <frame src="stream.html?event=stream&nick=%%nick%%&tmpid=%%tmpid%%" name="stream">
- <frame src="online.html?event=online&nick=%%nick%%&tmpid=%%tmpid%%" name="online">
+ <frame src="stream.html?event=stream&tmpid=%%tmpid%%" name="stream">
+ <frame src="online.html?event=online&tmpid=%%tmpid%%" name="online">
</frameset>
<frameset rows="*,0">
- <frame src="input.html?event=input&nick=%%nick%%&tmpid=%%tmpid%%" name="input">
+ <frame src="input.html?event=input&tmpid=%%tmpid%%" name="input">
<frame src="blank.html" name="blank">
</frameset>
</frameset>
diff --git a/html/index.html b/html/index.html
index 172c851..983e7ef 100755
--- a/html/index.html
+++ b/html/index.html
@@ -1,31 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
- %%PGETITLE%%
+ %%ychat.version%%
</title>
+<link rel=stylesheet href="style.css" type=text/css>
</head>
<body>
-Welcome to
-<pre>
- ___ _ _
- _ _ / __\ |__ __ _| |_
-| | | |/ / | '_ \ / _` | __|
-| |_| / /___| | | | (_| | |_
- \__, \____/|_| |_|\__,_|\__|
- |___/
-</pre>
-
-<br>
-%%PGETITLE%%
-<br>
-<br>
-%%INFO%%
-Enter your nick:
+<table align=center width=500>
+<tr>
+<td>
+<center>
+%%ychat.version%%<br><br>%%INFO%%
+</center>
+</td>
+</tr>
+<tr>
+<td colspan=2>&nbsp;</td>
+</tr>
+<tr>
+<td align=center colspan=2>
<form action="frameset.html" method="POST">
<input type="hidden" name="event" value="login">
- <input type="hidden" name="room" value="%%STRDROOM%%">
- <input type="text" name="nick">
- <input type="submit" value="login">
+Enter your nick:<br>
+ <input class="text" type="text" name="nick" value="%%nick%%" maxlength="%%chat.maxlength.username%%" accesskey="n">
+<br>
+<br>
+Enter your password:<br>
+ <input class="text" type="password" name="password" value="%%pass%%" maxlength="%%chat.maxlength.password%%" accesskey="p">
+<br>
+<br>
+Enter your room:<br>
+ <input class="text" type="text" name="room" value="%%chat.defaultroom%%" maxlength="%%chat.maxlength.roomname%%" accesskey="r">
+<br>
+<br>
+ <input type="hidden" name="end" value="end">
+ <input type="submit" value="login" accesskey="s">
</form>
+<br>
+<a class="fancy" href="register.html">Register</a> a new nick
+<br>
+<br>
+If you don't want to register you may login
+<br>
+without a password using an unregistered nick.
+</td>
+</tr>
+</table>
+<br><br>
+<center><span class="signature">yChat is OpenSource - get it at <a class="fancy" target="_blank" href="http://www.yChat.org">http://www.yChat.org</a></span></center>
</body>
</html>
diff --git a/html/input.html b/html/input.html
index e6fb016..31ed9fe 100755
--- a/html/input.html
+++ b/html/input.html
@@ -1,32 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
- <head>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
- %%PGETITLE%%
+ %%HTML_TITLE_TAG_CONTENT%%
</title>
+ <link rel=stylesheet href="style.css" type=text/css>
<script language="JavaScript">
<!--
function delout()
{
- document.input.message.focus();
- document.input.message.select();
+ document.input.message.value = document.input.message.value.replace(/&/g, '\\AND');
document.input.submit();
+ document.input.message.value = "";
+ document.input.message.focus();
return false;
}
function selectinput()
{
document.input.message.select();
}
+ function popup(site,width,height)
+ {
+ var left = (screen.availWidth-width)/2;
+ var top = (screen.availHeight-height)/2;
+ var win = window.open(site,"_blank","width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes");
+ }
+ function chgscroll(f)
+ {
+ if(f.checked)
+ parent.stream.autoscroll();
+ else
+ parent.stream.stopscroll();
+ }
//-->
</script>
</head>
<body>
- <form name="input" action="input.html" target="blank" onsubmit="return delout();">
- <input type="hidden" name="event" value="post">
- <input type="hidden" name="nick" value="%%nick%%">
+ <form method="GET" name="input" action="input.html" target="blank" onsubmit="return delout();">
+ <div style="position: absolute; top: 5px;">
+ <input class="text" type="text" name="message" size="60" maxlength="%%chat.maxlength.message%%">
+ <input type="submit" value="Send" accesskey='s'>
+ <input type="button" value="Select" accesskey='e' onclick="javascript:selectinput();">
+ </div>
+ <div style="position: absolute; top: 29px;">
+ <a href='#' class="fancy" onclick="javascript:popup('colors.html?event=colors&tmpid=%%tmpid%%', 600, 480)">Colors</a>
+ <a href='#' class="fancy" onclick="javascript:popup('options.html?event=options&tmpid=%%tmpid%%', 600, 480)">Options</a>
+ <a href='#' class="fancy" onclick="javascript:popup('help.html?event=help&tmpid=%%tmpid%%', 600, 480)">Help</a>
+ <a href='#' class="fancy" onclick="javascript:popup('loggedin.html?event=loggedin&tmpid=%%tmpid%%', 600, 480)">Users</a>
+ <a href='#' class="fancy" onclick="javascript:popup('admin.html?event=admin&tmpid=%%tmpid%%', 600, 480)">Admin</a>
+ <a href='input.html?event=input&tmpid=%%tmpid%%&message=%2Fq' class="fancy" target='blank'>Logout</a>
+ Scrolling:
+ <input type="checkbox" name="scroll" checked onClick="chgscroll(this);">
+ </div>
+ <input type="hidden" name="event" value="input">
<input type="hidden" name="tmpid" value="%%tmpid%%">
- <input type="text" name="message" size="50">
- <input type="submit" value="send">
- <input type="button" value="select" onclick="javascript:selectinput();">
</form>
</body>
</html>
diff --git a/html/notfound.html b/html/notfound.html
index 574e341..a14d44b 100755
--- a/html/notfound.html
+++ b/html/notfound.html
@@ -1,7 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
- %%PGETITLE%%
+ %%HTML_TITLE_TAG_CONTENT%%
</title>
</head>
<body>
diff --git a/html/online.html b/html/online.html
index 7f29b0e..3eda553 100755
--- a/html/online.html
+++ b/html/online.html
@@ -1,6 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
- <meta http-equiv="refresh" content="20">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <link rel=stylesheet href="style.css" type=text/css>
+ </head>
<body>
- %%MESSAGE%%
+ <b>%%room%%</b>
+ <br>
+ <br>
+ <table>
+ <tr>
+ <td>
+ %%topic%%
+ </td>
+ </tr>
+ %%userlist%%
+ </table>
</body>
</html>
diff --git a/html/stream.html b/html/stream.html
index 66f8bbd..4814979 100755
--- a/html/stream.html
+++ b/html/stream.html
@@ -1,29 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
- <head>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
- %%PGETITLE%%
+ %%HTML_TITLE_TAG_CONTENT%%
</title>
+<link rel=stylesheet href="style.css" type=text/css>
<script language="JavaScript">
- function autoScroll()
+ var scrolling;
+ var ison;
+ function autoscroll()
{
- window.scroll(1, 50000 );
- timer = setTimeout('autoScroll()',200);
+ if(!ison){
+ scrolling = window.setInterval("window.scroll(1,1606682)",70);
+ ison = true;
+ }
}
-
- autoScroll();
-
- function stopScroll()
+ function stopscroll()
{
- clearTimeout(timer);
- }
-
- function startScroll()
- {
- timer = setTimeout('autoScroll()', 200);
+ if(ison)
+ {
+ window.clearInterval(scrolling);
+ ison = false;
+ }
}
</script>
</head>
-<body>
- Welcome to yChat %%nick%%!
+<body class="stream">
+<h1>Engine: %%ychat.version%%</h1>
+<script language="JavaScript">
+ autoscroll();
+</script>
+
+ Welcome to the chat, %%nick%%!
<br>
<br>
+
diff --git a/scripts/config.pl b/scripts/config.pl
index 73b3ae5..79b1c49 100755
--- a/scripts/config.pl
+++ b/scripts/config.pl
@@ -18,14 +18,17 @@ END
my $sep = "================================================================\n";
my $stdin;
-for (;;) {
+for (;;)
+{
print "$sep Do you want to use the default before-compile options?\n";
print " (yes/no) [default is NO] ";
$stdin = <STDIN>;
chomp $stdin;
+ prove_if_default(\$stdin);
print "\n";
- if ( $stdin eq "yes") {
+ if ( $stdin eq "yes")
+ {
print " You chose to use all the default before-compile options. Exiti-\n";
print " ng the configurator now!\n";
print $sep;
@@ -41,37 +44,46 @@ for (;;) {
my @glob = fopen("src/glob.h.org");
my $flag = 0;
-for (@glob) {
- if ( $flag == 0 && /- CONFIG -/ ) {
+for (@glob)
+{
+ if ( $flag == 0 && /- CONFIG -/ )
+ {
print $sep;
$flag = 1;
next;
+ }
- } elsif ( $flag == 1 ) {
- if ( /\*\// ) {
+ elsif ( $flag == 1 )
+ {
+ if ( /\*\// )
+ {
$flag = 2;
+ }
- } else {
+ else
+ {
print;
}
next;
+ }
- } elsif ( $flag == 2 ) {
- if ( /#define (.+) (.+)/ ) {
+ elsif ( $flag == 2 )
+ {
+ if ( /#define (.+) (.+)/ )
+ {
my $def = $1;
my $val = $2;
my $flg = 0;
$flg = 1 if $val =~ s/"//g;
- print " [Press enter to use default value: $val or q to quit] ";
+ print " [Press enter to use default value: $val] ";
$stdin = <STDIN>;
chomp $stdin;
- finish() if $stdin eq "q" or $stdin eq "quit";
-
- unless ( parse_input_value(\$stdin,\$val) ) {
+ unless ( prove_if_default(\$stdin) )
+ {
$stdin = "\"$stdin\"" if $flg == 1;
$_ = "#define $def $stdin\n";
}
@@ -81,28 +93,33 @@ for (@glob) {
next;
}
- elsif ( /#define .+/ ) {
+ elsif ( /#define .+/ )
+ {
my $default = "true";
my $stdin;
- for (;;) {
+ for (;;)
+ {
$default = "false" if /\/\/#define/;
- print " [Press enter to use default value: $default or q to quit] ";
+ print " [Press enter to use default value: $default] ";
$stdin = <STDIN>;
chomp $stdin;
- finish() if $stdin eq "q" or $stdin eq "quit";
last if $stdin eq "" || $stdin eq "true" || $stdin eq "false";
print " Wrong input: You need to specify true or false!\n";
}
- if ( $default eq "true" ) {
- $_ = "//$_" unless parse_input_value(\$stdin,\$default);
+ if ( $default eq "true" )
+ {
+ $_ = "//$_"
+ unless prove_if_default(\$stdin);
}
- else {
- s/^\/\/// unless parse_input_value(\$stdin,\$default);
+ else
+ {
+ s/^\/\///
+ unless prove_if_default(\$stdin);
}
print "\n";
@@ -112,22 +129,16 @@ for (@glob) {
}
} // for
-finish();
-
-sub finish() {
- fwrite("src/glob.h", @glob);
- exit 0;
-}
+ fwrite("src/glob.h", @glob);
-sub parse_input_value {
+sub prove_if_default
+{
my $val = shift;
- my $def = shift;
-
- if ( $$val eq "" || $$val eq $$def) {
+ if ( $$val eq "" )
+ {
print " -> Using default option!\n";
return 1;
}
-
print " -> Using new option $$val!\n";
return 0;
}
diff --git a/src/chat/chat.cpp b/src/chat/chat.cpp
index ed8f48d..d890d70 100755
--- a/src/chat/chat.cpp
+++ b/src/chat/chat.cpp
@@ -170,6 +170,7 @@ chat::login( map<string,string> &map_params )
map_params["tmpid"] = p_sess->get_tmpid();
p_user->set_tmpid( map_params["tmpid"] );
p_user->set_has_sess( true );
+ wrap::system_message("New tmpid: " + map_params["tmpid"] );
}
}
else // if ( p_user == NULL ) // If not in garbage create a new user!
@@ -223,6 +224,7 @@ chat::login( map<string,string> &map_params )
sess* p_sess = wrap::SMAN->create_session();
p_sess->set_user(p_user);
map_params["tmpid"] = p_sess->get_tmpid();
+ wrap::system_message("New tmpid: " + map_params["tmpid"] );
p_user->set_tmpid( map_params["tmpid"] );
p_user->set_col1( map_params["color1"] );
p_user->set_col2( map_params["color2"] );
diff --git a/src/configure b/src/configure
index 43854d8..55df52b 100755
--- a/src/configure
+++ b/src/configure
@@ -64,76 +64,42 @@ perl -e '
"/opt/local/lib"
);
- my %dependfiles = (
- database => ["data"],
- ycurses => ["curses", "ycui.cpp", "ycui.h"],
- logging => ["logd.cpp", "logd.h"],
- cli => ["cli"],
- opnssl => ["sock/sslsock.cpp", "sock/sslsock.h"]
- );
-
open FILE, "glob.h" or die "glob.h: $!\n";
- while(<FILE>) {
- if ( /\/\/#define DATABASE/ ) {
+ while(<FILE>)
+ {
+ if ( /\/\/#define DATABASE/ )
+ {
remove_from_array("mysql/mysql.h",\@headers);
remove_from_array("libmysqlclient.so",\@libs);
- mkdir "../backuped" unless -d "../backuped";
- `mv $_ ../backuped` for @{$dependfiles{database}};
- }
-
- elsif ( /^#define DATABASE/ && !-d "data") {
- `mv ../backuped/$_ .` for @{$dependfiles{database}};
- }
-
- if ( /\/\/#define LOGGING/ ) {
- mkdir "../backuped" unless -d "../backuped";
- `mv $_ ../backuped` for @{$dependfiles{logging}};
- }
-
- elsif ( /^#define LOGGING/ && !-f "logd.cpp") {
- `mv ../backuped/$_ .` for @{$dependfiles{logging}};
- }
-
- if ( /\/\/#define CLI/ ) {
- mkdir "../backuped" unless -d "../backuped";
- `mv $_ ../backuped` for @{$dependfiles{cli}};
}
- elsif ( /^#define CLI/ && !-d "cli") {
- `mv ../backuped/$_ .` for @{$dependfiles{cli}};
+ if ( /\/\/#define NCURSES/ )
+ {
+ remove_from_array("ncurses.h",\@headers);
+ remove_from_array("libncurses.so",\@libs);
}
- if ( /\/\/#define YCURSES/ ) {
- for ("ncurses", "menu", "panel") {
- remove_from_array("$_.h",\@headers);
- remove_from_array("lib$_.so",\@libs);
- }
-
- mkdir "../backuped" unless -d "../backuped";
- `mv $_ ../backuped` for @{$dependfiles{ycurses}};
- }
-
- elsif ( /^#define YCURSES/ && !-d "curses") {
- `mv ../backuped/$_ .` for @{$dependfiles{ycurses}};
- }
-
- if ( /\/\/#define OPENSSL/ ) {
+ if ( /\/\/#define OPENSSL/ )
+ {
remove_from_array("openssl/ssl.h",\@headers);
remove_from_array("lib$_.so",\@libs) for ("ssl", "crypto");
}
}
close FILE;
- if ( defined $ENV{YCHATHEADERPATHS} ) {
- map { print "Adding $_...\n"; unshift @headerpaths, $_ }
- split /:/, $ENV{YCHATHEADERPATHS};
+ if ( defined $ENV{YCHATHEADERPATHS} )
+ {
+ map { print "Adding $_...\n";
+ unshift @headerpaths, $_ } split /:/, $ENV{YCHATHEADERPATHS};
}
- if ( defined $ENV{YCHATLIBPATHS} ) {
- map { print "Adding $_...\n"; unshift @libpaths, $_ }
- split /:/, $ENV{YCHATLIBPATHS};
+ if ( defined $ENV{YCHATLIBPATHS} )
+ {
+ map { print "Adding $_...\n";
+ unshift @libpaths, $_ } split /:/, $ENV{YCHATLIBPATHS};
}
+
print "Headers:\n";
my $testit = 0;
@@ -148,7 +114,10 @@ perl -e '
my $incadd = &make_add("-I", \%incadd);
my $libadd = &make_add("-L", \%libadd);
- for ( @libs ) { $libadd .= "-l$_ " if s/^lib// and s/\.so$//; }
+ for ( @libs )
+ {
+ $libadd .= "-l$_ " if s/^lib// and s/\.so$//;
+ }
print "Incadd: $incadd\n";
print "Libadd: $libadd\n";
@@ -175,7 +144,8 @@ perl -e '
chomp $cpp;
chomp $version;
- while (<Fin>) {
+ while (<Fin>)
+ {
s/^(CC=).*\n/$1$compiler/;
s/^(SRCS=).*/$1$cpp/;
s/ -frepo//; # unless $version =~ /3\.4/;
@@ -189,7 +159,8 @@ perl -e '
my $args = join(" -",@ARGV);
$args = "-".$args unless $args eq "";
- for my $cppfile (split / /, $cpp) {
+ for my $cppfile (split / /, $cpp)
+ {
my $ofile = $cppfile;
$ofile =~ s/\.cpp/\.o/;
print Fout "../obj/$ofile: $cppfile\n";
@@ -198,12 +169,14 @@ perl -e '
$class =~ s/\.o//;
my $text;
- if ( $class =~ /contrib\/.+/ ) {
+ if ( $class =~ /contrib\/.+/ )
+ {
my $dirname = `dirname $class`;
$text = "\t\@echo -n \"Contributed class $class \"\n";
}
- else {
+ else
+ {
$text = "\t\@echo -n \"Base class $class \"\n";
}
@@ -219,14 +192,16 @@ perl -e '
unlink("msgs.h");
open F, ">msgs.h" or die "msgs.h: $!\n";
- for (@msgs) {
+ for (@msgs)
+ {
s/(UNAME)(.+)$/UNAME "$uname"/;
s/(COMPOPT)(.+)$/COMPOPT "$compopt"/;
print F;
}
close F;
- if ( -d "mods" ) {
+ if ( -d "mods" )
+ {
chdir("mods");
my $cflags = "-fno-inline -fno-default-inline";
@@ -237,12 +212,15 @@ perl -e '
chdir("..");
}
- sub remove_from_array {
+ sub remove_from_array
+ {
my $elem = shift;
my $array = shift;
- for ( my $i = 0; $i <= $#$array; ++$i ) {
- if ( $$array[$i] eq $elem ) {
+ for ( my $i = 0; $i <= $#$array; ++$i )
+ {
+ if ( $$array[$i] eq $elem )
+ {
splice(@$array,$i,1);
last;
}
@@ -266,18 +244,24 @@ perl -e '
pop(@_);
}
- if ($print) {
+ if ($print)
+ {
print "Checking for $check...";
print "\n" if $testit;
}
- for (@_) {
- if ( -f "$_/$check" ) {
- if ($testit) {
+ for (@_)
+ {
+ if ( -f "$_/$check" )
+ {
+ if ($testit)
+ {
return $_ if test_include($_, $check);
return "";
+ }
- } else {
+ else
+ {
print "OK\n";
return "" if $_ eq "/usr/lib" or $_ eq "/usr/include";
return $_;
@@ -285,20 +269,23 @@ perl -e '
}
}
- for (@_) {
+ for (@_)
+ {
next unless -d $_;
opendir D, $_ or warn "$_: $!\n";
my @dir = readdir(D);
closedir D;
- for my $dir ( @dir ) {
+ for my $dir ( @dir )
+ {
next if $dir =~ /^\.+$/ or !-d "$_/$dir";
my $path = &check($deep-1, $check, "$_/$dir", "subsearch");
return $path if $path ne "";
}
}
- if ($print) {
+ if ($print)
+ {
print "NOT OK\n";
print "Please make sure that you have the needed software installed!\n";
print "If you have a special path for your includes then edit src/configure!\n";
@@ -325,7 +312,8 @@ perl -e '
return $ret;
}
- sub test_include {
+ sub test_include
+ {
my $shift = shift;
my $check = shift;
my $return = 0;
@@ -336,11 +324,14 @@ perl -e '
my $cmd = "`tail -n 1 ../g++.version` -I$shift __test.cpp -o /dev/null 2>/dev/null";
system $cmd;
- unless ($?) {
+ unless ($?)
+ {
print "OK\n";
$return = 1;
+ }
- } else {
+ else
+ {
print "Not OK\n";
}
diff --git a/src/msgs.h b/src/msgs.h
index 031debe..d3fc730 100644..100755
--- a/src/msgs.h
+++ b/src/msgs.h
@@ -123,10 +123,10 @@
#define XMLREAD "XML: Reading "
#define XMLERR "XML Error: "
#define XMLER1 "XML Error: Unable to load file "
-#define VERSION "0.8.2"
+#define VERSION "0.8.1"
#define BRANCH "RELEASE"
-#define BUILDNR 4003
-#define UNAME "FreeBSD 5.4-RELEASE-p3 i386"
+#define BUILDNR 3962
+#define UNAME "FreeBSD 5.4-RELEASE-p1 i386"
#define COMPOPT "Using built-in specs.; Configured with: FreeBSD/i386 system compiler; Thread model: posix; gcc version 3.4.2 [FreeBSD] 20040728; 3.4; g++"
#define YCUSAGE "Usage: ./ychat {h|v}|{o confkey confvalue}\n"