From 371cf3aa2a132401a4557e227577a9f3a57f4477 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 21 Nov 2010 16:21:22 +0000 Subject: --- CHANGES | 36 ++ ChangeLog | 484 --------------- Makefile | 37 ++ Makefile.in | 12 - README | 58 +- SHORTDESC | 4 + base.cpp | 65 -- base.h | 71 --- chat.cpp | 147 ----- chat.h | 46 -- cmnd.cpp | 19 - cmnd.h | 18 - conf.cpp | 75 --- conf.h | 24 - conf.txt | 10 +- configure | 1556 +---------------------------------------------- configure.in | 28 - cont.cpp | 24 - cont.h | 26 - docs/header.txt | 20 + glob.h | 68 --- hmap.cpp | 180 ------ hmap.h | 118 ---- html.cpp | 140 ----- html.h | 42 -- html/favicon.ico | Bin 2238 -> 2239 bytes html/index.html | 4 +- html/y_ani.gif | Bin 35107 -> 0 bytes html/y_black.gif | Bin 61100 -> 61101 bytes incl.h | 16 - lang.cpp | 78 --- lang.h | 24 - logd.cpp | 65 -- logd.h | 24 - main.cpp | 98 --- modl.cpp | 98 --- modl.h | 29 - msgs.h | 36 -- mutx.cpp | 20 - mutx.h | 21 - name.cpp | 32 - name.h | 28 - pool.cpp | 214 ------- pool.h | 77 --- reqp.cpp | 291 --------- reqp.h | 47 -- room.cpp | 18 - room.h | 34 -- s_chat.cpp | 10 - s_chat.h | 26 - s_conf.cpp | 10 - s_conf.h | 26 - s_html.cpp | 10 - s_html.h | 26 - s_lang.cpp | 10 - s_lang.h | 26 - s_modl.cpp | 10 - s_modl.h | 26 - s_mutx.cpp | 10 - s_mutx.h | 26 - s_sman.cpp | 10 - s_sman.h | 26 - s_sock.cpp | 10 - s_sock.h | 26 - s_tool.cpp | 111 ---- s_tool.h | 19 - scripts/astyle.sh | 15 + scripts/modules/file.pm | 28 + scripts/stats.pl | 95 +++ scripts/version.sh | 6 + sess.cpp | 35 -- sess.h | 28 - sman.cpp | 48 -- sman.h | 32 - sock.cpp | 238 -------- sock.h | 53 -- src/Makefile.in | 17 + src/base.cpp | 92 +++ src/base.h | 94 +++ src/chat.cpp | 179 ++++++ src/chat.h | 69 +++ src/conf.cpp | 99 +++ src/conf.h | 47 ++ src/configure | 1555 ++++++++++++++++++++++++++++++++++++++++++++++ src/cont.cpp | 47 ++ src/cont.h | 52 ++ src/glob.h | 91 +++ src/hmap.cpp | 206 +++++++ src/hmap.h | 146 +++++ src/html.cpp | 170 ++++++ src/html.h | 65 ++ src/incl.h | 39 ++ src/lang.cpp | 102 ++++ src/lang.h | 47 ++ src/main.cpp | 101 +++ src/msgs.h | 65 ++ src/mutx.cpp | 43 ++ src/mutx.h | 44 ++ src/name.cpp | 54 ++ src/name.h | 53 ++ src/pool.cpp | 203 +++++++ src/pool.h | 75 +++ src/reqp.cpp | 466 ++++++++++++++ src/reqp.h | 72 +++ src/room.cpp | 39 ++ src/room.h | 57 ++ src/s_chat.cpp | 33 + src/s_chat.h | 50 ++ src/s_conf.cpp | 33 + src/s_conf.h | 50 ++ src/s_html.cpp | 33 + src/s_html.h | 50 ++ src/s_lang.cpp | 33 + src/s_lang.h | 51 ++ src/s_mutx.cpp | 33 + src/s_mutx.h | 50 ++ src/s_sman.cpp | 33 + src/s_sman.h | 50 ++ src/s_sock.cpp | 33 + src/s_sock.h | 50 ++ src/s_tool.cpp | 162 +++++ src/s_tool.h | 44 ++ src/sess.cpp | 62 ++ src/sess.h | 51 ++ src/sman.cpp | 80 +++ src/sman.h | 59 ++ src/sock.cpp | 263 ++++++++ src/sock.h | 80 +++ src/thrd.cpp | 52 ++ src/thrd.h | 52 ++ src/user.cpp | 167 +++++ src/user.h | 125 ++++ thrd.cpp | 28 - thrd.h | 26 - todo.txt | 11 - user.cpp | 170 ------ user.h | 84 --- 137 files changed, 6459 insertions(+), 5586 deletions(-) create mode 100644 CHANGES delete mode 100644 ChangeLog create mode 100644 Makefile delete mode 100644 Makefile.in create mode 100644 SHORTDESC delete mode 100644 base.cpp delete mode 100644 base.h delete mode 100644 chat.cpp delete mode 100644 chat.h delete mode 100644 cmnd.cpp delete mode 100644 cmnd.h delete mode 100644 conf.cpp delete mode 100644 conf.h delete mode 100644 configure.in delete mode 100644 cont.cpp delete mode 100644 cont.h create mode 100644 docs/header.txt delete mode 100644 glob.h delete mode 100644 hmap.cpp delete mode 100644 hmap.h delete mode 100644 html.cpp delete mode 100644 html.h delete mode 100644 html/y_ani.gif delete mode 100644 incl.h delete mode 100644 lang.cpp delete mode 100644 lang.h delete mode 100644 logd.cpp delete mode 100644 logd.h delete mode 100644 main.cpp delete mode 100644 modl.cpp delete mode 100644 modl.h delete mode 100644 msgs.h delete mode 100644 mutx.cpp delete mode 100644 mutx.h delete mode 100644 name.cpp delete mode 100644 name.h delete mode 100644 pool.cpp delete mode 100644 pool.h delete mode 100644 reqp.cpp delete mode 100644 reqp.h delete mode 100644 room.cpp delete mode 100644 room.h delete mode 100644 s_chat.cpp delete mode 100644 s_chat.h delete mode 100644 s_conf.cpp delete mode 100644 s_conf.h delete mode 100644 s_html.cpp delete mode 100644 s_html.h delete mode 100644 s_lang.cpp delete mode 100644 s_lang.h delete mode 100644 s_modl.cpp delete mode 100644 s_modl.h delete mode 100644 s_mutx.cpp delete mode 100644 s_mutx.h delete mode 100644 s_sman.cpp delete mode 100644 s_sman.h delete mode 100644 s_sock.cpp delete mode 100644 s_sock.h delete mode 100644 s_tool.cpp delete mode 100644 s_tool.h create mode 100755 scripts/astyle.sh create mode 100644 scripts/modules/file.pm create mode 100755 scripts/stats.pl create mode 100755 scripts/version.sh delete mode 100644 sess.cpp delete mode 100644 sess.h delete mode 100644 sman.cpp delete mode 100644 sman.h delete mode 100644 sock.cpp delete mode 100644 sock.h create mode 100644 src/Makefile.in create mode 100644 src/base.cpp create mode 100644 src/base.h create mode 100644 src/chat.cpp create mode 100644 src/chat.h create mode 100644 src/conf.cpp create mode 100644 src/conf.h create mode 100755 src/configure create mode 100644 src/cont.cpp create mode 100644 src/cont.h create mode 100644 src/glob.h create mode 100644 src/hmap.cpp create mode 100644 src/hmap.h create mode 100644 src/html.cpp create mode 100644 src/html.h create mode 100644 src/incl.h create mode 100644 src/lang.cpp create mode 100644 src/lang.h create mode 100644 src/main.cpp create mode 100644 src/msgs.h create mode 100644 src/mutx.cpp create mode 100644 src/mutx.h create mode 100644 src/name.cpp create mode 100644 src/name.h create mode 100644 src/pool.cpp create mode 100644 src/pool.h create mode 100644 src/reqp.cpp create mode 100644 src/reqp.h create mode 100644 src/room.cpp create mode 100644 src/room.h create mode 100644 src/s_chat.cpp create mode 100644 src/s_chat.h create mode 100644 src/s_conf.cpp create mode 100644 src/s_conf.h create mode 100644 src/s_html.cpp create mode 100644 src/s_html.h create mode 100644 src/s_lang.cpp create mode 100644 src/s_lang.h create mode 100644 src/s_mutx.cpp create mode 100644 src/s_mutx.h create mode 100644 src/s_sman.cpp create mode 100644 src/s_sman.h create mode 100644 src/s_sock.cpp create mode 100644 src/s_sock.h create mode 100644 src/s_tool.cpp create mode 100644 src/s_tool.h create mode 100644 src/sess.cpp create mode 100644 src/sess.h create mode 100644 src/sman.cpp create mode 100644 src/sman.h create mode 100644 src/sock.cpp create mode 100644 src/sock.h create mode 100644 src/thrd.cpp create mode 100644 src/thrd.h create mode 100644 src/user.cpp create mode 100644 src/user.h delete mode 100644 thrd.cpp delete mode 100644 thrd.h delete mode 100644 todo.txt delete mode 100644 user.cpp delete mode 100644 user.h diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..7ebb73a --- /dev/null +++ b/CHANGES @@ -0,0 +1,36 @@ +Changes from 0.5.5-STABLERELEASE to 0.5.6-BASIC +- Rearanged the startup messages +- Set 2000 as the standard port (3000 has been used before) +- Run astyle on src/*.{h,cpp} +- Fixed some errors in the README file +- Added the SHORTDESC file +- Changed Copyright to EXA Digital Solutions +- Added .pm to scripts/stats.pl +- Modified the README (New CVS pserver) +- Added the headers and header rules to the Makefile +- Added the docs directory and the containing header.txt file which + does have a header skel for the source files (all source files now do + have a new source header containgin copyrights) +- The ychat-0.5 CVS branch now also has ychat-basic as its synonym +- Added the replace rule to the top level Makefile + +Changes from 0.5.4-STABLERELEASE to 0.5.5-STABLERELEASE +- Added scripts/version.sh (can be invoked by gmake version) +- Fixed a bug in the session manager. +- Removed the large animated GIF graphic. + +Changes from 0.5.3-LEGACYRELEASE to 0.5.4-STABLERELEASE +- Backported reqp::get_url from yChat 0.7.8-CURRENT. +- Tagged 0.5-STABLE + +Changes from 0.5.2-LEGACYRELEASE to 0.5.3-LEGACYRLEASE +- Code cleanup +- Added ./scripts/* +- Added gmake stats option + +Changes from 0.5.1-RELEASE to 0.5.2-LEGACYRLEASE +- Changed this branch into a LEGACY branch. +- Rewrote the dynamic thread pool (backport from 0.7.8-CURRENT). +- Added scripts/* +- Code now uses ANSI C++ style with 2 space code indenting. + diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index b3ada67..0000000 --- a/ChangeLog +++ /dev/null @@ -1,484 +0,0 @@ -2003-09-14 16:55 snooper - - * cmnd/yc_version.cpp: Added /version command. - -2003-09-14 16:48 snooper - - * README, msgs.h: Changed Version to 0.5 ( Will be released as soon - as possible ). - -2003-09-14 16:34 snooper - - * msgs.h: Changed version description. - -2003-09-14 16:31 snooper - - * README, conf.txt, glob.h, reqp.cpp, sock.cpp, cmnd/compile.sh: - Fixed all known bugs which already have been fixed in yChat++ - Advanced. - -2003-09-13 20:52 snooper - - * gfx/y_ani_black.gif, gfx/y_ani_white.gif, html/favicon.ico: [no - log message] - -2003-09-07 14:49 snooper - - * pool.cpp: - Removed a pthread_cond_signal which has been set twice! - -2003-09-06 23:34 rover - - * pool.cpp: fixed a typo ( multi thread bug ) - -2003-09-03 18:30 rover - - * reqp.cpp: modified End-Of-Headers to RFC compliant version - -2003-07-26 14:30 snooper - - * reqp.cpp: Added Pragma: no-cache and Expires: 0 to the HTTP - header. ( this is a bugfix ). - -2003-04-19 21:39 rover - - * chat.cpp, reqp.cpp, sess.cpp, sess.h, sman.h, sock.cpp, user.h: - identification now only depends on session - -2003-04-19 18:16 rover - - * Makefile.in, chat.cpp, chat.h, conf.txt, main.cpp, s_sman.cpp, - sess.cpp, sman.cpp, s_sman.h, sess.h, sman.h: added session - manager and session object. - -2003-04-10 17:36 rover - - * logd.cpp: fixed a typo - -2003-04-07 15:24 rover - - * hmap.cpp: added a really really important newline ( this is just - a loginfo test ) - -2003-04-07 15:18 rover - - * msgs.h: message templates are now replaced by language manager - -2003-04-05 00:17 rover - - * Makefile.in: language support - -2003-04-05 00:14 rover - - * chat.cpp, chat.h, conf.txt, lang.cpp, lang.h, main.cpp, - s_lang.cpp, s_lang.h, sock.cpp, user.cpp, user.h, lang/de, - lang/en: support for different languages in chat output - -2003-04-04 23:35 rover - - * conf.cpp, conf.txt, glob.h, s_conf.h, sock.cpp: another bug that - was caused due sed conversion - -2003-04-04 17:42 rover - - * Makefile.in: added log_daemon - -2003-04-04 17:19 rover - - * conf.txt, logd.cpp, logd.h, reqp.cpp, reqp.h, sock.cpp, sock.h: - added access log compatible logging - -2003-04-04 13:13 rover - - * sock.cpp: added IP / PORT to map_params to make logging possible - with only this map - -2003-04-04 12:41 rover - - * s_tool.cpp, s_tool.h: added trim() function to strip whitespaces - at the beginning and end of a string - -2003-04-04 12:40 rover - - * reqp.cpp, reqp.h: http headers are now stored in the requestmap - -2003-04-03 01:01 snooper - - * s_modl.cpp, s_modl.h, user.h: Minor modifications. New static - class wrapper. - -2003-04-02 23:57 snooper - - * Makefile.in, chat.h, conf.txt, main.cpp, modl.cpp, sock.cpp, - user.cpp, user.h, cmnd/yc_q.cpp: Added first command. /q ... - Todo: each user should have his own hashmap of executable - modules. Right now all users use the same module hash map. - -2003-04-02 15:23 rover - - * modl.cpp, modl.h: module loader - -2003-04-02 12:52 snooper - - * dltest.cpp, yc_test.cpp, cmnd/yc_q.cpp, cmnd/yc_test.cpp: [no log - message] - -2003-04-02 12:50 snooper - - * Makefile.in, README, base.cpp, base.h, chat.cpp, chat.h, - conf.cpp, dltest.cpp, glob.h, hmap.cpp, hmap.h, html.cpp, msgs.h, - reqp.cpp, reqp.h, sock.cpp: Dynamic module loader class. Better - hash map functionality. Some bugfixes. - -2003-03-30 15:40 paul - - * hmap.h: - Implementation of operator[]. - -2003-03-30 13:12 volker - - * html/: style.css, y_black.gif: added stylesheet and an image - -2003-03-30 03:48 paul - - * todo.txt: [no log message] - -2003-03-30 03:35 paul - - * base.cpp, conf.txt, hmap.cpp, hmap.h: The hach map now supports - explicit key bindings on each value. The [] operator still has to - be implemented. - -2003-03-30 01:34 volker - - * conf.txt, html/index.html, html/input.html, html/online.html, - html/stream.html: modified appearance and added css - -2003-03-30 01:26 paul - - * README, README.txt, cont.h: Renamed. - -2003-03-30 01:14 paul - - * base.cpp, base.h, hmap.cpp, hmap.h: All user objects and all room - objects are stored in a hash map. - -2003-03-30 01:06 volker - - * conf.txt, reqp.cpp, reqp.h, s_tool.cpp, s_tool.h: support for - different content-types - -2003-03-30 00:21 paul - - * hmap.cpp, hmap.h, main.cpp: Now handles pointer of data objects - instead of references. - -2003-03-30 00:18 volker - - * html.cpp: removed possible deadlock - -2003-03-30 00:11 volker - - * conf.txt, html.cpp: changed format how files are read into - templatecache - -2003-03-28 17:16 volker - - * todo.txt: todo is now up to date - -2003-03-28 03:51 paul - - * data.h: - - Removed data.h - -2003-03-28 03:51 paul - - * README.txt, base.h, chat.h, data.h, room.h: - - Put data.h and base.h together. - -2003-03-28 03:08 paul - - * README.txt: - - Actualizing because of the new configure script. - -2003-03-28 03:02 volker - - * configure, configure.in: [no log message] - -2003-03-28 02:59 volker - - * configure, configure.in: -ldl is not needed under *bsd. Added a - check - -2003-03-28 02:38 volker - - * Makefile, Makefile.in, configure, configure.in: added support for - bsd - -2003-03-28 01:38 volker - - * base.cpp: changed a bug in cvs keywords - -2003-03-28 01:32 volker - - * base.cpp: [no log message] - -2003-03-28 01:27 volker - - * COPYING, configure.in: this file should be in every repository ;) - -2003-03-28 01:18 volker - - * Makefile, Makefile.in, configure, configure.in: configure - dependent files - -2003-03-28 00:22 paul - - * hmap.cpp, hmap.h: - - Optimization of the hash map. - -2003-03-27 17:14 volker - - * dltest.cpp, yc_test.cpp: Dynamic module test - -2003-03-26 18:50 paul - - * html/index.html: - - Changed POST back to GET due read bug. - -2003-03-26 17:40 paul - - * reqp.cpp: - - Bugfix. - -2003-03-26 16:44 paul - - * reqp.cpp, sock.cpp, sock.h: - - Fixed segfault bug. ( stream.html request without existing user - object ). - -2003-03-26 16:17 paul - - * sock.cpp: - - Deletion of variables which are no longer needed after procession - ( e.g. map_params ). - -2003-03-26 15:57 paul - - * thrd.cpp: - - Bugfix. Now every socket connection will be closed the right way - ;). - -2003-03-26 00:03 paul - - * chat.cpp, chat.h, sock.cpp: - - Bugfix + added to the class chat a private bool b_strip_html - member. - -2003-03-25 23:52 paul - - * chat.cpp: - - Style fix. - -2003-03-25 23:41 paul - - * msgs.h, sock.cpp: - - Bugfix. - -2003-03-25 23:21 paul - - * name.h: - - Bugfix. - -2003-03-25 23:19 paul - - * Makefile, README.txt, base.cpp, base.h, conf.txt, data.h, - hmap.cpp, hmap.h, name.cpp, name.h: - - Changed because of hashmap integration. base.cpp and base.h still - have to be modified. Afterwards, all user and rooms will be - stored in a hash map. - -2003-03-25 21:06 paul - - * Makefile, hmap.cpp, hmap.h, user.h: - - Hash Map implementation. - -2003-03-25 20:12 volker - - * chat.cpp, conf.txt, s_tool.cpp, s_tool.h: added possibility to - turn html tags on/off in chat messages - -2003-03-25 19:53 paul - - * conf.txt, html.cpp: - - Bugfix. - -2003-03-25 18:44 paul - - * conf.txt: - - Bugfix. - -2003-03-25 17:22 volker - - * conf.txt, main.cpp: removed some typos that where created due to - sed conversation - -2003-03-25 15:54 volker - - * CHAT.cpp, CHAT.h, CONF.cpp, CONF.h, HTML.cpp, HTML.h, MUTX.cpp, - MUTX.h, Makefile, README.txt, SOCK.cpp, SOCK.h, TOOL.cpp, TOOL.h, - chat.cpp, chat.h, cmnd.cpp, conf.cpp, conf.h, conf.txt, cont.cpp, - data.h, glob.h, html.cpp, html.h, main.cpp, msgs.h, mutx.cpp, - mutx.h, pool.cpp, reqp.cpp, s_chat.cpp, s_chat.h, s_conf.cpp, - s_conf.h, s_html.cpp, s_html.h, s_mutx.cpp, s_mutx.h, s_sock.cpp, - s_sock.h, s_tool.cpp, s_tool.h, sock.cpp, sock.h, thrd.cpp, - user.cpp: changed filenames to windows compatible ones - -2003-03-25 00:49 paul - - * README.txt: - - Bugfixes. - -2003-03-25 00:40 paul - - * todo.txt: - - New brainstorming. - -2003-03-25 00:16 paul - - * TOOL.cpp, TOOL.h, chat.cpp, msgs.h: - - Added check routine if a login nick is alphanumeric or not. If - not a message will appear on the startpage instead of logging in - which may would end in a segmentation fault. - -2003-03-24 23:45 paul - - * main.cpp: [no log message] - -2003-03-24 23:43 paul - - * README.txt, chat.cpp, msgs.h, user.cpp, user.h: - - Added support for chat commands ( chat commands still have to be - implemented ). If you type "/testhere" ychat will tell that - there is no such command! - -2003-03-24 00:30 paul - - * Makefile, cmnd.cpp, main.cpp, msgs.h, reqp.cpp, reqp.h, sock.cpp, - sock.h, thrd.cpp, user.cpp, user.h: [no log message] - -2003-03-23 23:34 vrichter - - * reqp.cpp: removed bogus sock.h - -2003-03-23 23:29 vrichter - - * reqp.cpp, sock.cpp: bugfix POST system - -2003-03-23 20:03 vrichter - - * html/index.html: changed the method of the login form to POST - -2003-03-23 20:02 vrichter - - * reqp.cpp, reqp.h: the request parser now supports POST - -2003-03-23 16:16 paul - - * pool.cpp: - - Fixed changing date! ( System clock was set wrong ), - -2003-03-23 16:05 paul - - * pool.cpp: [no log message] - -2003-03-23 12:33 paul - - * conf.txt, pool.cpp: [no log message] - -2003-03-23 06:41 paul - - * base.cpp, chat.cpp, conf.cpp, cont.cpp, html.cpp, main.cpp, - mutx.cpp, name.cpp, reqp.cpp, room.cpp, thrd.cpp, user.cpp, - msgs.h: [no log message] - -2003-03-23 06:26 paul - - * pool.cpp: [no log message] - -2003-03-23 05:55 paul - - * Makefile, README.txt, conf.txt, glob.h, main.cpp, msgs.h, - pool.cpp, pool.h, reqp.h, sock.cpp, sock.h: [no log message] - -2003-03-22 23:07 paul - - * README.txt: [no log message] - -2003-03-22 22:56 paul - - * html.h: [no log message] - -2003-03-22 07:40 vrichter - - * reqp.h: fixed a paste error - ---------------------------------------------------------------------- - -2003-03-21 20:38 vrichter - - * yc.tgz, ychat: removed binary files that were transfered - -2003-03-21 19:31 vrichter - - * reqp.cpp, reqp.h, ychat: added url decoding - -2003-03-21 16:54 root - - * CHAT.cpp, CHAT.h, CONF.cpp, CONF.h, HTML.cpp, HTML.h, MUTX.cpp, - MUTX.h, Makefile, README.txt, SOCK.cpp, SOCK.h, TOOL.cpp, TOOL.h, - base.cpp, base.h, chat.cpp, chat.h, cmnd.cpp, cmnd.h, conf.cpp, - conf.h, conf.txt, cont.cpp, cont.h, data.h, glob.h, html.cpp, - html.h, incl.h, main.cpp, msgs.h, mutx.cpp, mutx.h, name.cpp, - name.h, reqp.cpp, reqp.h, room.cpp, room.h, sock.cpp, sock.h, - thrd.cpp, thrd.h, todo.txt, user.cpp, user.h, yc.tgz, ychat, - gfx/y_ani_black.gif, gfx/y_ani_white.gif, html/blank.html, - html/frameset.html, html/index.html, html/input.html, - html/notfound.html, html/online.html, html/stream.html, - html/y_ani.gif: Initial revision - -2003-03-21 16:54 root - - * CHAT.cpp, CHAT.h, CONF.cpp, CONF.h, HTML.cpp, HTML.h, MUTX.cpp, - MUTX.h, Makefile, README.txt, SOCK.cpp, SOCK.h, TOOL.cpp, TOOL.h, - base.cpp, base.h, chat.cpp, chat.h, cmnd.cpp, cmnd.h, conf.cpp, - conf.h, conf.txt, cont.cpp, cont.h, data.h, glob.h, html.cpp, - html.h, incl.h, main.cpp, msgs.h, mutx.cpp, mutx.h, name.cpp, - name.h, reqp.cpp, reqp.h, room.cpp, room.h, sock.cpp, sock.h, - thrd.cpp, thrd.h, todo.txt, user.cpp, user.h, yc.tgz, ychat, - gfx/y_ani_black.gif, gfx/y_ani_white.gif, html/blank.html, - html/frameset.html, html/index.html, html/input.html, - html/notfound.html, html/online.html, html/stream.html, - html/y_ani.gif: imported files into ychat cvs - diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4842efd --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +MAKE=gmake +HEADER?=docs/header.txt +all: base + @echo "Now edit the ./conf.txt file and run ./ychat!" +install: deinstall +uninstall: deinstall +deinstall: + @echo Install/deinstall is not supported! + @echo Start yChat with ./ychat instead! + @exit 1 +base: + @${MAKE} -C ./src +clean_base: + @${MAKE} -C ./src clean +stats: + @perl scripts/stats.pl +run: + ./ychat +gpl: + @more COPYING +clean: clean_base +debug: + @gdb ./ychat ychat.core +version: + @sh ./scripts/version.sh +headers: + @find -E ./ -regex '\./src/.*\.(h|(cpp)|(tmpl))' -exec \ + sh -c 'export FILE={}; ${MAKE} header' \; +header: + @echo "===> Processing ${FILE}" + @sed -n '/*:/d; w .tmp' ${FILE} + @header=`sed 's/\(.*\)/ echo " \*: \1"/' ${HEADER}`; \ + echo '/*:*' > ${FILE}; eval "$$header" >> ${FILE}; \ + echo ' *:*/' >> ${FILE}; cat .tmp >> ${FILE}; rm -f .tmp +replace: + @find ./ -type f -exec sh -c 'sed -n "s/$(FROM)/$(INTO)/g; \ + w .tmp" {} && mv -f .tmp {}' \; diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 300d035..0000000 --- a/Makefile.in +++ /dev/null @@ -1,12 +0,0 @@ -SRCS=chat.cpp s_chat.cpp cmnd.cpp conf.cpp s_conf.cpp cont.cpp html.cpp s_html.cpp lang.cpp s_lang.cpp logd.cpp main.cpp modl.cpp s_modl.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 -OBJS=$(SRCS:.cpp=.o) -CC=g++ -LDFLAGS=@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 diff --git a/README b/README index 3ae4b74..8de9114 100644 --- a/README +++ b/README @@ -1,7 +1,8 @@ -yChat++ Basic; Homepage: www.yChat.org; Version 0.5.1 -Copyright (C) 2003 Paul C. Buetow, Volker Richter ------------------------------------------------------------------ +yChat; Homepage: www.yChat.org; Version 0.5.6-BASIC +Copyright (C) 2003, 2004 Paul C. Buetow, Volker Richter +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 @@ -18,11 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ----------------------------------------------------------------- -0.0.0 YCHAT++ BASIC TABLE OF CONTENTS +0.0.0 BASIC YCHAT 0.5 TABLE OF CONTENTS 1.0.0 REQUIREMENTS 1.1.0 TESTED PLATFORMS 1.2.0 IMPORTANT NOTES -1.3.0 HOW TO OBTAIN YCHAT++ +1.3.0 HOW TO OBTAIN YCHAT 1.3.1 INSTALLATION 1.5.0 CUSTOMIZATION 1.6.0 FILES @@ -31,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1.0.0 REQUIREMENTS: -- gcc 3.2 +- gcc 3.x The GNU C++ compiler. 1.1.0 TESTED PLATFORMS: @@ -39,29 +40,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. The following platforms have been tested with success: - Linux with GCC 3.2.0, GNU make 3.79.1 -- FreeBSD 5.1-RELEASE-p2, GCC 3.2.2, GNU make 3.80 ( standard make does not seem work on FreeBSD ). +- FreeBSD 5.1-RELEASE-p2, GCC 3.2.2, GNU make 3.80 +- FreeBSD 5.3-RELEASE, GCC 3.4, GNU make 3.80 +- FreeBSD 5.4-RELEASE, GCC 3.4.2, GNU make 3.80 1.2.0 IMPORTANT NOTES: Before you compile the source you have to be sure to use at least GCC version 3.x with pthreads enabled. ( Type gcc -v to check it ). GCC 2.95 did not work while testing on linux and WON'T BE SUPPORTED! -If you like to support yChat++, please write us an email and tell what -you can/like/would help ;-]. Please also take a look at the yChat++ +If you like to support yChat please write us an email and tell what +you can/like/would help ;-]. Please also take a look at the yChat homepage which is located at http://www.yChat.org. -1.3.0 HOW TO OBTAIN YCHAT++: +1.3.0 HOW TO OBTAIN YCHAT: yChat can be downloaded as a source package or through CVS. -The packages are located at http://www.yChat.org -> Sourcecode -> -Packages or go to http://programming.buetow.org/CPP-yChat . +The packages are located at http://www.yChat.org -> Release Versions +Packages or go to http://programming.buetow.org/yChat . + +For CVS download type: + +cvs -d:pserver:anonymous@buetow.org:/cvs/cvsroot login +( You will be asked for a password. Use "just enter" ). + +cvs -z3 -d:pserver:anonymous@buetow.org:/cvs/cvsroot co ychat-basic +( The sources will be copied into your local folder ) + +cvs -d:pserver:anonymous@buetow.org:/cvs/cvsroot logout +( Logs your CVS session out ). + +Now you may continue with the installation. -For CVS download type also look at the homepage please. 1.3.1 INSTALLATION: -Invoke "./configure" and afterwards "make", edit the conf.txt. +Invoke "./configure" and afterwards "gmake", edit the conf.txt. Now we want to compile all the dynamic loadable modules of ychat. Invoke "cd cmnd && ./compile.sh && cd -". All command modules should get @@ -83,6 +98,8 @@ Dynamic loadable modules can be found in the cmnd/ subdirectory. conf.txt - The yChat configuration file. ( read by conf.cpp ). +Files in ./src: + base.cpp - Encapsulates vector fields of room's or user ( may be later hash_maps ) and provides methods for manipulating data objects. @@ -203,7 +220,7 @@ conf html How to submit a good bug report? -Send them to Bug@yChat.org. +Send them to mail at yChat dot org. First you should give the following information: - yChat version, if CVS (or devel. tarball) then which day? @@ -243,14 +260,19 @@ You may contact us through the following addresses: - Homepage The yChat homepage is located at http://www.yChat.org + The EXA Digital Solutions homepage is located at http://www.exa-ds.com - E-Mail - Paul C. Buetow: Snooper@yChat.org ( core developer ) - Volker Richter: Rover@yChat.org ( core developer ) - Mail@yChat.org ( reaches everybody of yChat ) + Paul C. Buetow: Buetow at yChat dot org ( core developer ) + Mail at yChat dot org ( reaches everybody of yChat ) - ICQ Paul C. Buetow: 11655527 - IRC #ychat at irc.german-elite.net + +- EXA Digital Solutions GbR + Laubenstr. 16b + D-44866 Bochum + Germany diff --git a/SHORTDESC b/SHORTDESC new file mode 100644 index 0000000..fce0ad0 --- /dev/null +++ b/SHORTDESC @@ -0,0 +1,4 @@ +The yChat 0.5 branch is marked as BASIC and contains a very light and fast +chat system without any special features. + +WWW: http://www.yChat.org diff --git a/base.cpp b/base.cpp deleted file mode 100644 index eadf1c3..0000000 --- a/base.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - This file is part of yChat - - $Author: cvs $ - $Date: 2004-04-05 10:37:17 $ - - $Header: /cvs/cvsroot/ychat-basic/base.cpp,v 1.1.1.1 2004-04-05 10:37:17 cvs Exp $ -*/ -// template class data implementation; - -#ifndef BASE_CPP -#define BASE_CPP - -#include "base.h" - -template -base::base() -{ - map_elem = new hmap(80); - pthread_mutex_init (&mut_map_elem, NULL ); -} - -template -base::~base( ) -{ - pthread_mutex_destroy( &mut_map_elem ); -} - -template void -base::add_elem( type* p_type ) -{ - pthread_mutex_lock ( &mut_map_elem ); - map_elem->add_elem ( p_type, p_type->get_name()); - pthread_mutex_unlock( &mut_map_elem ); -} - -template void -base::del_elem( string &s_name ) -{ - pthread_mutex_lock ( &mut_map_elem ); - map_elem->del_elem ( s_name ); - pthread_mutex_unlock( &mut_map_elem ); -} - -template type* -base::get_elem( string &s_name, bool &b_found ) -{ - pthread_mutex_lock ( &mut_map_elem ); - type* p_type = map_elem->get_elem( s_name ); - pthread_mutex_unlock( &mut_map_elem ); - - b_found = p_type == NULL ? false : true; - - return p_type; -} - -template void -base::run_func( void (*func)(type*, void*), void* v_arg ) -{ - pthread_mutex_lock ( &mut_map_elem ); - map_elem->run_func( func, v_arg ); - pthread_mutex_unlock( &mut_map_elem ); -} - -#endif diff --git a/base.h b/base.h deleted file mode 100644 index 6f06e4b..0000000 --- a/base.h +++ /dev/null @@ -1,71 +0,0 @@ -// template class data declaration; - -#ifndef BASE_H -#define BASE_H - -#include "incl.h" -#include "hmap.h" - -template -class base -{ -private: - hmap* map_elem; - pthread_mutex_t mut_map_elem; - -public: - base(); - ~base(); - - virtual void add_elem( type* p_type ); // add a element. - virtual void del_elem( string &s_name ); // delete a alement. - virtual type* get_elem( string &s_name, bool &b_found ); // get a element. - - // execute func on all elements of map_elem. v_pointer is the argument. - virtual void run_func( void (*func)(type*, void*), void* v_arg ); - - // chat::msg_post sends to all users of the system a message. - // room::msg_post sends to all users of the room a message. - // user::msg_post sends to the user a message. - void msg_post( string *s_msg ) - { - run_func( &base::msg_post_ , (void*)s_msg ); - } - static void msg_post_( type* type_obj, void* v_arg ) - { - string *p_msg = (string*) v_arg; - type_obj -> msg_post( p_msg ); - } - - void get_data( map_string *p_map_string ) - { - run_func( &base::get_data_ , (void*)p_map_string ); - } - static void get_data_( type* type_obj, void* v_arg ) - { - map_string *map_params = (map_string*) v_arg; - type_obj -> get_data ( map_params ); - } - - // chat::get_user_list gets a list of all users of the system. - // room::get_user_list gets a list of all users of the room. - // user::get_user_list gets a "list" of a user usernameseperator - void get_user_list( string &s_list, string &s_seperator ) - { - - container c; - c.elem[0] = (void*) &s_list; - c.elem[1] = (void*) &s_seperator; - - run_func( &base::get_user_list_, (void*)&c ); - } - static void get_user_list_( type* type_obj, void* v_arg ) - { - container *c = (container*) v_arg; - type_obj -> get_user_list( *((string*)c->elem[0]), *((string*)c->elem[1]) ); - } -}; - -#include "base.cpp" - -#endif diff --git a/chat.cpp b/chat.cpp deleted file mode 100644 index b845ec3..0000000 --- a/chat.cpp +++ /dev/null @@ -1,147 +0,0 @@ -// class chat implementation. - -#ifndef s_chat_CXX -#define s_chat_CXX - -#include "chat.h" -#include "s_conf.h" -#include "s_mutx.h" -#include "s_tool.h" - -using namespace std; - -chat::chat( ) -{ - if ( s_conf::get().get_val( "HTML" ) == "OFF" ) - b_strip_html = true; - else - b_strip_html = false; - -} - -chat::~chat( ) -{ -} - -user* -chat::get_user( string &s_user ) -{ - bool b_flag; - return get_user( s_user, b_flag ); -} - -user* -chat::get_user( string &s_user, bool &b_found ) -{ - container param; - - param.elem[0] = (void*) &s_user ; - param.elem[1] = (void*) &b_found; - - b_found = false; - - run_func( get_user_, (void*)¶m ); - - if ( *( (bool*)param.elem[1] ) ) - return (user*)param.elem[2]; -} - -void -chat::get_user_( room *room_obj, void *v_arg ) -{ - container* param = (container*) v_arg; - param->elem[2] = (void*)room_obj->get_elem( *((string*)param->elem[0]), *((bool*)param->elem[1]) ); -} - -void -chat::login( map_string &map_params ) -{ - string s_user = map_params["nick"]; - - // prove if nick is empty: - if ( s_user.empty() ) - { - map_params["INFO"] = E_NONICK; - map_params["request"] = s_conf::get().get_val( "STARTMPL" ); // redirect to the startpage. - return; - } - - // prove if the nick ist alphanumeric: - else if ( ! s_tool::is_alpha_numeric( s_user ) ) - { - map_params["INFO"] = E_ALPNUM; - map_params["request"] = s_conf::get().get_val( "STARTMPL" ); // redirect to the startpage. - return; - } - - bool b_flag; - - // prove if nick is already online / logged in. - get_user( s_user, b_flag ); - if ( b_flag ) - { - map_params["INFO"] = E_ONLINE; - map_params["request"] = s_conf::get().get_val( "STARTMPL" ); - return; - } - - string s_room = map_params["room"]; - room* p_room = get_room( s_room , b_flag ); - - // if room does not exist add room to list! - if ( ! b_flag ) - { - p_room = new room( s_room ); - -#ifdef VERBOSE - pthread_mutex_lock ( &s_mutx::get().mut_stdout ); - cout << NEWROOM << s_room << endl; - pthread_mutex_unlock( &s_mutx::get().mut_stdout ); -#endif - - add_elem( p_room ); - } - - user *p_user = new user( s_user ); - - // add user to the room. - p_room->add_user( p_user ); - sess *ns =s_sman::get().createSession(); - ns->setValue(string("nick"), (void *)new string(s_user) ); - map_params["tmpid"]=ns->getId(); - // post "username enters the chat" into the room. - p_room->msg_post( new string( s_user.append( s_lang::get().get_val( "USERENTR" ) ) ) ); - -#ifdef VERBOSE - pthread_mutex_lock ( &s_mutx::get().mut_stdout ); - cout << LOGINPR << s_user << endl; - pthread_mutex_unlock( &s_mutx::get().mut_stdout ); -#endif -} - -void -chat::post( user* p_user, map_string &map_params ) -{ - - string s_msg( map_params["message"] ); - - auto unsigned i_pos = s_msg.find( "/" ); - if ( i_pos == 0 ) - return p_user->command( s_msg ); - - if ( b_strip_html ) - s_tool::strip_html( &s_msg ); - - string s_post( "get_col1() ) - .append( "\">" ) - .append( p_user->get_name() ) - .append( ": " ) - .append( s_msg ) - .append( "
\n" ); - - p_user->get_p_room()->msg_post( &s_post ); -} - -#endif diff --git a/chat.h b/chat.h deleted file mode 100644 index 60bcf9d..0000000 --- a/chat.h +++ /dev/null @@ -1,46 +0,0 @@ -// class chat declaration. - -#ifndef s_chat_H -#define s_chat_H - -#include -#include "incl.h" -#include "base.h" -#include "room.h" -#include "user.h" -#include "sess.h" -#include "s_lang.h" -#include "s_sman.h" - -using namespace std; - -class chat : public base -{ -private: - bool b_strip_html; - -public: - - - room* get_room( string &s_name, bool &b_found ) - { - return static_cast( get_elem( s_name, b_found ) ); - } - - // public methods: - explicit chat(); // a standard constructor. - ~chat(); // destructor. - - // get the object of a specific user. - virtual user* get_user( string &s_nick ); - virtual user* get_user( string &s_nick, bool &b_found ); - static void get_user_( room* room_obj, void *v_arg ); - - // will be called every time a user tries to login. - virtual void login( map_string &map_params ); - - // will be called if a user posts a message. - virtual void post ( user* u_user, map_string &map_params ); -}; - -#endif diff --git a/cmnd.cpp b/cmnd.cpp deleted file mode 100644 index 28e73a7..0000000 --- a/cmnd.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// class cmnd implementation. - -#ifndef CMND_CXX -#define CMND_CXX - -#include "cmnd.h" -#include "s_mutx.h" - -using namespace std; - -cmnd::cmnd( ) -{ -} - -cmnd::~cmnd() -{ -} - -#endif diff --git a/cmnd.h b/cmnd.h deleted file mode 100644 index 2eb1db2..0000000 --- a/cmnd.h +++ /dev/null @@ -1,18 +0,0 @@ -// class cmnd declaration. - -#ifndef CMND_H -#define CMND_H - -#include "incl.h" - -using namespace std; - -class cmnd -{ -public: - // public methods: - explicit cmnd( ); // a standard constructor. - ~cmnd( ); -}; - -#endif diff --git a/conf.cpp b/conf.cpp deleted file mode 100644 index 3ff71b8..0000000 --- a/conf.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// class conf implementation. - -#ifndef s_conf_CXX -#define s_conf_CXX - -#include -#include "conf.h" - -using namespace std; - -conf::conf( string s_conf = CONFILE ) : name( s_conf ) -{ - parse( ); // parse the config file. -} - -conf::~conf() -{ -} - -void -conf::parse() -{ -#ifdef VERBOSE - cout << CFILEOK << get_name() << endl; -#endif - - ifstream fs_conf( get_name().c_str() ); - - if ( ! fs_conf ) - { -#ifdef VERBOSE - cout << CFILENO << get_name() << endl; -#endif - return; - } - - char c_buf[READBUF]; - - while( fs_conf.getline( c_buf, READBUF ) ) - { - string s_token( c_buf ); - unsigned int ui_pos = s_token.find( "#", 0 ); - - // if line is commented out: - if ( ui_pos == 0 ) - continue; - - ui_pos = s_token.find( ";", 0 ); - - // if token has not been found. - if ( ui_pos == string::npos ) - continue; - - s_token = s_token.substr( 0 , --ui_pos ); - ui_pos = s_token.find ( "\"", 0 ); - - if ( ui_pos == string::npos ) - continue; - - string s_val = s_token.substr( ui_pos+1, s_token.length() ); - string s_key = s_token.substr( 0 , --ui_pos ); - -#ifdef VERBOSE2 - cout << s_key << "=" << s_val << endl; -#endif - - // fill the map. - map_vals[s_key] = s_val; - } - - fs_conf.close(); - fs_conf.~ifstream(); -} - -#endif diff --git a/conf.h b/conf.h deleted file mode 100644 index 6e2a890..0000000 --- a/conf.h +++ /dev/null @@ -1,24 +0,0 @@ -// class conf declaration. this class parses the server config file. - -#ifndef s_conf_H -#define s_conf_H - -#include "incl.h" -#include "cont.h" -#include "name.h" - -using namespace std; - -class conf : public cont, name -{ -private: - -public: - // public methods: - conf ( string s_conf ); // standard constructor. - ~conf(); // standard destructor. - - virtual void parse( ); // parses the config file. -}; - -#endif diff --git a/conf.txt b/conf.txt index 936af92..eb7ed2f 100644 --- a/conf.txt +++ b/conf.txt @@ -11,15 +11,15 @@ # all lines which do not contain a semicolon and at least two quotes # or start with a # will be ignored. # -# greets, paul c. buetow ( snooper@ychat.org ); +# greets, paul c. buetow ( snooper at ychat dot org ); # # server specific configurations ( not allowed to be removed ): HTMLTEMP="html/"; # directory of the html-template files. -THRDPOOL="50"; # thread pool size. -THRDQUEU="50"; # length of the thread pool queue. -SRVRPORT="3000"; # local port on which the server listens. +THRDPOOL="1"; # Initial pool size. +THRDPMAX="52"; # Max thread pool size +SRVRPORT="2000"; # local port on which the server listens. STRDROOM="Lounge"; # the name of the standard room. LANGUAGE="en"; # language of the chat outputs ( CONSOLE OUTPUT IS NOT AFFECTED ) @@ -48,7 +48,7 @@ LOG_LINES="10"; # values which are used by the html-templates and are not sticked within the yC++ core source! GRAPHICS="http://paul.buetow.info/yChat"; # url for graphic files etc. -PGETITLE="yChat++ Basic - Fast Simple Extensible"; +PGETITLE="yChat 0.5 - Fast Simple Extensible"; # do not edit beyond this line diff --git a/configure b/configure index 8c5f0a7..333efb0 100755 --- a/configure +++ b/configure @@ -1,1555 +1,5 @@ -#! /bin/sh +#!/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. -# -# 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] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=s_chat.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -#AC_INIT_AUTOMAKE(yChat, 0.2) - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:528: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:561: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:590: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:674: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }";