Compare commits
No commits in common. "master" and "win32perldist" have entirely different histories.
master
...
win32perld
716 changed files with 2 additions and 304453 deletions
595
.gitattributes
vendored
595
.gitattributes
vendored
|
@ -1,594 +1,3 @@
|
|||
* text=auto !eol
|
||||
/.indent.pro -text
|
||||
/AUTHORS -text
|
||||
/BUGS -text
|
||||
/COPYING -text
|
||||
/CREDITS -text
|
||||
/ChangeLog.old -text
|
||||
/INSTALL -text
|
||||
/INSTNOTES -text
|
||||
/INSTNOTES.svn -text
|
||||
/Makefile.am -text
|
||||
/Makefile.in -text
|
||||
/NEWS -text
|
||||
NeoStats.xcode/project.pbxproj -text
|
||||
/README -text
|
||||
/README.win32.txt -text
|
||||
/RELNOTES -text
|
||||
/TODO -text
|
||||
/aclocal.m4 -text
|
||||
autotools/acinclude.m4 -text
|
||||
autotools/aclocal.m4 -text
|
||||
autotools/ax_compare_version.m4 -text
|
||||
autotools/ax_distversion.m4 -text
|
||||
autotools/ax_maintainer_mode_auto_silent.m4 -text
|
||||
autotools/ax_path_lib_curl.m4 -text
|
||||
autotools/ax_path_lib_pcre.m4 -text
|
||||
autotools/berkeley_db.m4 -text
|
||||
autotools/ccdv.c -text
|
||||
autotools/ccdv.m4 -text
|
||||
autotools/compile -text
|
||||
autotools/config.guess -text
|
||||
autotools/config.sub -text
|
||||
autotools/depcomp -text
|
||||
autotools/install-sh -text
|
||||
autotools/libevent.m4 -text
|
||||
autotools/ltmain.sh -text
|
||||
autotools/missing -text
|
||||
autotools/mkinstalldirs -text
|
||||
autotools/rules.mk -text
|
||||
autotools/shtool -text
|
||||
autotools/ylwrap -text
|
||||
/configure -text
|
||||
/configure.in -text
|
||||
data/niconfig.db -text
|
||||
data/tlds.nfo -text
|
||||
doc/CODINGMODULES.txt -text
|
||||
doc/README.dev -text
|
||||
doc/READMEWIN32.dev -text
|
||||
doc/old/ChangeLog.connectserv.old -text
|
||||
doc/old/ChangeLog.hostserv.old -text
|
||||
doc/old/ChangeLog.loveserv.old -text
|
||||
doc/old/ChangeLog.moraleserv.old -text
|
||||
doc/old/ChangeLog.neoserv.old -text
|
||||
doc/old/ChangeLog.operlog.old -text
|
||||
doc/old/ChangeLog.statserv.old -text
|
||||
doc/old/FAQ -text
|
||||
doc/old/FAQ.pt -text
|
||||
doc/old/INSTALL.pt -text
|
||||
doc/old/README.french -text
|
||||
doc/old/README.pt -text
|
||||
doc/old/USERMAN -text
|
||||
doc/old/USERMAN.html -text
|
||||
doc/old/USERMAN.xml -text
|
||||
doc/old/read-faq -text
|
||||
doc/old/read-userman -text
|
||||
doc/test.pl -text
|
||||
doc/test2.pl -text
|
||||
graveyard/include/rtaserv.h -text
|
||||
graveyard/lib/rta/Makefile.am -text
|
||||
graveyard/lib/rta/Makefile.in -text
|
||||
graveyard/lib/rta/README -text
|
||||
graveyard/lib/rta/api.c -text
|
||||
graveyard/lib/rta/do_sql.c -text
|
||||
graveyard/lib/rta/do_sql.h -text
|
||||
graveyard/lib/rta/parse.tab.h -text
|
||||
graveyard/lib/rta/parse.y -text
|
||||
graveyard/lib/rta/rta.h -text
|
||||
graveyard/lib/rta/rtatables.c -text
|
||||
graveyard/lib/rta/token.l -text
|
||||
graveyard/lib/rtawin32/api.c -text
|
||||
graveyard/lib/rtawin32/do_sql.c -text
|
||||
graveyard/lib/rtawin32/do_sql.h -text
|
||||
graveyard/lib/rtawin32/parse.tab.c -text
|
||||
graveyard/lib/rtawin32/parse.tab.h -text
|
||||
graveyard/lib/rtawin32/parse.y -text
|
||||
graveyard/lib/rtawin32/rta.h -text
|
||||
graveyard/lib/rtawin32/rta.vcproj -text
|
||||
graveyard/lib/rtawin32/rtatables.c -text
|
||||
graveyard/lib/rtawin32/token.c -text
|
||||
graveyard/lib/rtawin32/token.l -text
|
||||
graveyard/modules/loveserv/.indent.pro -text
|
||||
graveyard/modules/loveserv/Makefile.am -text
|
||||
graveyard/modules/loveserv/Makefile.in -text
|
||||
graveyard/modules/loveserv/TODO -text
|
||||
graveyard/modules/loveserv/loveserv.c -text
|
||||
graveyard/modules/loveserv/loveserv.h -text
|
||||
graveyard/modules/loveserv/loveserv.vcproj -text
|
||||
graveyard/modules/loveserv/ls_help.c -text
|
||||
graveyard/modules/moraleserv/.indent.pro -text
|
||||
graveyard/modules/moraleserv/Makefile.am -text
|
||||
graveyard/modules/moraleserv/Makefile.in -text
|
||||
graveyard/modules/moraleserv/moraleserv.vcproj -text
|
||||
graveyard/modules/moraleserv/ms.c -text
|
||||
graveyard/modules/moraleserv/ms.h -text
|
||||
graveyard/modules/moraleserv/ms_help.c -text
|
||||
graveyard/modules/neoserv/Makefile -text
|
||||
graveyard/modules/neoserv/neoserv.c -text
|
||||
graveyard/modules/neoserv/neoserv_help.c -text
|
||||
graveyard/src/protocol/liquid.c -text
|
||||
graveyard/src/protocol/liquid.h -text
|
||||
graveyard/src/protocol/liquid.vcproj -text
|
||||
graveyard/src/protocol/mystic.c eol=lf
|
||||
graveyard/src/protocol/mystic.h eol=lf
|
||||
graveyard/src/protocol/mystic.vcproj -text
|
||||
graveyard/src/protocol/neoircd.c eol=lf
|
||||
graveyard/src/protocol/neoircd.h eol=lf
|
||||
graveyard/src/protocol/neoircd.vcproj -text
|
||||
graveyard/src/protocol/quantum.c eol=lf
|
||||
graveyard/src/protocol/quantum.h eol=lf
|
||||
graveyard/src/protocol/quantum.vcproj -text
|
||||
graveyard/src/protocol/viagra.c -text
|
||||
graveyard/src/protocol/viagra.h -text
|
||||
graveyard/src/protocol/viagra.vcproj -text
|
||||
graveyard/src/rtabans.c -text
|
||||
graveyard/src/rtachannels.c -text
|
||||
graveyard/src/rtamodules.c -text
|
||||
graveyard/src/rtaserv.c -text
|
||||
graveyard/src/rtaservers.c -text
|
||||
graveyard/src/rtausers.c -text
|
||||
include/Makefile.am -text
|
||||
include/Makefile.in -text
|
||||
include/adns.h -text
|
||||
include/adnsdlist.h -text
|
||||
include/adnsinternal.h -text
|
||||
include/adnstvarith.h -text
|
||||
include/auth.h -text
|
||||
include/bans.h -text
|
||||
include/base64.h -text
|
||||
include/botinfo.h -text
|
||||
include/bots.h -text
|
||||
include/channels.h eol=lf
|
||||
include/commands.h -text
|
||||
include/conf.h eol=lf
|
||||
include/config.h.in -text
|
||||
include/confuse.h -text
|
||||
include/ctcp.h -text
|
||||
include/dcc.h -text
|
||||
include/dl.h eol=lf
|
||||
include/dns.h eol=lf
|
||||
include/events.h eol=lf
|
||||
include/exclude.h -text
|
||||
include/hash.h eol=lf
|
||||
include/helpstrings.h eol=lf
|
||||
include/ircprotocol.h -text
|
||||
include/ircrecv.h -text
|
||||
include/ircsend.h -text
|
||||
include/ircstring.h eol=lf
|
||||
include/lang.h -text
|
||||
include/list.h eol=lf
|
||||
include/log.h eol=lf
|
||||
include/main.h -text
|
||||
include/modes.h -text
|
||||
include/modules.h -text
|
||||
include/neostats.h -text
|
||||
include/nsdba.h -text
|
||||
include/nsdbm.h -text
|
||||
include/nsevents.h -text
|
||||
include/numeric.h -text
|
||||
include/numerics.h -text
|
||||
include/perlmod.h -text
|
||||
include/protocol.h -text
|
||||
include/servers.h eol=lf
|
||||
include/services.h eol=lf
|
||||
include/settings.h -text
|
||||
include/signals.h -text
|
||||
include/sock.h eol=lf
|
||||
include/support.h eol=lf
|
||||
include/timer.h eol=lf
|
||||
include/transfer.h -text
|
||||
include/updates.h -text
|
||||
include/users.h eol=lf
|
||||
include/version.sh -text
|
||||
lib/Makefile.am -text
|
||||
lib/Makefile.in -text
|
||||
lib/curl/CHANGES -text
|
||||
lib/curl/COPYING -text
|
||||
lib/curl/Makefile.am -text
|
||||
lib/curl/Makefile.in -text
|
||||
lib/curl/README -text
|
||||
lib/curl/RELEASE-NOTES -text
|
||||
lib/curl/acinclude.m4 -text
|
||||
lib/curl/arpa_telnet.h -text
|
||||
lib/curl/base64.c -text
|
||||
lib/curl/base64.h -text
|
||||
lib/curl/config-win32.h -text
|
||||
lib/curl/connect.c -text
|
||||
lib/curl/connect.h -text
|
||||
lib/curl/content_encoding.c -text
|
||||
lib/curl/content_encoding.h -text
|
||||
lib/curl/cookie.c -text
|
||||
lib/curl/cookie.h -text
|
||||
lib/curl/curl.h -text
|
||||
lib/curl/curl.vcproj -text
|
||||
lib/curl/dict.c -text
|
||||
lib/curl/dict.h -text
|
||||
lib/curl/easy.c -text
|
||||
lib/curl/easy.h -text
|
||||
lib/curl/escape.c -text
|
||||
lib/curl/escape.h -text
|
||||
lib/curl/file.c -text
|
||||
lib/curl/file.h -text
|
||||
lib/curl/formdata.c -text
|
||||
lib/curl/formdata.h -text
|
||||
lib/curl/ftp.c -text
|
||||
lib/curl/ftp.h -text
|
||||
lib/curl/getenv.c -text
|
||||
lib/curl/getinfo.c -text
|
||||
lib/curl/getinfo.h -text
|
||||
lib/curl/hash.c -text
|
||||
lib/curl/hash.h -text
|
||||
lib/curl/hostip.c -text
|
||||
lib/curl/hostip.h -text
|
||||
lib/curl/http.c -text
|
||||
lib/curl/http.h -text
|
||||
lib/curl/http_chunks.c -text
|
||||
lib/curl/http_chunks.h -text
|
||||
lib/curl/http_digest.c -text
|
||||
lib/curl/http_digest.h -text
|
||||
lib/curl/http_negotiate.c -text
|
||||
lib/curl/http_negotiate.h -text
|
||||
lib/curl/http_ntlm.c -text
|
||||
lib/curl/http_ntlm.h -text
|
||||
lib/curl/if2ip.c -text
|
||||
lib/curl/if2ip.h -text
|
||||
lib/curl/inet_ntoa_r.h -text
|
||||
lib/curl/inet_pton.c -text
|
||||
lib/curl/inet_pton.h -text
|
||||
lib/curl/krb4.c -text
|
||||
lib/curl/krb4.h -text
|
||||
lib/curl/ldap.c -text
|
||||
lib/curl/ldap.h -text
|
||||
lib/curl/llist.c -text
|
||||
lib/curl/llist.h -text
|
||||
lib/curl/md5.c -text
|
||||
lib/curl/md5.h -text
|
||||
lib/curl/memdebug.c -text
|
||||
lib/curl/memdebug.h -text
|
||||
lib/curl/mprintf.c -text
|
||||
lib/curl/mprintf.h -text
|
||||
lib/curl/multi.c -text
|
||||
lib/curl/multi.h -text
|
||||
lib/curl/netrc.c -text
|
||||
lib/curl/netrc.h -text
|
||||
lib/curl/progress.c -text
|
||||
lib/curl/progress.h -text
|
||||
lib/curl/security.c -text
|
||||
lib/curl/security.h -text
|
||||
lib/curl/sendf.c -text
|
||||
lib/curl/sendf.h -text
|
||||
lib/curl/setup.h -text
|
||||
lib/curl/share.c -text
|
||||
lib/curl/share.h -text
|
||||
lib/curl/speedcheck.c -text
|
||||
lib/curl/speedcheck.h -text
|
||||
lib/curl/ssluse.c -text
|
||||
lib/curl/ssluse.h -text
|
||||
lib/curl/stdcheaders.h -text
|
||||
lib/curl/strequal.c -text
|
||||
lib/curl/strequal.h -text
|
||||
lib/curl/strtok.c -text
|
||||
lib/curl/strtok.h -text
|
||||
lib/curl/telnet.c -text
|
||||
lib/curl/telnet.h -text
|
||||
lib/curl/timeval.c -text
|
||||
lib/curl/timeval.h -text
|
||||
lib/curl/transfer.c -text
|
||||
lib/curl/transfer.h -text
|
||||
lib/curl/types.h -text
|
||||
lib/curl/url.c -text
|
||||
lib/curl/url.h -text
|
||||
lib/curl/urldata.h -text
|
||||
lib/curl/version.c -text
|
||||
lib/event/Makefile.am -text
|
||||
lib/event/Makefile.in -text
|
||||
lib/event/VERSION -text
|
||||
lib/event/WIN32-Code/config.h -text
|
||||
lib/event/WIN32-Code/misc.c -text
|
||||
lib/event/WIN32-Code/misc.h -text
|
||||
lib/event/WIN32-Code/win32.c -text
|
||||
lib/event/WIN32-Prj/libevent.dsp -text
|
||||
lib/event/WIN32-Prj/libevent.dsw -text
|
||||
lib/event/WIN32-Prj/libevent.vcproj -text
|
||||
lib/event/buffer.c -text
|
||||
lib/event/compat/sys/_time.h -text
|
||||
lib/event/compat/sys/queue.h -text
|
||||
lib/event/compat/sys/tree.h -text
|
||||
lib/event/devpoll.c -text
|
||||
lib/event/epoll.c -text
|
||||
lib/event/epoll_sub.c -text
|
||||
lib/event/err.c -text
|
||||
lib/event/evbuffer.c -text
|
||||
lib/event/event-internal.h -text
|
||||
lib/event/event.3 -text
|
||||
lib/event/event.c -text
|
||||
lib/event/event.h -text
|
||||
lib/event/evsignal.h -text
|
||||
lib/event/kqueue.c -text
|
||||
lib/event/log.c -text
|
||||
lib/event/log.h -text
|
||||
lib/event/poll.c -text
|
||||
lib/event/rtsig.c -text
|
||||
lib/event/select.c -text
|
||||
lib/event/signal.c -text
|
||||
lib/execinfo/Makefile.am -text
|
||||
lib/execinfo/Makefile.in -text
|
||||
lib/execinfo/README -text
|
||||
lib/execinfo/gen.py -text
|
||||
lib/nxml/Makefile.am -text
|
||||
lib/nxml/Makefile.in -text
|
||||
lib/nxml/mrss.h -text
|
||||
lib/nxml/mrss_download.c -text
|
||||
lib/nxml/mrss_edit.c -text
|
||||
lib/nxml/mrss_free.c -text
|
||||
lib/nxml/mrss_generic.c -text
|
||||
lib/nxml/mrss_internal.h -text
|
||||
lib/nxml/mrss_parser.c -text
|
||||
lib/nxml/mrss_write.c -text
|
||||
lib/nxml/nxml.h -text
|
||||
lib/nxml/nxml.vcproj -text
|
||||
lib/nxml/nxml_download.c -text
|
||||
lib/nxml/nxml_easy.c -text
|
||||
lib/nxml/nxml_edit.c -text
|
||||
lib/nxml/nxml_error.c -text
|
||||
lib/nxml/nxml_free.c -text
|
||||
lib/nxml/nxml_init.c -text
|
||||
lib/nxml/nxml_internal.h -text
|
||||
lib/nxml/nxml_namespace.c -text
|
||||
lib/nxml/nxml_parser.c -text
|
||||
lib/nxml/nxml_string.c -text
|
||||
lib/nxml/nxml_tools.c -text
|
||||
lib/nxml/nxml_utf.c -text
|
||||
lib/nxml/nxml_write.c -text
|
||||
lib/pcre/COPYING -text
|
||||
lib/pcre/Makefile.am -text
|
||||
lib/pcre/Makefile.in -text
|
||||
lib/pcre/README -text
|
||||
lib/pcre/dftables.c eol=lf
|
||||
lib/pcre/get.c eol=lf
|
||||
lib/pcre/internal.h eol=lf
|
||||
lib/pcre/maketables.c eol=lf
|
||||
lib/pcre/pcre.c eol=lf
|
||||
lib/pcre/pcre.h -text
|
||||
lib/pcre/pcre.vcproj -text
|
||||
lib/pcre/pcredftables.vcproj -text
|
||||
lib/pcre/study.c eol=lf
|
||||
logs/.keepme -text
|
||||
/makeconf -text
|
||||
modules/.indent.pro -text
|
||||
modules/Makefile.am -text
|
||||
modules/Makefile.in -text
|
||||
modules/connectserv/.indent.pro -text
|
||||
modules/connectserv/Makefile.am -text
|
||||
modules/connectserv/Makefile.in -text
|
||||
modules/connectserv/connectserv.vcproj -text
|
||||
modules/connectserv/cs.c -text
|
||||
modules/connectserv/cs.h -text
|
||||
modules/connectserv/cs_help.c -text
|
||||
modules/dbm/Makefile.am -text
|
||||
modules/dbm/Makefile.in -text
|
||||
modules/dbm/bdb/Makefile.am -text
|
||||
modules/dbm/bdb/Makefile.in -text
|
||||
modules/dbm/bdb/bdb.c -text
|
||||
modules/dbm/bdb/bdb.vcproj -text
|
||||
modules/dbm/convertdb.c -text
|
||||
modules/dbm/gdbm/Makefile.am -text
|
||||
modules/dbm/gdbm/Makefile.in -text
|
||||
modules/dbm/gdbm/bucket.c -text
|
||||
modules/dbm/gdbm/extern.h -text
|
||||
modules/dbm/gdbm/falloc.c -text
|
||||
modules/dbm/gdbm/findkey.c -text
|
||||
modules/dbm/gdbm/gdbm.c -text
|
||||
modules/dbm/gdbm/gdbm.vcproj -text
|
||||
modules/dbm/gdbm/gdbmclose.c -text
|
||||
modules/dbm/gdbm/gdbmconst.h -text
|
||||
modules/dbm/gdbm/gdbmdefs.h -text
|
||||
modules/dbm/gdbm/gdbmdelete.c -text
|
||||
modules/dbm/gdbm/gdbmerrno.c -text
|
||||
modules/dbm/gdbm/gdbmerrno.h -text
|
||||
modules/dbm/gdbm/gdbmexists.c -text
|
||||
modules/dbm/gdbm/gdbmfdesc.c -text
|
||||
modules/dbm/gdbm/gdbmfetch.c -text
|
||||
modules/dbm/gdbm/gdbmopen.c -text
|
||||
modules/dbm/gdbm/gdbmreorg.c -text
|
||||
modules/dbm/gdbm/gdbmseq.c -text
|
||||
modules/dbm/gdbm/gdbmsetopt.c -text
|
||||
modules/dbm/gdbm/gdbmstore.c -text
|
||||
modules/dbm/gdbm/gdbmsync.c -text
|
||||
modules/dbm/gdbm/getopt.h -text
|
||||
modules/dbm/gdbm/global.c -text
|
||||
modules/dbm/gdbm/hash.c -text
|
||||
modules/dbm/gdbm/proto.h -text
|
||||
modules/dbm/gdbm/systems.h -text
|
||||
modules/dbm/gdbm/update.c -text
|
||||
modules/dbm/gdbm/version.c -text
|
||||
modules/dccpartyline/Makefile.am -text
|
||||
modules/dccpartyline/Makefile.in -text
|
||||
modules/dccpartyline/dccpartyline.vcproj -text
|
||||
modules/dccpartyline/main.c -text
|
||||
modules/extauth/.indent.pro -text
|
||||
modules/extauth/Makefile.am -text
|
||||
modules/extauth/Makefile.in -text
|
||||
modules/extauth/extauth.c -text
|
||||
modules/extauth/extauth.vcproj -text
|
||||
modules/hostserv/.indent.pro -text
|
||||
modules/hostserv/Makefile.am -text
|
||||
modules/hostserv/Makefile.in -text
|
||||
modules/hostserv/README -text
|
||||
modules/hostserv/hostserv.c -text
|
||||
modules/hostserv/hostserv.h -text
|
||||
modules/hostserv/hostserv.vcproj -text
|
||||
modules/hostserv/hs_help.c -text
|
||||
modules/ircdauth/Makefile.am -text
|
||||
modules/ircdauth/Makefile.in -text
|
||||
modules/ircdauth/ircdauth.c -text
|
||||
modules/ircdauth/ircdauth.vcproj -text
|
||||
modules/limitserv/Makefile.am -text
|
||||
modules/limitserv/Makefile.in -text
|
||||
modules/limitserv/help.c -text
|
||||
modules/limitserv/limitserv.h -text
|
||||
modules/limitserv/limitserv.vcproj -text
|
||||
modules/limitserv/main.c -text
|
||||
modules/nstest/Makefile.am -text
|
||||
modules/nstest/commands.c -text
|
||||
modules/nstest/commands.h -text
|
||||
modules/nstest/events.c -text
|
||||
modules/nstest/main.c -text
|
||||
modules/nstest/main.h -text
|
||||
modules/nstest/nstest.vcproj -text
|
||||
modules/operlog/Makefile.am -text
|
||||
modules/operlog/Makefile.in -text
|
||||
modules/operlog/help.c -text
|
||||
modules/operlog/main.c -text
|
||||
modules/operlog/operlog.h -text
|
||||
modules/operlog/operlog.vcproj -text
|
||||
modules/perltest/Makefile.am -text
|
||||
modules/perltest/Makefile.in -text
|
||||
modules/perltest/NamedVarsInspector.pl -text
|
||||
modules/perltest/extension.ple -text
|
||||
modules/perltest/main.c -text
|
||||
modules/perltest/test.pl -text
|
||||
modules/protocol/Makefile.am -text
|
||||
modules/protocol/Makefile.in -text
|
||||
modules/protocol/asuka.c -text
|
||||
modules/protocol/asuka.vcproj -text
|
||||
modules/protocol/bahamut14.c eol=lf
|
||||
modules/protocol/bahamut14.vcproj -text
|
||||
modules/protocol/bahamut18.c -text
|
||||
modules/protocol/bahamut18.vcproj -text
|
||||
modules/protocol/client.c -text
|
||||
modules/protocol/client.vcproj -text
|
||||
modules/protocol/hybrid6.c -text
|
||||
modules/protocol/hybrid6.vcproj -text
|
||||
modules/protocol/hybrid7.c eol=lf
|
||||
modules/protocol/hybrid7.vcproj -text
|
||||
modules/protocol/inspircd.c -text
|
||||
modules/protocol/inspircd.vcproj -text
|
||||
modules/protocol/ircup10.c eol=lf
|
||||
modules/protocol/ircup10.vcproj -text
|
||||
modules/protocol/ircup10base.c -text
|
||||
modules/protocol/nefarious.c -text
|
||||
modules/protocol/nefarious.vcproj -text
|
||||
modules/protocol/plexus.c -text
|
||||
modules/protocol/plexus.vcproj -text
|
||||
modules/protocol/plexus3.c -text
|
||||
modules/protocol/protocol.txt -text
|
||||
modules/protocol/ultimate2.c eol=lf
|
||||
modules/protocol/ultimate2.vcproj -text
|
||||
modules/protocol/ultimate3.c eol=lf
|
||||
modules/protocol/ultimate3.vcproj -text
|
||||
modules/protocol/unreal31.c eol=lf
|
||||
modules/protocol/unreal31.vcproj -text
|
||||
modules/protocol/unreal32.c eol=lf
|
||||
modules/protocol/unreal32.vcproj -text
|
||||
modules/quoteserv/Makefile.am -text
|
||||
modules/quoteserv/Makefile.in -text
|
||||
modules/quoteserv/data/discworld -text
|
||||
modules/quoteserv/data/redneck -text
|
||||
modules/quoteserv/help.c -text
|
||||
modules/quoteserv/main.c -text
|
||||
modules/quoteserv/misc -text
|
||||
modules/quoteserv/quoteserv.h -text
|
||||
modules/quoteserv/quoteserv.vcproj -text
|
||||
modules/statserv/.indent.pro -text
|
||||
modules/statserv/GeoIP.dat -text
|
||||
modules/statserv/Makefile.am -text
|
||||
modules/statserv/Makefile.in -text
|
||||
modules/statserv/channel.c -text
|
||||
modules/statserv/channel.h -text
|
||||
modules/statserv/geoip/GeoIP.c -text
|
||||
modules/statserv/geoip/GeoIP.h -text
|
||||
modules/statserv/geoip/GeoIPBitReader.c -text
|
||||
modules/statserv/geoip/GeoIPBitReader.h -text
|
||||
modules/statserv/geoip/GeoIPCity.c -text
|
||||
modules/statserv/geoip/GeoIPCity.h -text
|
||||
modules/statserv/html/index.tpl -text
|
||||
modules/statserv/htmlstats.c -text
|
||||
modules/statserv/htmlstats.h -text
|
||||
modules/statserv/network.c -text
|
||||
modules/statserv/network.h -text
|
||||
modules/statserv/server.c -text
|
||||
modules/statserv/server.h -text
|
||||
modules/statserv/ss_help.c -text
|
||||
modules/statserv/stats.c -text
|
||||
modules/statserv/stats.h -text
|
||||
modules/statserv/statserv.c -text
|
||||
modules/statserv/statserv.h -text
|
||||
modules/statserv/statserv.vcproj -text
|
||||
modules/statserv/tld.c -text
|
||||
modules/statserv/tld.h -text
|
||||
modules/statserv/user.c -text
|
||||
modules/statserv/user.h -text
|
||||
modules/statserv/version.c -text
|
||||
modules/statserv/version.h -text
|
||||
modules/template/Makefile.am -text
|
||||
modules/template/Makefile.in -text
|
||||
modules/template/main.c -text
|
||||
modules/template/template.vcproj -text
|
||||
modules/templateauth/Makefile.am -text
|
||||
modules/templateauth/Makefile.in -text
|
||||
modules/templateauth/main.c -text
|
||||
modules/templateauth/templateauth.vcproj -text
|
||||
modules/textserv/Makefile.am -text
|
||||
modules/textserv/Makefile.in -text
|
||||
modules/textserv/barmaid.tsdb -text
|
||||
modules/textserv/help.c -text
|
||||
modules/textserv/icecream.tsdb -text
|
||||
modules/textserv/loveserv.tsdb -text
|
||||
modules/textserv/main.c -text
|
||||
modules/textserv/moraleserv.tsdb -text
|
||||
modules/textserv/textserv.h -text
|
||||
modules/textserv/textserv.vcproj -text
|
||||
modules/textserv/waitress.tsdb -text
|
||||
modules/update/.indent.pro -text
|
||||
modules/update/Makefile.am -text
|
||||
modules/update/Makefile.in -text
|
||||
modules/update/update.vcproj -text
|
||||
/neostats.in -text
|
||||
/neostats.motd -text
|
||||
/neostats.sln -text
|
||||
/neostatslibs.sln -text
|
||||
src/Makefile.am -text
|
||||
src/Makefile.in -text
|
||||
src/NV.xs -text
|
||||
src/NeoStats.pm -text
|
||||
src/confuselexer.l -text
|
||||
src/neostats.pm.h -text
|
||||
src/neostats.vcproj -text
|
||||
src/nsevents.c -text
|
||||
src/typemap -text
|
||||
src/win32/Gui/AssemblyInfo.cpp -text
|
||||
src/win32/Gui/Form1.h -text
|
||||
src/win32/Gui/Form1.resx -text
|
||||
src/win32/Gui/LogViewer.cpp -text
|
||||
src/win32/Gui/LogViewer.h -text
|
||||
src/win32/Gui/LogViewer.resx -text
|
||||
src/win32/Gui/LogWindow.cpp -text
|
||||
src/win32/Gui/LogWindow.h -text
|
||||
src/win32/Gui/LogWindow.resx -text
|
||||
src/win32/Gui/NeoStats[!!-~]Control[!!-~]Panel.cpp -text
|
||||
src/win32/Gui/NeoStats[!!-~]Control[!!-~]Panel.sln -text
|
||||
src/win32/Gui/NeoStats[!!-~]Control[!!-~]Panel.vcproj -text
|
||||
src/win32/Gui/app.ico -text
|
||||
src/win32/Gui/app.rc -text
|
||||
src/win32/Gui/resource.h -text
|
||||
src/win32/Gui/stdafx.cpp -text
|
||||
src/win32/Gui/stdafx.h -text
|
||||
src/win32/Gui/taillogfile.cpp -text
|
||||
src/win32/Rules.rules -text
|
||||
src/win32/ServiceTest/ServiceTest.cpp -text
|
||||
src/win32/ServiceTest/ServiceTest.vcproj -text
|
||||
src/win32/icon1.ico -text
|
||||
src/win32/neostats.bmp -text
|
||||
src/win32/neostats.conf eol=crlf
|
||||
src/win32/neostats.rc -text
|
||||
src/win32/neostatsversion.rc -text
|
||||
src/win32/resource.h -text
|
||||
src/win32/winmain.c -text
|
||||
tools/copyright-update.pl -text
|
||||
tools/generate_header -text
|
||||
tools/neostats.suppression -text
|
||||
tools/runvalgrind.sh -text
|
||||
tools/sqlphp/README -text
|
||||
tools/sqlphp/rta_tables.php -text
|
||||
tools/sqlphp/rta_view.php -text
|
||||
/ActivePerl-5.10.0.1002-MSWin32-x64-283697.msi -text
|
||||
/ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi -text
|
||||
|
|
1
.indent.pro
vendored
1
.indent.pro
vendored
|
@ -1 +0,0 @@
|
|||
-v -br -brs -cdw -ce -l200 -nbc -ut -ts8 -i8
|
52
AUTHORS
52
AUTHORS
|
@ -1,52 +0,0 @@
|
|||
The guys that have no social life, in order to give you NeoStats are:
|
||||
(speak for yerself fish :P~)
|
||||
|
||||
|
||||
Justin Hammond, AKA Fish - justin at dynam dot ac
|
||||
----------------------------------------
|
||||
Location: Singapore
|
||||
Currently:
|
||||
NeoStats Developer
|
||||
Found on:
|
||||
irc.irc-chat.net #NeoStats
|
||||
|
||||
Mark Hetherington, AKA M - m at neostats dot net
|
||||
-----------------------------------------
|
||||
Location: UK
|
||||
Currently:
|
||||
NeoStats Developer
|
||||
Found on:
|
||||
irc.ctcp.net #opers
|
||||
|
||||
DeadNotBuried, - dnb at neostats dot net
|
||||
---------------------------------
|
||||
Location: Australia
|
||||
Currently:
|
||||
NeoStats Developer
|
||||
Found on:
|
||||
irc.majestic-liaisons.com #neostats
|
||||
|
||||
Previous Developers:
|
||||
|
||||
Adam Rutter, AKA Shmad - shmad at neostats dot net
|
||||
-------------------------------------------
|
||||
Location: Canada
|
||||
Previously:
|
||||
One of the original developers of NeoStats.
|
||||
Developer of many modules both released and upcoming.
|
||||
Admin on irc-chat.net IRC Network.
|
||||
Found on:
|
||||
????
|
||||
|
||||
Unknown, AKA ^Enigma^ - enigma at neostats dot net
|
||||
-------------------------------------------
|
||||
Location: Australia
|
||||
Currently:
|
||||
MIA
|
||||
Previously:
|
||||
Developer since NeoStats 2.0.6 till 2.5 Beta
|
||||
Developer of many modules both released and upcoming.
|
||||
Admin on irc-chat.net IRC Network.
|
||||
Head Scripter NeoStats.Net
|
||||
Found on:
|
||||
????
|
BIN
ActivePerl-5.10.0.1002-MSWin32-x64-283697.msi
Normal file
BIN
ActivePerl-5.10.0.1002-MSWin32-x64-283697.msi
Normal file
Binary file not shown.
BIN
ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi
Normal file
BIN
ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi
Normal file
Binary file not shown.
5
BUGS
5
BUGS
|
@ -1,5 +0,0 @@
|
|||
For a list of known bugs and progress reports please use our bug
|
||||
tracking system at:
|
||||
|
||||
http://bugs.neostats.net/jira/
|
||||
|
340
COPYING
340
COPYING
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
43
CREDITS
43
CREDITS
|
@ -1,43 +0,0 @@
|
|||
NeoStats CREDITS:
|
||||
|
||||
The following people in this list are people who have helped us with the further
|
||||
development of NeoStats in their own various ways over the years and who have
|
||||
helped better this project for all users. Thanks to everyone :)
|
||||
|
||||
|
||||
chrisv at b0rked dot dhs net org
|
||||
Code for Dynamically Loading Modules (Hurricane IRCD)
|
||||
|
||||
monkeyIRCD Module Segv Catching code
|
||||
|
||||
Global-irc.net The original "beta" testers of NeoStats
|
||||
|
||||
sre (Stig) Hosting of NeoStats website and development shells
|
||||
for well over a year!
|
||||
|
||||
ErroR|51 Translation of FAQ and README files to portuguese.
|
||||
|
||||
eggy Proving to us our code still had bugs when we thought
|
||||
we had ironed them all out (and all his bug reports!)
|
||||
(And for driving us insane frequently)
|
||||
|
||||
M Providing a *LOT* of feedback on everything
|
||||
regarding NeoStats, and a updated makeconf
|
||||
file, and various bits of code, and most
|
||||
importantly, updating all our Documentation
|
||||
|
||||
Slev For Donating a WebSite template from www.boxedart.com. Thanks!
|
||||
|
||||
J. Michael Jones Giving us patches to support QuantumIRCd
|
||||
|
||||
Blud Giving us Patches to support MysticIRCd
|
||||
|
||||
^Enigma^ Previous Developer of NeoStats and a few
|
||||
Modules
|
||||
|
||||
herrohr liquid IRCd support
|
||||
|
||||
Shmad Previous Developer of NeoStats from version 1.0 till the 2.0 series
|
||||
|
||||
If we left anyone out of this list please email admin @ lists dot neostats
|
||||
dot net and if you do deserve to be on this list you shall be added.
|
742
ChangeLog
742
ChangeLog
|
@ -1,742 +0,0 @@
|
|||
===============================================================================
|
||||
NeoStats 3.x ChangeLog
|
||||
Anything we add/remove/fix/change is in here (even our rants)
|
||||
Fish (F), Mark (M), DeadNotBuried (D)
|
||||
===============================================================================
|
||||
* NeoStats * Version 3.0.2 (F)
|
||||
- Bump Version (F)
|
||||
- Partially fix the DNS related errors in NEO-426 (we were not canceling DNS queries successfully) (F)
|
||||
|
||||
* NeoStats * Version 3.0.1 (F)
|
||||
- Fix Inspircd module Glining *@* (Neo-428) (F)
|
||||
- Fix wrong prefixs for Inspircd Module as reported by Brain (F)
|
||||
- Some FreeBSD's define sig_atomic and we were not checking for it in
|
||||
configure. Fixed (F)
|
||||
- A much more robust checking if Perl is available in configure (F)
|
||||
- Bump Version (F)
|
||||
- Fix spelling mistake (one of many I'm sure) found by Paul Balfe (F)
|
||||
|
||||
* NeoStats * Version 3.0.0
|
||||
- Finish the Update Module (F)
|
||||
- Move the copyright handler in the HTML output of StatServ to a proper
|
||||
function, simplifies the HTMLOutput loop, and hopefully fixes NEO-420 (F)
|
||||
- Timers now only fire when needed, rather than once every second (F)
|
||||
- Update Libevent Logging to LogLevel 10 and enable it (F)
|
||||
- Update CURL to hopefully fix a "Invalid Socket" error (F)
|
||||
- We should be using channel TS's when sending mode changes etc (F)
|
||||
- Inspircd requires additional params for PONG messages. Update (F)
|
||||
- Add initial inspircd support for Inspircd 1.1 only. Still WIP (F)
|
||||
- Fix Userdump using channel mode function, rather than usermode function
|
||||
(F)
|
||||
- Make the default action in the Mode Parser to "Add" to work around a
|
||||
Inspircd bug (F)
|
||||
- Fix CmodePrefixToMask to return -1 rather than 0, then we can set certian
|
||||
characters to ignore (such as Inspircd's use of , as a delimiter in FJOIN
|
||||
command (F)
|
||||
- Fix inbuild SJOIN function to handle NULL mode param (F)
|
||||
- add SVSKILL recieving support to Unreal3.2 module. Might be worthwhile as
|
||||
a global function though (F)
|
||||
- Tokens are case sensitive (at least in Unreal) so make sure we use the
|
||||
right comparision for token checks (F)
|
||||
- Incorporate a Perl Script (NamedVarsInspector.pl) that allows you to view available NamedVar
|
||||
entries - Usefull for Perl Module Developers (F)
|
||||
- Implementation of DBA* routines for Perl Modules. (F)
|
||||
- Fix Ping value for servers when we first load up, to avoid StatServ
|
||||
broadcasting about servers lagged out by thousands of seconds (F)
|
||||
- Fix Logging Levels (F)
|
||||
- Fix the wrong ordering of transfer_status in Curl Code (F)
|
||||
- upgrade nxml and mrss libraries to latest version (F)
|
||||
- Fix up Debug Log Levels a bit to remove cruft (F)
|
||||
- StatServ should default to Enabled for Global Exclusions Setting (F)
|
||||
- Rename TextServ databases with extension tsdb and move into the Data
|
||||
Directory, rather than data/TSDB (F)
|
||||
- Context Sensitive Help is now in place (eg, !help versus /msg bot help) (F)
|
||||
- report command syntax in case of syntax errors (configurable)
|
||||
- TextServ uses confuse file format for databases (a bit more flexibility
|
||||
can be achived now) (F)
|
||||
- Correctly check error returns from LibEvent (F)
|
||||
- If colour is enabled and logging is enabled in connectserv, strip the
|
||||
message before writting the logfile (F)
|
||||
- Rename BOT_FLAG_SERVICEBOT to BOT_FLAG_ROOT to better reflect purpose (M)
|
||||
- Remove BOT_FLAG_NOINTRINSICLEVELS, intrinisc levels are now only applied to
|
||||
module root bots. (M)
|
||||
- Remove BOT_FLAG_NOINTRINSICSET since it is redundant due to the way bots are
|
||||
created. (M)
|
||||
- Open up command processor to secondary bots. (M)
|
||||
- Limit modules to a single root bot. (M)
|
||||
- Fix botinfo loading. (M)
|
||||
- With M's fix below, SERVICECMODE can now support multiple modes.
|
||||
Re-adjust the SET function to allow this. (F)
|
||||
- Allow multiple sjoin modes (M)
|
||||
- Fix StatServ Topic Counts incorrect (F)
|
||||
- Fix OperCount in StatServ (NEO-391) and Fix Raw (NEO-400) (F)
|
||||
- Add a new BOT flag to not load up the intrinisic set commands (F)
|
||||
- Fixed up a bug with ConvertDB (F)
|
||||
- Better detection of Berkeley DB (F)
|
||||
- Update Libevent to latest version (F)
|
||||
- Fix Timers because we were not updating the current time often enough(F)
|
||||
- Fix HTTP transfers when saving to memory (such as SecureServ) (F)
|
||||
- Currently, SERVICECMODE only supports a single mode. Make sure we check
|
||||
for that in the set handler (F)
|
||||
- Lots of Changes to LimitServ (F)
|
||||
- Fix a crash on shutdown with Perl Modules Loaded (F)
|
||||
- Make sure Perl Modules are not built when perl is disabled. (F)
|
||||
- Fix NEO-363, DNS Problem when shutting down (F)
|
||||
- Maybe a Fix for NEO-364 (F)
|
||||
- Implement Timeouts for CURL (NEO-380) (F)
|
||||
- StatServ GeoIP was using gethostbyname_r which isn't needed (F)
|
||||
- Fix ServiceRoot Validate Function and RootNick validate Function (F)
|
||||
- If we can't write to a logfile, bail out by calling exit, rather than
|
||||
do_exit() otherwise we end up in recursive hell (F)
|
||||
- Start work on EOB support which should also address bug Neo-381 (F)
|
||||
- Fix bug 261 - wrong Syntax Error message in oper only mode (M)
|
||||
- "make distcheck" now works so we can prepare snapshots easily. use
|
||||
--with-distversion={rev} to append revision to the tarball. This will
|
||||
also allow us to automatically generate snapshots via Pulse
|
||||
(http://svn.neostats.net/build/) (F)
|
||||
- Update "make dist" and almost fixed "make distcheck" (F)
|
||||
- Fix module version checking (We can't use VERSION define, as some modules
|
||||
might use it, so rename to NEO_VERSION) (F)
|
||||
- Fix Win32 compile again. (M)
|
||||
- Updated Muscle files to latest version (3.24) (F)
|
||||
- Fixed up configure problem with Perl so perl could never be found (F)
|
||||
- Started implementing NamedVars so perl can read from internal Hash's and
|
||||
List's (F)
|
||||
- We don't need g++ or c++ compilers, so tell libtool to shutup about those
|
||||
compilers (F)
|
||||
- Version Macro is fixed (F)
|
||||
- Curl now uses updated event based socket Code (F)
|
||||
- Fix up muscle code to run on Intel Mac's (F)
|
||||
- Update libcurl to 7.16.0 to take advantage of new event based socket
|
||||
code. Also link in SSL and zlib libaries for initial support for CURL and
|
||||
eventually the rest of NeoStats - Untested!
|
||||
- TODO: VERSION macro is breaking some newer compilers. (F)
|
||||
- StatServ COPY command is now RENAME since that is what it does. (M)
|
||||
- Fix segfault in StatServ COPY. (M)
|
||||
- Fix StatServ oper counts. (M)
|
||||
- Fix 4 year old bug in module loading. (M)
|
||||
- Fix up neostats startup script etc for cron related issues - Thanks to
|
||||
Digerati for the heads up(F)
|
||||
- add plexus 3 protocol file for reference (D)
|
||||
- Fix compile errors on GCC 2.95.4 (D)
|
||||
- QuoteServ shouldn't send signon messages to Neo Bots (F)
|
||||
- Fix LimitServ timer to not set limits every time (F)
|
||||
- NSDBAFetchRows2 function added, that also returns the key used to store
|
||||
the records to the handler as a string (F)
|
||||
- Utility tool called convertdb added to convert betweeen database modules (F)
|
||||
- GDBM Database files are now named <Module>-<table>.gdbm. GDBM database
|
||||
module will automatically rename files when first loaded (F)
|
||||
- Finish the Berkeley DB interface module (F)
|
||||
- Fix quoteserv prefix and suffix processing (F)
|
||||
- Really fix IRCu IP address conversions (F)
|
||||
- Include Modules loaded in segfault report (F)
|
||||
- Fix IRCu IP address detections (F)
|
||||
- have Pseudo Client change Channel modes on unreal3.2 instead of the Server (D)
|
||||
- Fix /msg neostats level when specifing a invalid nick (F)
|
||||
- Fix a issue with SVSJOIN on Unreal (F)
|
||||
- New Config option "Options, MaxSockets" to limit the number of available
|
||||
sockets that NeoStats can use (F)
|
||||
- Fix adns to correctly handle EINPROGRESS for TCP connections (F)
|
||||
- Make sure SET LIST shows the correct host entry if we using the default (F)
|
||||
- Fix the ordering of AddBot so that stored settings such as
|
||||
nick/ident/host etc are applied when the bots load (F)
|
||||
- Change LibCurl and LibPCRE to be statically compiled into NeoStats rather
|
||||
than as dynamic libraries (F)
|
||||
- Add libnxml library for Feature request 292 and new module "NewsServ" (F)
|
||||
- Module Runlevels were not being set for Curl Transfer callbacks, causing
|
||||
DB issues (F)
|
||||
- Add a prototype for the DBAFetchRows2, which returns the DBA key as well (F)
|
||||
- Update to libnxml 0.12 to fix a parser bug (F)
|
||||
- Fix compile error with libnrss (F)
|
||||
- Fix logic error when using default service bots host (F)
|
||||
- Fix addlevel command in hostserv reported by Prince (F)
|
||||
- Fix a problem with NeoNet and No Groups being sent during Login (F)
|
||||
- BDB - Make sure recovery is run when opening DB's (F)
|
||||
- BDB - Not all BDB have some enviroment flags (F)
|
||||
|
||||
* NeoStats * Version 3.0.a3
|
||||
- LimitServ: join/part bot on adding/deleteing channels if JOIN enabled (D)
|
||||
- HostServ: fix loading of previously added bans (D)
|
||||
- Finish up the core side NeoNet support. Modules such as SecureServ and
|
||||
OPSB are next (F)
|
||||
- Fix problem with DNS queries going to the wrong list when it needs to be queued up (F)
|
||||
- EVENT_KILL now also sends EVENT_QUIT so modules can just watch sign on/off
|
||||
rather than being forced to watch and process KILL. (M)
|
||||
- Add WHOIS processing. (M)
|
||||
- Add FindClient function. (M)
|
||||
- Add logging support to CommandReport function. (M)
|
||||
- Fix a crash with faked localkill messages (F)
|
||||
- Increase the backtrace size, as we go a lot deeper than we used to (F)
|
||||
- Add MODE_INIT_END and IRC_CMD_END macros for protocol table NULL
|
||||
terminators. (M)
|
||||
- Win32: system tray menu options for NeoStats web site and forums. (M)
|
||||
- Win32: add right click menu to system tray icon. (M)
|
||||
- Win32: minimise to system tray instead of task bar. (M)
|
||||
- First pass DBA redundancy reduction. (M)
|
||||
- HostServ: additional wildcard checks to fix security loophole. (M)
|
||||
- Replace SET VERSIONSCAN option with automatic support based on module
|
||||
flags. (M)
|
||||
- Fix OSX changes which prevent NeoStats running on any platform. (M)
|
||||
- Fix a potential security vulnerbility with user supplied strings (F)
|
||||
- NeoStats now compiles and runs on Mac OSX (Tiger) (F)
|
||||
- Introduce module override to allow a module bot to become the primary source
|
||||
of signon CTCP version requests. (M)
|
||||
- Add broadcast forms of CTCP events so that modules can watch just their own
|
||||
CTCP transactions or all CTCP transactions on the network. (M)
|
||||
- Introduce framework for unknown ctcp messages. (M)
|
||||
- Fix a memleak in ExtAuth (F)
|
||||
- Netinfo on Ultimate3 is like Globops, not a burst function (F)
|
||||
- Create core support for map generation accessible to all modules via a
|
||||
callback handler and tidy up StatServ map code to take advantage of
|
||||
the new function. (M)
|
||||
- Exclude system tidy ups and bug fix for module excludes. (M)
|
||||
- More Validatexxx functions which will allow for wildcards in the string
|
||||
tested. (M)
|
||||
- StatServ: boot time sanity checks for list and hash creation. (M)
|
||||
- StatServ: port version stats to DBA API. (M)
|
||||
- QuoteServ: add sanity checks to db loads. (M)
|
||||
- QuoteServ: fix win32 crash - strdup cannot be used in modules. (M)
|
||||
- Add strcasestr support function since not all systems support it. (M)
|
||||
- New macros NS_CMD_END() and NS_SETTING_END() for terminating command and set
|
||||
lists. (M)
|
||||
- ConnectServ colour logging is now settable via IRC (F)
|
||||
- First round of memory cleanups with Valgrind (F)
|
||||
- Create a runvalgrind.sh file with NeoStats suppressions for memory
|
||||
checking (F)
|
||||
- Sync up libevent to distribution of 1.1a (F)
|
||||
- Make QuoteServ take a optional database for Quote Command (F)
|
||||
- Fix up triggering WANT_NICKIP code (F)
|
||||
- Fix up quoteserv and un-init memory errors causing crashes for me (F)
|
||||
- let limitserv have a buffer (F)
|
||||
- CTCP version scans are now more flexible in (F)
|
||||
- This will make the version.h file reflect the current SVN Revision, not
|
||||
the include SVN revision number (F)
|
||||
- Perl 5.8.0 doesn't have XSRETURN_UV, so it does now via our checks (F)
|
||||
- Perl Module Support now has most functionality of standard C Modules.
|
||||
Need to fix up NeoStats.pm to do lots of sanity checking first though (F)
|
||||
- Fix a crash on shutdown in nsdba relating to not statically storing the hash key (F)
|
||||
- add missing modules lines to makeconf (D)
|
||||
- increase module limit to 40 (D)
|
||||
- TextServ: allow multiple channels per bot (D)
|
||||
- TextServ: allow databases to be used in multiple bots (D)
|
||||
- TextServ: install data files to TSDB sub folder of data (D)
|
||||
- Basic Perl Support thanks to XChat. Now time to write all the Hooks (F)
|
||||
- Change Source Layout, so we don't go and rebuild protocol and DB files
|
||||
all the time (F)
|
||||
- Implement framework for Perl Support (F)
|
||||
- Fix warnings that GCC 4.0 generates (F)
|
||||
- LimitServ: set minimum limit settable by LimitServ to Users + 1 (D)
|
||||
- LimitServ: fix paramter order being passed to ManageLimits (D)
|
||||
- Move Config file over to confuse engine, and redo makeconf to work with
|
||||
new config file format (F)
|
||||
- Move Secure.irc-chat.net update code to core to allow OPSB to use it as
|
||||
well (F)
|
||||
- Store the IP address we connect to in tme so we can reference it from
|
||||
other modules (F)
|
||||
- allow SERVICEROOT to check against IP Address as well as Host (D)
|
||||
- check if exclusions are already included in list before adding (D)
|
||||
- attempt to find bot unused nickname when both nick and altnick in use (D)
|
||||
- QuoteServ: add option to use global excludes (D)
|
||||
- QuoteServ: check signon quote setting before sending signon quote (D)
|
||||
- QuoteServ: fix crash when quotes requested but no databases defined (D)
|
||||
- Help system updated. The oneline help text is now part of the main help text
|
||||
for commands to simplify creation and maintainance of help text. (M)
|
||||
- QuoteServ: Add support for quotes at SIGNON. (M)
|
||||
- QuoteServ: Add support for prefix and suffix entries. (M)
|
||||
- QuoteServ: Add support for random quotes. (M)
|
||||
- Add new module: QuoteServ. (M)
|
||||
- TextServ: Add moraleserv database. (M)
|
||||
- TextServ: Add loveserv database. (M)
|
||||
- TextServ: Add database reading support. (M)
|
||||
- DCC fixes and move partyline support to an external module to aid
|
||||
development of the DCC module API. (M)
|
||||
- Add support to set topic from NeoStats. (M)
|
||||
- Add _m_ignorecommand function for protocol modules to silently drop messages
|
||||
that they receive but require no further processing by NeoStats. (M).
|
||||
- Add seperate protocol files for IRCu and variants rathe than require users
|
||||
to modify the code in order to access variants. (M)
|
||||
- New protocol support minismising the code required to implement an ircd
|
||||
protocol module for NeoStats by providing comprehensive and where possible
|
||||
automatic support for common functions. (M)
|
||||
- Add default modes to ircd layer to further reduce overhead of protocol
|
||||
modules. (M)
|
||||
- Add support for SVSJOIN and SVSPART. (M)
|
||||
- LEVEL command now resets user level so that users can cause NeoStats to
|
||||
recheck their access rights after any settings changes. (M).
|
||||
- Prevent ability to disable debug mode if DEBUG enabled to avoid all the
|
||||
overrides necessary in code. (M)
|
||||
- StatServ: Add FLATMAP option to prevent display of network layout in MAP
|
||||
command and HTML output (Bug 220). (M)
|
||||
- Add support for IRCd protocol modules to make server version requests. (M)
|
||||
- Add support for IRCd protocol modules to call core numeric reply
|
||||
handlers. (M)
|
||||
- Add support for IRCd protocol modules to make server uptime requests. (M)
|
||||
- Merge ADNS lib into core. (M)
|
||||
- add random channel member funtion (D)
|
||||
- Fix Win32 text output for log files. (M)
|
||||
- ADNS now uses neostats memory management. (M)
|
||||
- Merge gdbm lib and gdbm DBM module. (M)
|
||||
- StatServ: Merge GEOIP and GEOIPWIN32 libs. (M)
|
||||
- Merge ADNS and ADNSWIN32 libs. (M)
|
||||
- Module command setup is now more strict. Commands will not be added if the
|
||||
main help text or the one line help text is not set. (M)
|
||||
- Module loads are now more strict. About text and copyright text are required
|
||||
and if the code is based on the template text, this must be changed before
|
||||
the module will load. (M)
|
||||
- Fix FNMATCH error on configure (we don't use fnmatch) (F)
|
||||
- Fix SET RECVQ. (M)
|
||||
- More work on ossocket layer. (M)
|
||||
- Fix bug 221: crash when no command after ! in channel commands. (M)
|
||||
- Retire mystic, liquid, neoircd, quantum and viagra to graveyard. (M)
|
||||
- Update userhostmask/uservhostmask after nick change to keep current (D)
|
||||
- Recheck User Exclusions after updating userhostmask on Nick change (D)
|
||||
- Tidy up the new socket code (F)
|
||||
- Fix bug with ordering of process_ip in AddUser. nick variable isn't
|
||||
static, and usually is gone when we callback (F)
|
||||
- DCC Partyline support added (F)
|
||||
- replace socket/select code with a libevent based implementation (F)
|
||||
- Provide a "buffered" socket implementation for network communications (F)
|
||||
- Provide a "newline terminated protocol" socket implementation to handle
|
||||
IRCd and DCC Chat communications (F)
|
||||
- Add ability to exclude nick!user@host masks. (M)
|
||||
- Add nick!user@host and nick!user@vhost mask generation to core. (M)
|
||||
- DBA layer will now pass size of data fetched in FetchRows. (M)
|
||||
- Add support to ircd layer for processing ERROR messages from the uplink. (M)
|
||||
- Add optional SERVICE_HOST config entry to allow users to set a default host
|
||||
for service bots. If not specified, server name is used. (M)
|
||||
- DBA layer will now cause NeoStats to exit in the event of an error opening
|
||||
a table. (M)
|
||||
- Remove GDBM locking to try and fix problems on BSD. (M)
|
||||
- Remove RTA support. (M)
|
||||
- Add Umask function so our config files are not world/group readable, and
|
||||
update htmlstats in statserv to change the permissions after writting out
|
||||
the file (F)
|
||||
- StatServ: Fix last seen and start timestamps. (M)
|
||||
- Add support framework for SGLINE, SZLINE and SQLINE. (M)
|
||||
- Bahamut protocol module changed to bahamut14 and bahamut18 to allow support
|
||||
for both versions. (M)
|
||||
- Add operlog to supported modules. (M)
|
||||
- Add support for incoming GLOBOPS, CHATOPS and WALLOPS. (M)
|
||||
- HostServ: add nick/host/vhost limits to list command (D)
|
||||
- HostServ: add option to limit vhost adding to current nick only (D)
|
||||
- Introduce framework for new textserv module. (M)
|
||||
- Remove LoveServ and MoraleServ since these are to be replaced by the new
|
||||
textserv module. (M)
|
||||
- StatServ: Remove 2.5.x bdb remnants. (M)
|
||||
|
||||
* NeoStats * Version 3.0.a2
|
||||
- Fix bug with module excludes when there are multiple modules loaded using
|
||||
module excludes. (M)
|
||||
- Remove fieldname from settings structure since option already provides a
|
||||
unique string for storage. (M)
|
||||
- Add validate and random channel key functions. (M)
|
||||
- Remove RELOAD command from Win32. (M)
|
||||
- Fix RELOAD command not working reported by DNB. (M)
|
||||
- Fix problems with persistent bots reported by DNB. (M)
|
||||
- va_copy handling courtesy of Reed. (M)
|
||||
|
||||
* NeoStats * Version 3.0.a1
|
||||
- Add more info to segfault.log reports. (M)
|
||||
- Add ModFini return value so modules can return errors if required. (M)
|
||||
- Remove ModInit parameter since it is now redundant. (M)
|
||||
- Command processor code split up. (M)
|
||||
- Add SET_VALIDATE stage to allow a module to override core SET validation and
|
||||
to potentially react to the previous setting prior to SET_CHANGE. (M)
|
||||
- Command processor code split up. (M)
|
||||
- Add API for IRCd specific host cloaking. (M)
|
||||
- ConnectServ: Add option to watch AWAY events. (M)
|
||||
- CODERHACK changed to a more secure format. Users will now be required to set
|
||||
CODERHACK to a nick agreed between the network and the developent team so
|
||||
that even when we need to use this, the remains secure from a rogue user
|
||||
knowing the usual access nick (M)
|
||||
- API improvements fixing naming conventions and additional macro support. (M)
|
||||
- StatServ: Add option to configure old channel time. (M)
|
||||
- Add options to configure message flood sample time and threshold. (M)
|
||||
- StatServ: Since stats command only allows management of server stats,
|
||||
combined with server command. (M)
|
||||
- Add DCC support to NeoStats, you can now have a DCC chat with neostats and
|
||||
issue commands via this interface. (M)
|
||||
- Add CommandReport function for use by modules to report command information
|
||||
and take account of reporting options. (M)
|
||||
- Change NeoStats root user to use a config file nickname. This is for future
|
||||
use in multiple NeoStats incarnations running in a shared environment. (M)
|
||||
- Add module exclusion API so modules can use a local exclusion system without
|
||||
having to code and maintain one locally. (M)
|
||||
- Add WEEKLY and MONTHLY options to timer API. (M)
|
||||
- HostServ: ban use of "*" as realhost mask since this is a potential security
|
||||
risk. (M)
|
||||
- Updated handler systems so that a caller can "break" the list loop. (M)
|
||||
- Exclude system del now takes a host rather than an index. (M)
|
||||
- Channel members now use client pointer so they do not need to track nick
|
||||
changes. (M)
|
||||
- Fix up make install, make dist and wrappers for starting/stopping
|
||||
NeoStats (F)
|
||||
- Fix statserv map command, and fix neostats server list command (F)
|
||||
- Fix Statserv server minparam count (F)
|
||||
|
||||
* NeoStats * Version 3.0.prealpha2
|
||||
- First recommended release to devlist only as prealpha2. (M)
|
||||
- Port all database interaction to new DBA interface. (M)
|
||||
- Add support for GDBM as an alternative to BDB. (M)
|
||||
- New DB interface to replace keeper calls. (M)
|
||||
- Lots of AutoMake updates so that distros work again and external modules
|
||||
have includes available. (M)
|
||||
- StatServ: complete rewrite of statistics systems. (M)
|
||||
- Very basic stats added to core for debug, reported in STATUS command. (M)
|
||||
- Fix up memory leaks and missing list/hash clean ups. (M)
|
||||
|
||||
* NeoStats * Version 3.0.prealpha1
|
||||
- First recommended release to devlist only as prealpha1. (M)
|
||||
- New moddata API. We now have two values for use by modules, one being an
|
||||
allocated address and one a value. This allows the core to clean up after
|
||||
modules in the event that they fail to. (M)
|
||||
- RTA support has been moved back itno the core rather than being a module.
|
||||
It did work fine as a module, but was limited to providing core info only
|
||||
since there is no module <-> module communication at this point and created
|
||||
module depedencies. Making this a module will be looked at again at some
|
||||
future point. (M).
|
||||
- HostServ: Improved ban handling. (M)
|
||||
- HostServ: LEVELS command removed since core now handles this. (M)
|
||||
- All commands now have a configurable minimum user level using the command
|
||||
/msg botname LEVELS. (M)
|
||||
- HostServ: moddata use removed in favour of a simple flag in the core wrt
|
||||
user SETHOST from NeoStats. (M)
|
||||
- HostServ: BANS DEL now takes host as a parameter not an index. (M)
|
||||
- HostServ: DEL and VIEW now take nick as a parameter not an index. (M)
|
||||
- StatServ: add option to configure html update interval. (M)
|
||||
- Add support for persistent bots which do not auto leave channel when it is
|
||||
empty. (M)
|
||||
- Remove NETINFO event. Not available on all ircds and useless since the
|
||||
ModSynch call will let a module know the network is synched. (M)
|
||||
- Make joining services channel a SET option so people can prevent NeoStats
|
||||
bots joining the services channel. Generally, the bots can message channels
|
||||
without being in them. With them not being there means we can drop
|
||||
chanalerts when the channel is empty and save a bit of otherwise wasted
|
||||
bandwidth. (M)
|
||||
- USERDUMP etc commands changed to USERLIST etc to be consistent with similar
|
||||
commands. (M)
|
||||
- StatServ: updated to use core side kill types. (M)
|
||||
- ConnectServ: updated to use core side kill types. (M)
|
||||
- Process kill types within the core. (M)
|
||||
- ConnectServ: add logging facility to log events. (M)
|
||||
- Channel alerts for command use is now optional. (M)
|
||||
- Automatically remove NeoStats bots from channels when there are no longer
|
||||
any real users in the channel. The services channel is excluded. (M)
|
||||
- Add neousers counter to Channel structure for tracking our bot counts in a
|
||||
given channel. (M)
|
||||
- Core command processor can now handle channel message commands e.g. !help
|
||||
using the standard command tables. Command char is selectable via a SET
|
||||
option. (M)
|
||||
- Add new timer type TIMER_TYPE_COUNTDOWN. This is a one shot timer that
|
||||
deletes itself after it has triggered. (M)
|
||||
- Initial import of Language Functions. Two Macro's to use now, _(x) is for
|
||||
default language, and __(x, Client*) is for user/channel language
|
||||
settings. (F)
|
||||
- More portability wrappers for file access since Win32 DLLs do not appear to
|
||||
be able to use fopen etc locally. This also means we can look at using more
|
||||
optimal Win32 native file processing calls. (M)
|
||||
- NeoStats alloc/free functions updated. (M)
|
||||
- Begin adding portability functions for file system calls, socket management
|
||||
etc to make it easy for modules to be Win32 compatible. (M)
|
||||
- Remove all SqlSrv code from core in preparation for moving to a module. (M)
|
||||
- Alter CODERHACK dependency so it only requires a rebuild of auth.c rather
|
||||
than potentially a reconfigure and full rebuild. (M)
|
||||
- Change UserDump and ChanDump to use prefmsg rather than chanalert and remove
|
||||
calls during error conditions to prevent flooding the services channel. (M)
|
||||
- Extended and optimised mode support. (M)
|
||||
- Ability to enable/disable events so that a module can "optimise" it's event
|
||||
table based on options e.g. disabling ConnectServ sign watch can disable
|
||||
the SIGNON event core side. (M)
|
||||
- More flags added to event system to allow the core to automatically handle
|
||||
exclusions of NeoStats clients and global exclusion entries. The module can
|
||||
manipulate the current settings based on local options. (M)
|
||||
- Add error field to Module structure so the core can flag a module as being
|
||||
in an erroneous state and unload it at an opportune time. E.g. if a module
|
||||
calls init_bot from ModInit, the call will fail gracefully and the module
|
||||
will be automatically unloaded once the core rgains control. (M)
|
||||
- EVENT_ONLINE removed with previous functionality available via a ModSynch
|
||||
function. Advantages over the event are that it can return a failure status
|
||||
if for example an init_bot call fails and we can unload the module. It also
|
||||
means modules that do not need to use any other events can now ignore the
|
||||
event sub system and the core can do less event checking. (M)
|
||||
- neostats.cfg renamed to neostats.conf. This is to be more consistent with
|
||||
other packages and to avoid someone using a config file from an older series
|
||||
with NeoStats 3.0. (M)
|
||||
- Combine standard and auth module load/unload systems so we can load and
|
||||
unload auth modules easily. (M)
|
||||
- Remove me.onchan since it is always set with me.synched so is redundant. (M)
|
||||
- Replace me.synched references with IsNeoStatsSynched() for consistency. (M)
|
||||
- Timers now have a new type field to select the standard interval timer or
|
||||
a midnight timer. Other types to follow. (M)
|
||||
- Timers now check module synched before running. (M)
|
||||
- Event system now uses an array per module so that issuing an event is a
|
||||
simple (and quick) table lookup rather than parsing the whole list each
|
||||
time. This also makes it possible for modules to add and delete events while
|
||||
running. (M)
|
||||
- Core now handles synch checking for module events. If a module wants to
|
||||
receive an event before synch complete, they just add a flag into the event
|
||||
table and the core will always pass the flagged event along. (M)
|
||||
- Some new list and hash functions to standardise list/hash code. (M)
|
||||
- Fake deaf mode on IRCds that do not support it natively. (M)
|
||||
- CTCP handling to send and process CTCPs easily. (M)
|
||||
- Update events and group them by type so events.h is a more useful
|
||||
development resource. (M)
|
||||
- StatServ: Modify GeoIP for Win32 and add as a second version. (M)
|
||||
- StatServ: GeoIP lib moved to own directory. (M)
|
||||
- New debug levels of DEBUGRX and DEBUGTX to identify incoming and outgoing
|
||||
messages. (M)
|
||||
- Mode descriptions now handled core side so modules can share the information
|
||||
rather than define local variants. (M)
|
||||
- ConnectServ: mode reports now run from a table. (M)
|
||||
- More core side UMODE support. (M)
|
||||
- Add support for online bot realname, host and ident changes. (M)
|
||||
- Add support for IRCd SETNAME, SETIDENT and SETHOST functions. (M)
|
||||
- Add support for online bot nick changes. (M)
|
||||
- Combined BOTCHANLIST command with BOTLIST command. (M)
|
||||
- Remove redundant botchanhash code and tables. We can get this information
|
||||
via the bot, users structure channel list. (M)
|
||||
- Optimise bot quit paths. (M)
|
||||
- Optimise bot and associated user links to reduce lookups. (M)
|
||||
- Change module processing so we can have debug versions of DLLs. (M)
|
||||
- New Client struct introduced which contains common elememts of Server and
|
||||
User structs. Server and User specifics remain as substructs of Client. This
|
||||
makes for simpler coding for the more common elements and allows us to
|
||||
add additional clients without major changes to the core and API with new
|
||||
substructs in the Client struct. (M)
|
||||
- IRCD feature support is now self configuring based on whether a function
|
||||
exists to handle a feature. This means less work for IRCd coders and allows
|
||||
a protocol module to "emulate" a feature locally that would normally require
|
||||
additional core support. (M)
|
||||
- Mode processing code moved to modes.c/h (M)
|
||||
- Module API inmprovements and core flow optimisations. Functions now pass
|
||||
valid bot and user pointers rather than looking them up multiple times. (M)
|
||||
- makeconf updated to reflect changes and some tidy ups (M)
|
||||
- Depreciate some useless config items from neostats.cfg:
|
||||
STATSERV_NETNAME - we do not use this and overwrite it when we get netinfo
|
||||
NEOSTAT_HOST - Default to servername as host and allow online config
|
||||
NEOSTAT_USER - Default to Neo and allow online config
|
||||
This makes configuration easier (M)
|
||||
- Extend BotInfo structure and simplify init_bot function to use extended
|
||||
structure. (M)
|
||||
- Add synched field to Module structure so modules can tell when they are
|
||||
online without having to maintain local variables and can be taken offline
|
||||
easily by the core. (M)
|
||||
- Add automatic bot_info SET options. (M)
|
||||
- Core command processor now uses a hash for SET options to speed up option
|
||||
processing. (M)
|
||||
- Add feature check to load modules so that modules will not load if the
|
||||
selected protocol does not support a required feature. e.g. HostServ
|
||||
required SVSHOST support. (M)
|
||||
- Update auth modules so that they just calculate a level and leave the core
|
||||
to decide whether it overrides a current level. (M)
|
||||
- Reg nick support might not use mode +r so calculate the correct char when
|
||||
loading IRCd and use variable for checking it. (M)
|
||||
- Optimise UserLevel processing so after a user level is calculated it is then
|
||||
a lookup rather than needing to recalculate every time. (M)
|
||||
- Send STATS u request to incoming servers so we can store uptime info for
|
||||
statistics. (M)
|
||||
- Store client CTCP version reply in user struct so we can access it after the
|
||||
event. (M)
|
||||
- Send VERSION request to incoming servers so we can store version info for
|
||||
statistics. (M)
|
||||
- update hostserv to use match rather than fnmatch. (F)
|
||||
- More autotools updates to shut it up some more, and improve build process (F)
|
||||
- Update makeconf to generate a PROTOCOL line. (M)
|
||||
- Update automake files for core and protocol to observe new protocol module
|
||||
generation. (M)
|
||||
- Win32: Add debug console to GUI version with redirects of STDOUT and STDERR
|
||||
which depreciates the console version. (M)
|
||||
- Win32: Add fnmatch to core since it does not exist on Win32. (M)
|
||||
- Win32: Create protocol DLL files. (M)
|
||||
- Protocol system is now modular and required loading of a protocol module via
|
||||
neostats.cfg. (M)
|
||||
- Win32: Macros for modules/core exports for DLL compatibility. (M)
|
||||
- Win32: Create Win32 compatible dl_xxxx system for modules. (M)
|
||||
- Win32: Generate core export library for use by modules. (M)
|
||||
- New macro MSGTOK to use in protocol modules for MSG_*/TOK_* selection. (M)
|
||||
- Core no longer depends on protocol specific headers. (M)
|
||||
- Change protocol files to be more modular. Support functions accessed via
|
||||
pointers. (M)
|
||||
- Win32: Run NeoStats main code on a thread. (M)
|
||||
- Win32: Add very basic GUI. (M)
|
||||
- Win32: Disable fork. Windows handles processes differently. (M)
|
||||
- Win32: Disable unsupported signal processing. (M)
|
||||
- Win32: ADNS Win32 compatible library import. (M)
|
||||
- Win32: Macros created for *nix function not available. (M)
|
||||
- Win32: dl code disabled for first pass Win32 support. (M)
|
||||
- Win32: Socket code updated to WinSock compatible calls. (M)
|
||||
- Win32: Keeper KP_P reserved in Win32 so renamed to KP_PATH (M)
|
||||
- Win32: #define around header files not available under Win32 (M)
|
||||
- Win32: configwin32.h is a fixed config.h since Windows does not need
|
||||
different ones. Creates problem of how to choose IRCd. (M)
|
||||
- Win32: Early support for native compilation under MSVC .NET 2003 (M)
|
||||
- Change init_bot so that in client mode, module commands and settings are
|
||||
just added to the main bot. (M)
|
||||
- Begin adding a client protocol so that NeoStats can connect as a normal
|
||||
client rather than a server. (M)
|
||||
- Split unreal and ultimate protocol files into ultimate2, ultimate3, unreal31
|
||||
and unreal32 for easier maintainance. (M)
|
||||
- Begin moving common mode defines to neostats.h from ircd specific files. (M)
|
||||
- Channel key and limit modes now have explicit support rather than being
|
||||
included in general mode parameters list. (M)
|
||||
- Begin improved mode handling. Protocol module tables are parsed at boot into
|
||||
a faster core lookup table. The speedup is based on the fact that more often
|
||||
than not we lookup a mode char so we can index on this char rather than loop
|
||||
through every mode multiple times looking for a match. (M)
|
||||
- Import libtools wrappers for dynamic module support (F)
|
||||
- Full AutoConf Support on the way. Core Compiles. Modules Dont yet (F)
|
||||
- Remove hard coded protocol/feature references in StatServ and HostServ.
|
||||
These are depreciated by the new soft protocol design and will use the new
|
||||
protocol/feature references in the ModuleInfo struct where required. (M)
|
||||
- Begin replacing old #define GOTFEATURE with new FEATURE and PROTOCOL systems
|
||||
as part of soft protocol support. Currently it is still "hard" coded but
|
||||
will eventually move to the soft support system (M)
|
||||
- Replace spart_cmd with part_bot_from_chan function (M)
|
||||
- Add BANDUMP command to display ban table (M)
|
||||
- Remove debugtochannel and optimise code path of functions using it (M)
|
||||
- Remove ssjoin_cmd and sjoin_cmd functions. All channel joins must use
|
||||
join_bot_to_chan. (M)
|
||||
- Remove snewnick_cmd function. All new users must be introduced using
|
||||
init_bot (M)
|
||||
- Change is_pub_chan so it returns TRUE for a public channel. (M)
|
||||
- Begin IRCD "soft" protocol/feature design. (M)
|
||||
- Remove old CMODE_CH_xxx and CMODE_FL_xxx defines that new sjoin system makes
|
||||
redundant. (M)
|
||||
- Host OS value now saved by configure for use in version reporting and for
|
||||
bug reporting. (M)
|
||||
- Add support for NOQUIT so that NeoStats can delete users from disconnected
|
||||
servers without requiring individual QUITs (M)
|
||||
- Add support to recurse server list for SQUIT so that NeoStats can delete
|
||||
leaves of hubs which SQUIT (M)
|
||||
- Tidy exported include files (via make install) to the currently required
|
||||
minimum. (M)
|
||||
- Added DEBUGMOD option which allows selective debugging of a module so we can
|
||||
limit debug output to a single module when required. (M)
|
||||
- Command line option -v now reports a full IRCd string in the version so we
|
||||
no longer need the flag "help" text. (M)
|
||||
this is now handled by IRCdAuth. (M)
|
||||
- Removed -l (log level) command line option. This is now an online "SET"
|
||||
option which saved and restored via config system. (M)
|
||||
- Removed umode levels from IRCd protocol files and associated core code since
|
||||
this is now handled by IRCdAuth. (M)
|
||||
- ExtAuth: Added support for an access list system such that the master
|
||||
service root can manage users who have access to NeoStats and their
|
||||
individual levels. This removes the need for the older SERVICE_ROOTS options
|
||||
which have been superseded with the new SERVICEROOT option for master root
|
||||
and the access list maintained via IRC (M)
|
||||
- Authentication modules are now optional again. A single service root is
|
||||
required in the config file using a new SERVICEROOT option which follows the
|
||||
format of the old SERVICE_ROOTS option but is singlular and renamed to
|
||||
prevent upgraders relying on this working. This is used by the core to
|
||||
provide at least one user with NeoStats access regardless of authentication
|
||||
systems. (M)
|
||||
- Add dlog function to handle debug messages. nlog is now purely for normal
|
||||
logging purposes (M)
|
||||
- Add DEBUGCHAN setting for sending debug messages to channel and DEBUGTOCHAN
|
||||
setting to enable/disable it's use. (M)
|
||||
- Reorganised me and config structures. (M)
|
||||
- Debug mode is now a SET option rather than a command. (M)
|
||||
- Add set command to NeoStats to set user mode for service bots.
|
||||
/msg neostats set SERVICEBOTUMODE <mode>. default is defined in the IRCd
|
||||
specific services_umode string. (M)
|
||||
- Add set command to NeoStats to set channel mode for service bots.
|
||||
/msg neostats set SERVICEBOTCMODE <mode>. default is defined in the IRCd
|
||||
specific services_cmode string. (M)
|
||||
- Add services_cmode string to IRCd protocol files to set default channel
|
||||
modes for service bot that reflect IRCd capabilities to simplify sjoin
|
||||
code and module code for joins. (M)
|
||||
- New module auth system to support auth systems other than the 2.5 extauth.
|
||||
The core is now unable to provide any authentication and an auth module must
|
||||
be loaded. The old IRCd umode based auth is now a loadable module so is
|
||||
optional. Where a module wants to have local control over authentication,
|
||||
the 2.5.15+ ModAuth function has been renamed to ModLocalAuth to distinguish
|
||||
it from auth only modules. New config load module options have been added
|
||||
to support auth modules which require a slightly different style to standard
|
||||
modules. templateauth provides the example code for auth modules. (M)
|
||||
- configure now checks IRCD first so that if this required option is missed
|
||||
the user will be told immediately rather than after all other checks. (M)
|
||||
- Build process updates so that at configure time we only do what we need to
|
||||
and reduce the number of config.h files we need to maintain. (M)
|
||||
- New memory allocation wrappers functions scalloc, srealloc and sfree. (M)
|
||||
- Add SET VERSIONSCAN option to core for CTCP version scanning. (M)
|
||||
- StatServ: Optimise database save to further reduce code required and get
|
||||
back a little CPU. (M)
|
||||
- StatServ: Adjust exclusions so that counts are accurate. The exclusions
|
||||
produced cases where the current channel count was greater than the network
|
||||
record! (M)
|
||||
- IRCd version suffix now handled by configure rather than code. (M)
|
||||
- Introduce new debug.log system to store all current messages and debug info
|
||||
to avoid corrupting main system logs when in debug mode and allow users to
|
||||
submit this file for support rather than multiple ones from modules plus
|
||||
core. (M)
|
||||
- StatServ: reorganised code so stats code is encapsulated from module
|
||||
specifics and introduced new burst request system during init. (M)
|
||||
- Begin implementing "burst" request interface for modules to get current
|
||||
user/channel/server etc lists. (M)
|
||||
- Homogenize init error messages. (M)
|
||||
- Update core support functions to use new run level system to determine
|
||||
current module removing the need for modules to pass their module pointer
|
||||
when adding bots/timers/socks etc. (M)
|
||||
- Replace old segv_module system with new run level system. (M)
|
||||
- Keeper subdirs are now subdirs of main data dir. (M)
|
||||
- ConnectServ: reverse colour define so default is disabled. (M)
|
||||
- Core modules now use core config loading system (M)
|
||||
- All socket code now in socks.c for easier upgrade (M)
|
||||
- Early support for module semi auto config designed to perform loading of
|
||||
module config settings or set defaults without the module having to code it.
|
||||
Due to the need for custom set values, we will likely have to call the core
|
||||
function from the module rather than perform automatically at load time. (M)
|
||||
- Command processor set routine broken into helper functions for easier
|
||||
maintainance (M)
|
||||
- Rewritten command processor to use new command structure (M)
|
||||
- Moved signal code to signals.c/h (M)
|
||||
- New structure for passing to commands and events (M)
|
||||
- Removed NeoStats logs command since it is useless with multiple logs.
|
||||
Possibly look onto a LogView module sometime in the future if there is
|
||||
demand for this facility (M)
|
||||
- Begin adding return value processing for commands so core can handle common
|
||||
errors such as syntax error (M)
|
||||
- HostServ: removed old database format support (M)
|
||||
- Event system updates. Change type to int enum for faster processing. Some
|
||||
events renamed to be closer to irc commands so meaning is more obvious for
|
||||
module programmers and to assist the move from module_functions to events.
|
||||
Enum type protects event system at compile time. (M)
|
||||
- seperate auth system from main core so we can add new auth hooks (M)
|
||||
- send_sjoin bug fix where user has no modes (M)
|
||||
- Segfault reports are now directed to segfault.log rather than the main log
|
||||
files for easier submission (M)
|
||||
- subsystem structures now maintain a module pointer to lookup names rather
|
||||
than copies of the string. We can now lookup modules via a quick pointer
|
||||
compare rather than string compare and can access module information without
|
||||
addition function overheads. (M)
|
||||
- Modules must pass their module handle to the core for accessing bots/timers
|
||||
etc, once all interfaces use this system, try to "automate" the handle using
|
||||
some form of current_module/runlevel within the core (M)
|
||||
- Core and modules now share bot init code (M)
|
||||
- Updated bot interface to use a new bot_info structure (M)
|
||||
- ExtAuth: remove old format support (M)
|
||||
- Added instrinsic bot commands for ABOUT, CREDITS, VERSION (M)
|
||||
- Logging scope is now automatic rather than requiring a specific option (M)
|
||||
- Module support calls to access timers/bots/sockets etc must now pass
|
||||
correctly typed function pointers rather than using core symbol lookups (M)
|
||||
- dl.c/h split into files dedicated to a part of the module sytstem e.g.
|
||||
bots.c. dl.c/h now becomes our wrapper library for handling libdl plus
|
||||
future DLL and static support (M)
|
||||
- Added some extra fields to channel, user and server structures for future
|
||||
use (M)
|
||||
- Point of no return. Legacy 2.5 systems are now broken. Some 2.5.15 compliant
|
||||
systems will still work but all module backward compatibility has been
|
||||
stripped.
|
||||
- All core module changelogs moved to docs/old. Future core module updates
|
||||
will be included in the main NeoStats changelog (M)
|
||||
- Remove module API hacks (M)
|
||||
- Remove legacy stats.h, API is now exported via neostats.h only (M)
|
||||
- Depreciate support for __module_functions and associated ModuleFunction
|
||||
overheads, version 3.0 will send information to modules via events only (M)
|
||||
- Remove 2.5.5 and lower module compatibility systems (M)
|
||||
- New source tree layout implemented (M)
|
||||
- Begin version 3.0 development (M)
|
||||
|
||||
===============================================================================
|
||||
For older versions (1.x and 2.x) see Changelog.old
|
||||
===============================================================================
|
955
ChangeLog.old
955
ChangeLog.old
|
@ -1,955 +0,0 @@
|
|||
NeoStats ChangeLog - Anything we add/remove/fix/change is in here (even our rants)
|
||||
=====================================================================================
|
||||
* NeoStats * Fish (F) & Mark (M) * Version 2.5.15
|
||||
- Remove sprotocol_cmd since it is very ircd specfic (M)
|
||||
- Initialize me.now at bootup so we do not get random timestamps (M)
|
||||
- Fix Unreal PROTOCTL sending so it works correctly (M)
|
||||
- Add correct sjoin support to Unreal (M)
|
||||
- Introduce new ssjoin_cmd for sjoin processing (M)
|
||||
- Fix midnight detection in core (M)
|
||||
- kick_chan tidyups (M)
|
||||
- Trap and silently drop (but log) CTCP commands send to NeoStats (M)
|
||||
- tidy up of various error messages to help with tracking problems (M)
|
||||
- Log message when no configured modules in neostats.cfg (M)
|
||||
- UMODE_CH_xxxx defines for Smodes changed to SMODE_CH_xxxx (M)
|
||||
- Fix a off by one error in quit messages (F)
|
||||
- Temp fix for kick_chan when its a server performing the kick (BugID 108) (F)
|
||||
- Increaes Storage Size for AddStringToList (F)
|
||||
- Update all ircd channel modes, user modes, messages and tokens (M)
|
||||
- Change ircd command processing to be more efficient and easier to maintain (M)
|
||||
- Add support for storing server info line (M)
|
||||
- Add support for hostmasking (M)
|
||||
- Improve TS processing (M)
|
||||
- Simplified IRCd support so they are easier to maintain and to port new ircds.
|
||||
All outgoing messages go through send_xxx (e.g. send_notice) which just formats
|
||||
the message as required for the ircd. All incoming messages now go through one
|
||||
set of calls instead of two. An additional parameter srv states whether this was
|
||||
a server message or not for when a command needs different handling (e.g. nick).
|
||||
All such calls renamed to m_xxx e.g. m_nick to match ircd naming conventions
|
||||
so we can easily find in ircd source. Most of these calls now just need to format
|
||||
the incoming text and let the NeoStats core process it (M)
|
||||
- Added NICKV2 and UMODE2 support to Unreal (M)
|
||||
- Set segv_module before calling bot chan messages (M)
|
||||
- Added servicests support to Unreal and core (M)
|
||||
- New style splif buffer function introduced to save splits and joins (M)
|
||||
- Added system to overide the core parse and splitbuf functions for IRCu; will merge
|
||||
back into core when IRCu support complete (M)
|
||||
- Bug fix in NICKV2 for Unreal; realname was not parsed properly (M)
|
||||
- Privmsg checks moved to ircd command lists and core function provided for processing (M)
|
||||
- Add notice check to ircd command lists (M)
|
||||
- Cleaned up bot message and bot chan message handling (M)
|
||||
- Main services bot is not a mod_usr which tidies up command processing and let's NeoStats
|
||||
show up in bot channel lists (M)
|
||||
- Optimise core CTCP checks to avoid unnecessary processing (M)
|
||||
- Add numeric support to server structures (M)
|
||||
- Added a "Global" exclusion list to NeoStats so we can maintain a single exclusion list, instead of multiple ones like we have now with opsb, and SecureServ.
|
||||
- Added strnow to me structure. This is a string version of me.now. (M)
|
||||
- don't add a uplink to the NeoStats server struct, as this breaks statserv map (F)
|
||||
- StatServ now uses GeoIP database from maxmind. More accurate now that previous, as we can calculate location based on IP address and not DNS (F)
|
||||
- Fix the exclusion macro, & not && (M)
|
||||
- New IsMe macro and associated user and server flags. We can now detect NeoStats users/servers without a string compare (M)
|
||||
- Tidy up set and reset of segv_inmodule (M)
|
||||
- Valgrind Fixes. Some. Not All. Long way to go (F)
|
||||
- Add Viagra IRCD support contributed by OvErRiTe (M)
|
||||
- Tidy up makefiles and build process (M)
|
||||
- Add OpenBSD support (M)
|
||||
- Add wrappers fo dlxxx calls so we can support a.out and OSes requiring leading underscore on symbols (M)
|
||||
- Report errors for missing admin.motd fails in an appropriate manner with ERR_ numerics (M)
|
||||
- Introduce new file (neostats.h) to export API to modules. This will replace
|
||||
the stats.h and dl.h that we use at the moment and bring in functions from
|
||||
other headers that we export but should be restricted to the core. Why a new
|
||||
file? It allows us to track propogation to modules and maintain backward
|
||||
compatibility more easily (M)
|
||||
- Port core modules to use neostats.h and tidy up includes (M)
|
||||
- Add SVSTIME support so NeoStats can resolve TS problems - currently Unreal only (M)
|
||||
- Add IRCu P10 support (M)
|
||||
- Add support for Unreal's SWHOIS (M)
|
||||
- Add core support to store network ban info (M)
|
||||
- Add support for Unreal TKL bans (M)
|
||||
- New bot flag so bots can ignore channel messages when they do not need them (M)
|
||||
- Fix IRCu parsing and begin merging back to core (M)
|
||||
- Changed debug dump outputs to be more readable and make helper functions for
|
||||
each dump type instead of having the dump code written twice (M)
|
||||
- SERVERDUMP now takes an optional parameter of server name to work like chan/userdump (M)
|
||||
- Add new version information for checking modules and the core are compatible (M)
|
||||
- TLDmap for statserv now works on IRCd's that don't send a IP address in the connect Message (Unreal etc) (F)
|
||||
- Core will now lookup ip addresses of users connecting to the network if the IRCd doesn't specify it, and a module says it wants it (StatServ, and port OPSB over as well) (F)
|
||||
- StatServ now exports the TLD data to SqlSrv (F)
|
||||
- Added more types to core command set processor - NICK, USER, HOST, REALNAME, IPV4 and MSG (for multiple strings) (M)
|
||||
- Add Unreal EOS support for server synchs (M)
|
||||
- Add Berkeley support for statserv (M)
|
||||
- Add basic support for module side auth to use within SecureServ (M)
|
||||
- Fix for bug 117 (Buffer overflow) (M)
|
||||
- Add selection of rotuines to determine channel status e.g. is_chanop (M)
|
||||
- StatServ now saves and loads client version records (M)
|
||||
- Fix mode tracking for -k (Key) (M)
|
||||
- Vhost/Hidden Host system redone and get Unreal to Send Hidden Host with VHP protocol option (F)
|
||||
- AddStringToList now allocates memory as required rather than relying on a fixed limit (M)
|
||||
|
||||
* NeoStats * Fish (F) * Version 2.5.14
|
||||
- Fix a bug with HostServ unable to load the database
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M) * Version 2.5.13
|
||||
- Added a new event for Channel Mode changes (F)
|
||||
- Fixed up Ultimate2 Token Support (M)
|
||||
- Added some new params (Quit, KILL, part messages) to existing defines. Should not break backwards compat (F)
|
||||
- Fixed up a UserLevel problem with Smodes and made UserLevel function as per M's comments (F)
|
||||
- The built in Bot Message functions were not setting SEGV_INMODULE correctly, so logging was kinda screwed up. Fixed (F)
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M) * Version 2.5.12
|
||||
- Fixed a compile problem with some compilers with C++ comments etc (M)
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M) * Version 2.5.11
|
||||
- removed unused "hash" entry from structures (M)
|
||||
- new files to handle command related functions for new bot message system (M)
|
||||
- introduced flags field into ModUser structure (M)
|
||||
- generic bot message handler introduced to reduce module code bloat (M)
|
||||
- log messages now have second resolution (M)
|
||||
- Unreal support split between 3.1.x and 3.2.x since they require different support now (M)
|
||||
- Unreal updates to reflect the current versions of Unreal (M)
|
||||
- add MSG_SJOIN handling to Unreal (M)
|
||||
- added command handler support function is_target_valid to validate a user (M)
|
||||
- added __attribute__((format(printf,x,y))) and __attribute__((noreturn)) to header files (M)
|
||||
- early version of bot set handler introduced (M)
|
||||
- libcurl integration into NeoStats to handle FTP/HTTP (and future XML-RPC) transfers (F)
|
||||
- log handling changed to fix some problems with it. Logs are now always in full dated format (M)
|
||||
- all ircd feature defines changed to common naming convention GOTxxxx where xxxx is the feature
|
||||
to make it easier to remember and use them:
|
||||
HAVE_TOKEN_SUP -> GOTTOKENSUPPORT
|
||||
HAVE_BOT_MODE -> GOTBOTMODE (M)
|
||||
- MODE char defines used by connect serv renamed from xxx_MODE to UMODE_CH_xxx to make them
|
||||
obviously distinct from channel modes, easier to grep for and encourage support in other
|
||||
parts of the code. (M)
|
||||
- bug 86 fix - joinbuf was not validating input (M)
|
||||
- Ultimate 3 defines for smodes have move to a feature define of GOTUSERSMODES since Quantum
|
||||
and Liquid appear to need them and we want to avoid IRCd specific defines. (M)
|
||||
- moved all smode support into an appropriate #if block and removed susr_mds for ircds that
|
||||
do not need them. Only need if GOTUSERSMODES (M)
|
||||
- UserMode split into two, UserMode and UserSMode to handle smodes. Makes IRCds with no smode
|
||||
support more efficient (M)
|
||||
- Lots of cleanups in IRCd code and fixes for ADMIN command which was missing on some IRCds (M)
|
||||
- Some DOC updates for changes to commands (M)
|
||||
- Added FRENCH README doc/README.french (was bored and had time) (Shmad)
|
||||
- Fixed Hybrid Topic Crash? (BugID: 86) (F)
|
||||
- Fix potential High CPU usage (F)
|
||||
- Reformatted segfault reports to encourage users to submit full information with bug reports (M)
|
||||
- IRCd cleanups for common commands like admin/stats/motd/pong (M)
|
||||
- AddUser changes to fix bug 94 (M)
|
||||
- New function UmodeMaskToString as a helper for Umode handling (M)
|
||||
- Import new SQL Server emulation library, Real Time Access. (F)
|
||||
- new configure option --enable-sqlsrv to enable sql server emulation (F)
|
||||
- Fix up vhost handling on Ultimate (F)
|
||||
- Addded Smodetostring function (F)
|
||||
- NeoStats INFO command renamed to STATUS to match similar commands in modules (M)
|
||||
- __module_get_functions/__module_functions is now optional rather than required (M)
|
||||
- /VERSION will now provide module information from the core if possible (M)
|
||||
- Channel modes now use CMODE_ prefix rather than MODE_ (M)
|
||||
- Bots now unload after ModFini is called so they can still report messages (M)
|
||||
- All log filenames are now lower case for consistency across modules (M)
|
||||
- Changed Umode/SmodeStringtoMask function to accept current Umode, so we can do progressive mode changes (F)
|
||||
- StatServ data is now exported via SQL emulation as well. (F)
|
||||
- Created join_bot_to_chan function to allow modules to easily join their bot(s) to a given channel (M)
|
||||
- Lots of cleanups in the IRCd code. Should be much easier to maintain existing and create new IRCd support (M)
|
||||
- Fix up some compile problems with some of the IRCd's and fix lots of errors (F)
|
||||
- Created a script to check out the latest version each night, and do test compiles and email the results to devel@lists.neostats.net (F)
|
||||
- Add CloakHost function to provide hidden hostname support for bots - currently only supports Unreal (M)
|
||||
- This should fix up the SQL emulation a bit. the RTA library needs to be re-written anyway, so this is a temp solution.
|
||||
- Introduce flags structure to users/chans/servers. For upcomming "Global Exclude" list (BugID 98)
|
||||
- Fix bug in unreal netinfo netname processing (M)
|
||||
- Fix some potential bugs with statserv channel stats found by Trystan
|
||||
- Export loaded modules via SQL emulation
|
||||
|
||||
* NeoStats * Fish (F) * Version 2.5.10
|
||||
- Fix a problem with Umode +T being reintroduced on Unreal Beta19 as a normal usermode.
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M)* Version 2.5.9
|
||||
- import of libpcre into core (M)
|
||||
- added some defines for common user levels (M)
|
||||
- added some defines for common errors so functions can better handle failure conditions (M)
|
||||
- cleanup of default settings and configs - defaults were often set twice! (M)
|
||||
- fixed debug mode messages given to users under certain conditions (M)
|
||||
- main command list now in a table to make it easy to add new commands (M)
|
||||
- shorted some command text by stripping superfluous prefixes (M)
|
||||
- ns_set_debug disable bug fixed (M)
|
||||
- ns_set_debug function parameters changed to support command table (M)
|
||||
- ns_set_debug now requires explicit ON/OFF to make consistent with other commands (M)
|
||||
- removed chan from __Chan_Message parameters since it is in av[0] anyway (M)
|
||||
- cleanups of core functions and module API including cleanup of module types and references (M)
|
||||
- Updated command user levels and associated help text (M)
|
||||
- Made M's bot message handling and help functions dynamic.. so modules can add/remove commands to the services bot... should make these functions a bit more generic so they could be called from any modules to handle messages. (F)
|
||||
- imported LiquidIRCd support from herrohr (F)
|
||||
- Admin text filename changed from "stats.admin" to "neostats.admin" (M)
|
||||
- Added services_bot_modes to each IRCd. This should contain the required ircd specific modes for a services bot (M)
|
||||
- fix a bug with statserv map (F)
|
||||
- Output channel related data in daily and network information on HTML page for statserv (F)
|
||||
- Added change_mod_timer_interval function to update timer interval for an existing timer (M)
|
||||
- Added optional parameter to level command to lookup level of another user (M)
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M)* Version 2.5.8
|
||||
- strncpy replaced by strlcpy - faster and safer (M)
|
||||
- Replaced redundant strlen calls with faster and safer alternatives (M)
|
||||
- Created optimised irc[v]s[n]printf functions to replace [v]s[n]printf (M)
|
||||
- Created ircstr[n]casecmp functions to replace str[n]casecmp for IRC strings (M)
|
||||
- Loading modules from IRC and config is now case insensitive. But filenames in dl directory must be all lower case (M)
|
||||
- All files used by NeoStats are now #defines in stats.h to allow easy updates/changes (M)
|
||||
- IRCD specific version strings are now stored in the ircd specific files (M)
|
||||
- RAW command now uses sts rather than custom write code (M)
|
||||
- More typo fixes and general cleanups (M)
|
||||
- Removed large stack based buffers for better security and performance (M)
|
||||
- References to coders are now depreciated and work differently so:
|
||||
sendtocoders() renamed to debugtochannel() since that is what it actually does
|
||||
ns_debug_to_coders() renamed to ns_set_debug()
|
||||
me.coder_debug renamed to me/debug_mode (M)
|
||||
- Began reworking do_exit code (M)
|
||||
- Introduced FATAL_ERROR system for modules to call in the event an error is encountered which requires NeoStats to terminate (M)
|
||||
- Change module list by removing redundant structure and just having a list of pointers (M)
|
||||
- Event functions now use #defines rather than hard coded strings (M)
|
||||
- added the ability to call functions that externally set up FD's to read. Why did I use Poll? because eventually all the socket stuff is going to get re-written, and the pollfds stuct is a lot better for flexibility than select! (F)
|
||||
- This *could* be 2.5.8. Update version (F)
|
||||
- replaced all calls to time(NULL) with me.now, which is updated a couple of times each loop. Should reduce the number of system calls a bit. (F)
|
||||
- StatServ has had big performance improvements with regards to the database. Now progressively saves channel data, and only loads channel data when required. Should stop some of those mysterious 8 hour pingouts on large networks and reduce memory overhead ! (F)
|
||||
- dont do assertion checking by default anymore. We are pretty stable. pass --enable-debug to configure to enable if you have weird crashes now (F)
|
||||
- Some Memory Leak cleanups (F)
|
||||
- install -C will not overwrite existing files...
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M)* Version 2.5.7
|
||||
- Update parse() and splitbuf to suport IRCu (F)
|
||||
- DCC exploit fix which should also address other segfaults with long messages to connected bots (M)
|
||||
- Fix for statserv map command (M)
|
||||
|
||||
* NeoStats * Fish (F) & Mark (M)* Version 2.5.6
|
||||
- Added MrAllThats Colourisation of ConnectServ Messages (F)
|
||||
- Fixed ConnectServ to not show notices for local events (BugID: 44) (F)
|
||||
- Fixed a compile problem with StatServ (BugID: 47) (F)
|
||||
- Strip Colors from clientversions in StatServ (F)
|
||||
- Output clientversions in the HTML output (ReqID: 40) (F)
|
||||
- First go and implementing Data API. SLOOOOW (DON'T USE THIS FOR PRODUCTION) (F)
|
||||
- update doco slightly (F)
|
||||
- Keeper wasn't doing so good at caching files. Fixed that (F)
|
||||
- StatServ now stores and retrives all data from the Keeper Database. old data/*.db code kept to help upgrade to the new database backend (F)
|
||||
- Some Cleanups suggested by Mark (M)
|
||||
- Update Config script (F)
|
||||
- Fixed ConnectServ nickwatch being Fubar (BugID 49) (F)
|
||||
- We now moved to SubVersion and moved the repository to http://svn.neostats.net/ Check the homepage out for more details (F)
|
||||
- Removed OperMe from svn repository (F)
|
||||
- Updated Keeper to make sure it only writes files out that are readable by us (M)
|
||||
- Fix BugID 52, ServiceRoots enabled twice for Hybrid7 compiles (M)
|
||||
- Mark send a few patches for logging issues and dl.c issues as well as a updated Config script (M)
|
||||
- Fix a printf statement that shouldn't be there (M)
|
||||
- more patches from mark fixing up segvinmodules and the module init code standard (M/F)
|
||||
- updates from mark on Log formatting (M)
|
||||
- HostServ upgraded to use lists, keeper for datastorage. list output is sorted and a max of 20 entries are displayed per /msg hostserv list (M)
|
||||
- More cleanups and IRCd portability updates from Mark. (M)
|
||||
- Changes to help files to use a common format, fix typos etc (M)
|
||||
- Added missing help text for MODBOTLIST etc (M)
|
||||
- Overhaul of module system to improve error checks and minor bug fixes (M)
|
||||
- Minor cleanups throughout the code (M)
|
||||
- Completion of log filename format system. Filename format is now user configurable (M)
|
||||
- Module unloading cleanup. We now have a common function unload_modules() to do this. (M)
|
||||
- Paranoid buffer overflow checking - all strcpy and sprintf changed to strncpy and snprintf (M)
|
||||
- Changed all instances of "neostats.cfg" to CONFIG_NAME (M)
|
||||
- Changed "not Tech Admin" type errors to "not authorised" (M)
|
||||
- Improved comments in makeconf and added support for custom log filenames (M)
|
||||
- HostServ supports Undernet style hidden hosts for Registered users now. (F)
|
||||
- Module API improvements removing the need for the get functions to get function tables etc (M)
|
||||
- Changed all modules to use new module export API (M)
|
||||
- Load/Unload module name and case fixes (M)
|
||||
- Improved buffer overrun protection in use of strncpy and snprintf (M)
|
||||
- Hybrid cleanups as suggested by Hwy. (F)
|
||||
- Fixed a bug with Non-Zero counts with StatServ when loading up. (F)
|
||||
- Tidy up Jupe Command. Now echo's a message back to the user when the jupe is done (F)
|
||||
- Fix up a Segv_inmodule error in the dns stuff. Its a hack, but works (F)
|
||||
- Don't set hidden hosts for opers (F)
|
||||
- Statserv HTML fix for clientversions when its empty (F)
|
||||
- Added support for numeric to config file (M)
|
||||
- Added defines for parameter used in do_exit and ported calls accordingly (M)
|
||||
- Improvements to return values and error checking (M)
|
||||
- Removed unused TimerReset (M)
|
||||
- renamed chk() to CheckTimers() (M)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.5
|
||||
- Module API version number
|
||||
- When modules load, __ModInit is called if exported.
|
||||
- When Modules unload, __ModFini is called if exported.
|
||||
- Added IsChanMember Function
|
||||
- fix alias related problems. BUGID: 30
|
||||
- fixed error message in makeconf BUGID: 32
|
||||
|
||||
* NeoStats * Fish * Version 2.5.4 (Never Released)
|
||||
- Fixed a core with using strcasecmp instead of strcmp in the parse function.
|
||||
- Moved is_pub_chan from SecureServ to NeoStats
|
||||
- Implemented Bahamut support and necessary functions
|
||||
- make the ping time configurable.
|
||||
- Make Timers deletable from inside the timer function!
|
||||
- Added DelConf to the keeper interface
|
||||
- Maybe fixed a problem with usercounts on the neostats server
|
||||
|
||||
* NeoStats * Fish * Version 2.5.4 Pre2
|
||||
- Fixed a problem with statserv and the HTML settings
|
||||
- Fixed a problem with statserv and channel member counts (didn't decrease for kicks)
|
||||
- Implemented our own Assertion function to show backtraces and log it. Changed all asserts to nassert
|
||||
|
||||
* NeoStats * Fish & Shmad * Version 2.5.4 (or 2.6.0)
|
||||
- Initial import for Mystic 1.1.x IRCd support
|
||||
- Updated all copyright notices.
|
||||
- added updated makeconf script from M (mark@ctcp.net)
|
||||
- Committed and updated all of M's Documentation Updates
|
||||
- Added M's "Config" script for helping to automate the ./configure options
|
||||
- Fixed a bug with StatServ's HTML settings BugID 23
|
||||
- Fixed a problem with floodcontrol crashing NeoStats BugID 18
|
||||
- Only opers can stats m
|
||||
- First Pass of Spliting up ircd.c to make IRCD porting easier
|
||||
- Added some Doco Updates from M, and connectserv cleanups
|
||||
- Don't rotate empty log files!
|
||||
- Finished first pass of IRCd portability updates
|
||||
- users/servers/channels/modes now have a module data pointer
|
||||
- Fixed (again) FloodControl Code: BugID 18. Now uses svskill. Should be more robust.
|
||||
- Tested long and hard the Ultimate3 IRCd port. Should be good. :)
|
||||
- Added Quantum/Bahamut/IRCu framework
|
||||
- Commited Bluds IRCd port for Mystic. Un-tested.
|
||||
- Ultimate2 akills are moved to glines. BugID#29
|
||||
- ModNum Structure created for tracking module numbers for module data pointers in users/server/channels/modes pointers
|
||||
- Unreal works (it seems)
|
||||
- Ultimate2/3 Works
|
||||
- Fixed the wrong oper counts with StatServ. ConnectServ was the culprit
|
||||
- Commited J. Michael Jones (mj12@afnetinc.com) QuantumIRCd support
|
||||
|
||||
* NeoStats * Fish * Version 2.5.3
|
||||
- Added ability to turn off StatServ wallops. "/msg statserv set msgthrottle off" - BugID#6
|
||||
- NLOG called from a Module Socket Function was Fubar. Fixed
|
||||
- Fixed a Hybrid7 Compile problem -BugID#7
|
||||
- Fixed a problem with sumodes_cmd for Ultimate/Unreal
|
||||
- Added RealName Storing (dunno why we didn't do it before)
|
||||
- Jupe was fixed - BugID#4
|
||||
- make install was failing in the tools directory on some systems. Fixed - BugID#8
|
||||
- missed -f switch in ./neostats -h summary usage
|
||||
- This should teach people to "make install" :)
|
||||
- changed the fork-Load_modules corder to fix some issues with calling_fini after we exit the foreground process after forking.
|
||||
- removed a un-used variable in the server struct
|
||||
|
||||
* NeoStats * Fish * Version 2.5.2
|
||||
- Added Keeper Library for storing configuration and optionally data, and reserved space for language file storage
|
||||
- Added kptool, a command line tool from keeper libary to maintain configuration databases
|
||||
- Added configtool, a GTK gui to maintain config database (from Keeper Libary)
|
||||
- started work on configtool to suit NeoStats setup.
|
||||
- added conf.h and keeper.c, the NeoStats API to the keeper database.
|
||||
- Created and tested initial SetConf, GetConf functions to set and retrive config data.
|
||||
- added the ability for NeoStats to Bind to a IP address. Put "BINDTO <ipaddy>" in the neostats.cfg to effect this. Works for all network communication (including opsb)
|
||||
- Continue to try to load modules even if one fails when booting up.
|
||||
- Added Command line options processing:
|
||||
Quiet Mode: usefull for cron scripts
|
||||
No Load: Don't load modules on startup
|
||||
recv.log: enable recv.log
|
||||
debug level: what level to write debug messages.
|
||||
help and version info
|
||||
- Started the new logging function, nlog
|
||||
- Added a function, do_exit, that should be called when exiting NeoStats to flush and close the logs and perform any cleanup that should be done. Hopefully one day we can get rid of the execve code!
|
||||
- Converted over all log functions to nlog in the core
|
||||
- Catch SigINT signal as well, so we can flush log files
|
||||
- fixed a typo with unloading modules
|
||||
- strtolower sucks arse man... :(
|
||||
- ServiceRoots now prefers and uses the syntax <nick>!<ident>@<host>. Wildcards are permitted.
|
||||
- all Logfiles are not rotated at midnight
|
||||
|
||||
* NeoStats * Fish * Version 2.5.1
|
||||
- ConnectServ's username was too long for NeoIRCd, fixed
|
||||
- Fixed a usermode bug with NeoIRCd and the bots
|
||||
- Fixed a username overflow?
|
||||
- Fixed a username length problem with MoralServ
|
||||
- Fixed a problem with opercounts in statserv
|
||||
- Hardcoded select timeout at 1 second, as I think it was fubared with adns and opsb
|
||||
- Moved Version information to a interface that we can use to check via Modules... so we can easily handle minor API changes (forthcomming)
|
||||
- renamed stats.log to neostats.log...
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0
|
||||
- Fixed up UserLevels with SMODE support on Ultimate3 (sigh)
|
||||
- Fixed a bug when adding entries to hostserv if the nick already exists
|
||||
- Added rakill (or equivelent) support to Core for opsb remove function
|
||||
- Fixed up a problem with joinbuf that was caused when we moved to snprintf :(
|
||||
|
||||
* NeoStats * Fish & Shmad * Version 2.5.0-Release Candidate 3
|
||||
- Added support to makeconf for WALLOP_INTERVAL (S)
|
||||
- Fixed up --enable-auth==TYPE typo in configure script
|
||||
- Moved to AutoConf2.13 to fix bsd ./configure issues
|
||||
- Fixed Compile warning in adns on BSD systems
|
||||
- Fixed up /msg neostats@stats.neostats.net messages to work correctly
|
||||
- Fixed a big arse bug with Multiple SJOIN's for the same channel, and incorrect channel status modes getting set on users.
|
||||
- StatServ now only Wallops records in a configurable amount of time. eg, 5 records in 5 minutes
|
||||
- Some of statserv stats were never displayed, fixed that
|
||||
- Flood control now works by default for all module bots
|
||||
- Fix a adns compile error and remove the warnings
|
||||
- -Wall is only set when compiling with debug mode support. No need for the make.log file anymore
|
||||
- ./configure --enable-bignet support for more than 2000 users
|
||||
- Started Documenting internal functions for DoxyGen (About time I did this)
|
||||
- Created 2.6.0 branch in CVS
|
||||
- Module Loading global messages are now handled by core, not Modules
|
||||
- Ultimate3 now uses SJOIN to join channels
|
||||
- Fixed a bug with RELOAD
|
||||
- StatServ updates
|
||||
- Ultimate Smode (a28) added, but what did I break?
|
||||
- Some Solaris Porting fixes thanks to Hwy.. Time to get onto the Solaris Compile file at sf though :(
|
||||
- Removed Bignet Support, and made lists dynamic now
|
||||
- Added ChangePass and Banned Vhosts to HostServ, and moved HostServ to Hash tables.
|
||||
- Fixed a bug with users being marked away multiple times, thus, screwing up statserv stats :(
|
||||
- Compile fixes and warnings
|
||||
- memprof found me a few memory leaks. Fixed them up :)
|
||||
- the solaris fixes broke a bunch of stuff, reversed them out for now
|
||||
- join 0 support
|
||||
- moraleserv bugs fixed
|
||||
- ultimate3 SMODE support
|
||||
- Ultiamte3 SMODE broke ConnectServ. Bah Humbug
|
||||
- stopped double global messages when a module is loaded/unloaded
|
||||
- some more memory leaks found with memprof and a 4000 user network!!!!
|
||||
- Drastically reduced the amount of memory that Neostats now uses. 4000 users used to be around 12Mbs, got it down to 3.6Mbs
|
||||
- Fixed up connectserv for SMODE support
|
||||
- Fixed a buffer overflow found by jerome
|
||||
|
||||
* NeoStats * Shmad & Fish * Version 2.5.0-Release Candidate 2
|
||||
- Misc. Updates (S)
|
||||
- Added new conftype option NO_LOAD if not commented out, Neo wont load. This is to force people
|
||||
to read the manual and to PROPERLY configure their conf file. (S)
|
||||
- Due to major issues with Versions of UltimateIRCd3.x.x prior to a26 SSJ3 and SSJ4 support has
|
||||
again been removed. Lets just leave it at SSJ5 now! (S)
|
||||
- stats.motd is now neostats.motd demo neostats.motd included with distro (S)
|
||||
- Code cleanup. (S)
|
||||
- Fixed Ultimate2 CHGHOST for vhosts.. ugh im going insane..tested & working (S)
|
||||
- Misc. Module updates (S)
|
||||
- Ultimate 2 uses CHGHOST not SETHOST, updated internals to reflect this. (S)
|
||||
- Ported NeoStats to NeoIRCD, but still needs a lot of work (It links, modules not tested/ported yet) (F)
|
||||
- Fixed a mode problem on unreal reported by [Apache]
|
||||
- Fixed the fix for the fix of the mode problem
|
||||
- We only enable recv.log if in debug mode now... Neo is pretty stable as to not need this anymore.
|
||||
- Fixed up NeoIRCd protocol support for hostserv etc
|
||||
- updated some of the modules to work with NeoIRCd
|
||||
- ./configure --enable-raw to enable raw command now as it was tending to be abused
|
||||
- Fixed a Serviceroots buffer overflow
|
||||
|
||||
* NeoStats * Shmad & Fish * Version 2.5.0-Release Candidate 1
|
||||
- Fixed problem where NeoStats (Or the bots) were not signing onto the network with Hyrbid7 IRCD (F)
|
||||
- /me beats up fish cuz shadow wants to rid the world of a25 and lower (S)
|
||||
- /me beats up shmad and teaches him how to maintain backwards compatibility (F)
|
||||
- NeoStats NOW only supports UltimateIRCd 3.x.x a26+ for SSJ5 compatibility. (S)
|
||||
- Modified users.c so we could call NICK changes to events :) (S)
|
||||
- fixed 'make install' now copies the html template over (reported by eggy) (S)
|
||||
- Changed stats.pid to NeoStats.pid (reported by eggy) (S)
|
||||
- StatServ STATS DEL will now only delete OFFLINE servers for sanitys sake (S)
|
||||
- StatServ RESET now only tells you HOW to properly reset the statistics database for servers. (S)
|
||||
- other minor fixes to makeconf script that could potentially stop it from running on some hosts. (S)
|
||||
- fixed makeconf to work after 'make install' is ran (reported by eggy) (S)
|
||||
- fixed up some Unreal tokens (F)
|
||||
- Added GPL header to all files afer opsb debacle (F)
|
||||
- fixed up the backtrace function (F)
|
||||
- Fixed up the timer.c segv in module code (F)
|
||||
- Fixed up segv locatation code in dns.c (F)
|
||||
- Fixed up a few mem leaks in dns.c
|
||||
- Fixed up some weirdness in how NeoStats gets introduced to the network
|
||||
- Fixed a bug where NeoStats would join the #services channel twice (hu?)
|
||||
- Moved Unreal port from using Akills to TKL's to hopefully avoid problems with newwer unreal versions that don't use akill.
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Beta5
|
||||
- Fixed a problem with prefmsg in Unreal only.
|
||||
- Fixed more bsd related bugs
|
||||
- socket support updates in prep for opsb
|
||||
- User structure now contains TS
|
||||
- User structure now contains ipaddr if server supports NICKIP
|
||||
- Sockets must now be created with new socket functions.
|
||||
- added akill to Ultimate/Unreal, and a Akill hack (send kline to all servers) for Hybrid.
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Beta4
|
||||
- Fixed Bsd support and a few Hybrid weirdiness
|
||||
|
||||
* NeoStats * Fish & Shmad * Version 2.5.0-Beta3
|
||||
- *Bsd support fixed up. (thanks to Mikeal for the shell to test on)
|
||||
- Added stats M (which I added a long time ago, dun know where it went)
|
||||
- Added eggy to the credits
|
||||
- A few level permissions problems with Ultimate were fixed
|
||||
- Hybrd Dun use Tokens. Duh!
|
||||
- Message from help section were not being sent as correct type. (PRIVMSG/NOTICE) according to config file. Fixed. (and fixed a crazy crackhead shmad bug!)
|
||||
- Fixed up a few issues with logging FindServer messages, and trying to track down a Desync
|
||||
- Added Hybrid7 ircd support (fish)
|
||||
- Fixed up Unreal stuff (fish)
|
||||
- Fixed up Unreal stuff (fish) Reported by eggy yet again
|
||||
- Added ADNS libary to core Neostats. Now can do DNS lookups without timing out neostats itself (it calls back when it gets a answer) (fish)
|
||||
- we now close stdin, stdout, and stderr when we fork, as we should have always done (Fish)
|
||||
- Fixed HostServ not giving people their vhosts (reported by eggy whos brave enuf to run cvs) (Shmad)
|
||||
- Fixed issue in services.c where neostats wouldnt get restarted as it tried to run "stats" (Shmad)
|
||||
- Config file is now 'neostats.cfg' (Shmad)
|
||||
- Binary is now 'neostats'
|
||||
- Removed someones crackheaded checking for internal in ircd.c which we dont need now
|
||||
that I've fixed the GHOST bug. (Shmad)
|
||||
- Fixed that ANNOYING GHOST bug if a service Messages or Notices itself. fun fun stuff (Shmad).
|
||||
Thanks to ShadowMaster (UltimateIRCd) for his insight on this.
|
||||
- Missed some Locking code.. removed it all now (Shmad)
|
||||
- Fought with sourceforge CVS for awhile.. (Shmad)
|
||||
- StatServ wont flood records now - hehe
|
||||
- Fixed StatServ STATS - wont say incorrect syntax now unless it is! Fish must've been tired that night. (Shmad)
|
||||
- Fixed problem with some Ultimate modes in ConnectServ again that fish missed (Shmad)
|
||||
- Removed remaining tidbits of old locking code (Shmad)
|
||||
- Module event vars are now passed as a array of strings. Brings more flexibility to Module Events. (fish)
|
||||
- Fixed a bug with -ob channel mode changes, due to me not incrementing a counter. (fish)
|
||||
- Modules/Bots now can support Channel messages via the callback function __Chan_Message(char *chan, char **av, int ac)
|
||||
in the module (fish)
|
||||
- added a test to see when we are fully synced to the network so it doesn't flood network with statserv/connect server
|
||||
messages (look at is_synced) (fish)
|
||||
- Tidy ups and clean ups. (fish)
|
||||
- Trust no one (especially people who keep changing event code :P) (Shmad)
|
||||
- Time to start porting modules to new event code (again! - Last time, I promise) (fish)
|
||||
|
||||
* NeoStats * Shmad * Version 2.5.0-Beta2c (Beta 2.2)
|
||||
- Thanks to StarMaster for a nice suse box to test on.
|
||||
- Fixed issue in ircd.c for compiling with Ultimate 2.x.x support.
|
||||
- Fixed issue in Ultimate.c for compiling with Ultimate 2.x.x support.
|
||||
- Fixed problem with StatServ crashing on Ultimate2.
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Beta2b
|
||||
- Major Reworking internals. Passing Variables now as a struct. Doing a lot of Pre-Processing before Passing Vars to functions or Modules
|
||||
- If message is from a user, assign userlevel in parse function, and made a macro to call a DEFINE that returns u->ulevel;
|
||||
- Improved Services Support
|
||||
|
||||
* Neostats * Fish * Version 2.5.0-Beta2a
|
||||
- Fixed a few mem leaks
|
||||
- Removed smalloc, replaced with normal malloc
|
||||
- Fixed a memleak in statserv htmlstats (man, that function is a pain in the arse)
|
||||
|
||||
* NeoStats * Everyone * Version 2.5.0-Beta2
|
||||
- Working on ZipLink support for Ultimate 3.x.x
|
||||
- Fixed a small problem in Ultimate 3.x.x Opermode support. Should be 100% now. (Shmad)
|
||||
- Fixed Ultimate IRCd 3.x.x Opermode support. (Shmad)
|
||||
- Fixed resetlogs() segfault bug.. (Shmad)
|
||||
- Fixed StatServ segfaulting on first load w/o databases (Fish)
|
||||
- Fixed makeconf, there was a typo that effected HTML writeouts (Shmad)
|
||||
- Fixed StatServ memleak to do with HTML stats (well, not really fixed, but worked around) (fish)
|
||||
- Fixed statserv ipv6 host crash (fish)
|
||||
- Fixed up ./configure script to fail if a user doesn't specify a ircd (fish)
|
||||
- added tldmap to html output of statserv (fish)
|
||||
- Fix for stats thinking it was connected to a zombie server, and restarting over and over again when you first start it up
|
||||
- Heaps and heaps of other fixes that I can't remember now. (fish)
|
||||
- This version should *be* a lot more stable than Beta1 (fish)
|
||||
- Moved apartments and lost my Linux Laptop HDD, hence why the updates have taken so long (fish)
|
||||
- Fixed a bug with channel modes limited to 50. This was bad, as some channels voice/op a lot more than 50 users! increased max to the max channel membership list (currently 1000) (fish)
|
||||
- Fixed a bug with the html stats in statserv. Fixes a HUGE problem with large networks, and seeminly random crashs after 1 hour (1 hour, becauses thats when the html pages are updated!) (Fish)
|
||||
|
||||
* NeoStats * Fish & Shmad * Version 2.5.0-Beta1
|
||||
- Fixed makeconf for new stats.cfg options (Shmad)
|
||||
- Updated FAQ (Shmad)
|
||||
- Updated Misc. other things and fixed Fish's typos (Shmad)
|
||||
- Some updates to sock.c to detect zombie servers (Servers that we havn't recieved anything from for 180 seconds) and restart if thats the case (fish)
|
||||
- restart, reconnect code updated to unload the modules and re-execute stats from scrath (fish)
|
||||
- updates to statserv to support channels (top channel data) (fish)
|
||||
- template support for StatServ html output (fish)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha6
|
||||
- Removed the config option ModulePath, as its always dl/, so its hardcoded in.
|
||||
- Fixed up Ultimate IRCD support (beta only. Shmad/Enigma to test
|
||||
- External Authentication updated and implemented
|
||||
- ./configure interface updated, and all --enable-<module> removed. Now use --enable-module="statserv spam hostserv" etc etc etc
|
||||
|
||||
* NeoStats * Shmad & Enigma * Version 2.5.0-Alpha5c
|
||||
- Module Unlocking on segfaults now (Shmad)
|
||||
- Moved modules to new core dir (damn you fish) (Shmad)
|
||||
- Cleanup of old lock code (^Enigma^)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha5b
|
||||
- Fixes with the autoconf/makefile stuff
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha5
|
||||
- Updated the ./configure/Makefile setup. Full autoconf support now
|
||||
- NeoStats now installs into ~/NeoStats
|
||||
- Beta skeleton for add on modules to get NeoStats configuration from ~/NeoStats/include/*.h (include files)
|
||||
- Bug fix with Channel Modes saving.
|
||||
- Bug Fix with Channeldump (actually, it was when creating new channels. We didn't set the member count to 0, so it was a random number :)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha4.8
|
||||
- More bug fixes with Channel support. It looks pretty stable now :)
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha4.7 (hu, what happened to 4.6?)
|
||||
- Bug fixes (maybe) with channel support
|
||||
- New option to userdump to specify a user to dump out particulars
|
||||
- RECVLOG define, saves a copy of all incomming lines from the server. Defined in stats.h for testing only.
|
||||
- CODERHACK define, allows coders (^Enigma^, Shmad, Fish full (200) access to NeoStats for Debuging. defined in stats.h
|
||||
- Memleaks fixed in Chan support
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha4.5
|
||||
- Added Channel Support.
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha4
|
||||
- Fixed a bug with the hashs and when a user changes Nicks
|
||||
- Moved all variable passing to arrays. Ms and statserv modules updated, but need more work.
|
||||
- That was a huge change. No time to beat those last bugs into remission
|
||||
|
||||
* NeoStats * Fish * Version 2.5.0-Alpha3
|
||||
- Moved Module/Bot/Timer/Sockets to Kazlib as well
|
||||
- CrossIRCD support has been implemented. Basic commands for Core Neo implemented
|
||||
- Moved usr_mds structure to Unreal/Ultimate.c files
|
||||
- had to hack in a if (usr_mds) into each file that has stats.h included becoase of a crazy compiler warning
|
||||
- a Crackhead Shmad fix for globops that was segv'ing the proggy
|
||||
- Ultimate IRCD support still broken.. Fix scheduled soon
|
||||
|
||||
|
||||
* NeoStats * Fish * NeoStats 2.5 Alpha 2
|
||||
- Merged 2.0.14 and 2.5Alpha 1 together (as they were seperate Branches before that
|
||||
- More Ultimate CrossIRCD updates (broken in Alpha3)
|
||||
|
||||
* NeoStats * Shmad * NeoStats 2.5 Alpha 1
|
||||
- - Added new SERVICES_ROOT option to config. list your roots here " " the line (Shmad)
|
||||
- - Started implementing new user access (old will still exist) (Shmad)
|
||||
|
||||
|
||||
* NeoStats * Shmad ^Enigma^ - NeoStats 2.1 Beta 2
|
||||
- - Fixed another problem with strlower() :)
|
||||
- - Fixed a problem with StatServ segfaulting on Boot
|
||||
- - Issue with UNLOCKing modules. module_name = NICk not the modules filename..
|
||||
- - Module locking is using file permissions, much wiser/easier than original .lock
|
||||
- files. (Shmad)
|
||||
- - Modules are now being unlocked when unloaded (can write to them). (Shmad)
|
||||
- - Modules are now being locked when loaded (can't write to them). (Shmad)
|
||||
- - All Module Locking code (except the actual chmod) have been coded... just the
|
||||
- permission chmod to code. Removed crackhead code written initially (^Enigma^)
|
||||
- - Added beginnings of Module locking.. (Shmad/^Enigma^)
|
||||
- - OperLog Module coded ready for Alpha testing (^Enigma^)
|
||||
- - Added /admin command support for external admin file (^Enigma^)
|
||||
- - Created a purdy HTML table whcich shows what needs to be coded, if it
|
||||
- has been coded and how long it would take. (Shmad)
|
||||
- - Fixed a few other misc. bugs too numerous to list. (Shmad)
|
||||
- - Fixes to StatServ segfaults as per strlower below. (Shmad)
|
||||
- - Fixed problems with strlower (re-wrote this stupid POS it doesnt strip first
|
||||
- char now) (Shmad)
|
||||
- - Re-Worded the segmentation fault message... now shows the 'real' core location
|
||||
- (^Enigma^)
|
||||
- - When NeoStats seggies or is shutdown, the stats.pid file is now removed
|
||||
- (^Enigma^)
|
||||
- - 'README' file modified... now tells users what to do with the 'core' file (Both)
|
||||
|
||||
|
||||
- * NeoStats * Shmad & ^Enigma^ * Version 2.1
|
||||
- - Moved MOTD to external stats.motd (Shmad)
|
||||
- - Fixed some spelling errors. (Shmad)
|
||||
- - Changed access levels for CHANDUMP, USERDUMP, and SERVERDUMP to be NetAdmins use
|
||||
- wisely!!! (Shmad)
|
||||
- - New Bug report forums added to www.NeoStats.Net (^Enigma^)
|
||||
- - Fixes to StatServ... stats now more accurate than before. (Shmad)
|
||||
- - Changes to the name "netstats" in some files... is now "neostats"
|
||||
- *thwaps the lazy shmad* (^Enigma^)
|
||||
- - Not a big change.. but.. CVS headers taken out... new nice-looking header format
|
||||
- put in (^Enigma^)
|
||||
- - HTMLSTATS coded for StatServ... will now output HTML stats when turned on. Will
|
||||
- update automatically every hour if the output is turned on. TAs/NAs can turn the
|
||||
- ouput command on and off and can force an update of the HTML file by using the
|
||||
- FORCEUPDATE command. (^Enigma^)
|
||||
- - ConnectServ has been created... will now watch for user signon/signoff, oper flag
|
||||
- settings and /kills Takes pressure off StatServ (less cycles) and NA's/TA's have
|
||||
- the OPTION to choose if they want to that information or not. (^Enigma^)
|
||||
- - Fixed Neostats UPTIME in the INFO command... it now works w00t! (^Enigma^)
|
||||
- - Incremented Version number to 2.1
|
||||
|
||||
|
||||
* NeoStats * Fish * Version 2.0.14-jh1
|
||||
- Lots of Updates and fixes
|
||||
- kazlib is now used for Users/Servers list. Has self checks for corruption
|
||||
- when a module crashes (segv) now, Neo doesn't crash as well, but it
|
||||
will unload the module and contine in most cases (depends on how the
|
||||
module crashed, its possible that the module could corrupt the
|
||||
core neo memory still (credit for that peice of code to MonkeyIRCD
|
||||
- sending a message to the spam module will test the above changes. Feedback please!
|
||||
- Cross IRCD support started. Lots of work to do on it though. Initial ircd will be Ultimate!
|
||||
- configure interface changed to support cross ircd support
|
||||
|
||||
* NeoStats * Fish & Shmad * Version 2.0.13
|
||||
- Fixed a massive problem with crashing and flooding off the entire network!!! (Shmad)
|
||||
-> Reported by |clown|
|
||||
- Fixed Slackware support. (Shmad)
|
||||
- Added Vhost Support to Neostats... Now reads in a users Vhost, and stores it in u->vhost (Fish)
|
||||
- Minor fixes (Fish)
|
||||
- Added begining of Services to Neostats... see dl/services/ChangeLog for more info on whats going on there (Fish)
|
||||
- fixed a segfault in ircd.c - parse... corelen was un-ititilized (Fish)
|
||||
|
||||
|
||||
* NeoStats * Shmad * Version 2.0.12
|
||||
- Fixed problems with access levels
|
||||
- Fixed bugs allowing some "normal" users to issue evil raw commands.
|
||||
- Just a security update.
|
||||
|
||||
|
||||
* NeoStats * Shmad * Version 2.0.11
|
||||
- STATS u now works on NeoStats. :)
|
||||
- Fixed log(); notice when a TLD wasnt found. Sorry John :P~
|
||||
- Added new TLDs
|
||||
- Fixed misc. stats.
|
||||
- Incremented version #
|
||||
- Better memory management. We dont eat as much. Still a few leaks
|
||||
Working on the remaining few.
|
||||
- Minor update to module loading code.
|
||||
- Fixed multiple arguements not being passed (previous fix caused this)
|
||||
- Fixed SEGFAULT when msg'ing Module services with blank lines. (Reported by: JK)
|
||||
- Upgraded NeoStats HELP.. all commands are now available to NetAdmin and Techadmin.
|
||||
- For all those of you who run 2.0.6 THIS is the recommended _STABLE_ build.
|
||||
- Fixed timer segfault.. Aiiee!
|
||||
- Fixed Segfault some people were having when StatServ was loaded manually.. whoopsies.
|
||||
- Why.. Oh Why was StatServ setting people +v? No idea where that code came from.. removed.
|
||||
- Fixed Modules not loading 100% now. 100% meaning it worked on all systems tested on. This
|
||||
should help those of you who experienced these problems. (Reported by: xXTasty)
|
||||
- StatServ echoing all commands to the channel it was in was pissing me (and others off), it
|
||||
is now removed.. Might make this a config option at a later date. (Requested by: anonymous)
|
||||
- Fixed cosmetic bugs in SERVER command.
|
||||
- Fixed % stats in SERVER command in StatServ.
|
||||
- Damn I hate my job..
|
||||
- Fixed Layout of MAP.. man was it messy fish..
|
||||
- Fixed last? memory leak.
|
||||
- Fixed the bugs in the makeconf script.. woops. :-) (Reported by: A lot of people :P)
|
||||
- Pondered moving NeoStats motd to its own file rather than hard coded.. look for it in next ver.
|
||||
- Fixed remaining mem leaks in MODULES.
|
||||
- Got a job..
|
||||
- Fixed modules not loading on NeoStats boot.
|
||||
- Fixed StatServ MODULE sefaulting NeoStats... redundent code fishy. :-)
|
||||
- Fixed MOTD -- Might move this to an external stats.motd file later.
|
||||
- Fixed logging error where on SEGFAULT it would flood stats.log with about 40,000 lines. :-)
|
||||
- Finished Remaining Modules we ship off with NeoStats.
|
||||
- Job hunting -- loads of fun :-)
|
||||
- Major Update was needed.. so here we start. :)
|
||||
|
||||
|
||||
* NeoStats * Shmad * Version 2.0.6
|
||||
- Module NetInfo cleaned up a bit - looks purdy now
|
||||
- 2.0 HAS DOCS!! Check them out in doc/ they are still roughish, more to add as time comes.
|
||||
- stats.cfg cleaned up a bit.
|
||||
- A few more mem leaks fixed.. not all of them yet.. working on it.
|
||||
- Lazy people can now ./makeconf -- be sure to check stats.cfg to make sure everything
|
||||
is right tho :)
|
||||
- Fixed PRIVMSG bug, well not really a bug Unreal needs a check. (F)
|
||||
- Added FreeBSD support (Thanks to TheRock (acestar) and madness.tmok.com for test shells).
|
||||
- Added OpenBSD support (Thanks to bball for test shell).
|
||||
- Added NetBSD support (Thanks to Anoninimity for test shell).
|
||||
- Started documenting the modules.
|
||||
- We need people to staff our support channel #NeoStats on irc.cyberchat-irc.net
|
||||
- Upgraded to version 2.0.6 flying along now :)
|
||||
|
||||
|
||||
* NeoStats * Shmad * Version 2.0 Beta 5
|
||||
- Fixed up StatServ some more, now it displays all the information that previous
|
||||
versions of NeoStats did, although, it might not be accurate yet (still working on it)
|
||||
- Fixed up Module Bots not working if the recieved Nick case was different to what was
|
||||
in the hash table!
|
||||
- Fixed a whole crapload of Segfault bugs ;)
|
||||
- Added NetInfo, this module SAJOINs users to channels based on their TLD.
|
||||
- Added better module control.
|
||||
- Still working on the Memory Leaks, its a pain, you may have to restart NeoStats every 4 to 6 days so
|
||||
it doesn't eat up all your ram. It ate up 256 MB of Ram on the coding system in 2 weeks.
|
||||
|
||||
|
||||
* NeoStats * Fish * Its Under CVS Control now... Still a Beta/Alpha Version though!
|
||||
- Implemented Levels for Users, and finally fixed it all up.. if your
|
||||
Coding a module, and need some sort of Security, use "UserLevel(u)" which
|
||||
will return the Level of the user..... see users.c for a list of current O
|
||||
lines, that map to Levels (highest is 200)
|
||||
- More work on StatServ to make it produce some useable stats.. almost
|
||||
there... I know Shmad and HeadBanger are going to kick my butt when they
|
||||
find out that I have been away for over a week and hardly done anything on
|
||||
it during those lonely nights in the hotel, but f*ck em :)
|
||||
- More work on the Event Triggers... I'm happier with the interface now
|
||||
- Flew around Asia.. Singapore, Malasia, and Phillipines!
|
||||
|
||||
* NeoStats * Fish * Version 2.0Alpha4 (we decided this is a Major Release, hence the 2.0 version)
|
||||
- Fixed up The Module Code (as Usual)
|
||||
- Created new Functions to Load Modules at Boot time...
|
||||
- Finally ripped out StatServ code out of base code, and started on writting its module..
|
||||
- Also ripped out ICQServ... Havn't start the Module for this yet
|
||||
- Been thinking about the best way to setup the event Triggers
|
||||
- Learnt how to use CVS, and now I love it
|
||||
- Started to Use X windows with Kdevelop as my IDE... (like you care right)
|
||||
- started playing with autoconf and automake stuff... hrm.. looks pretty nice
|
||||
- Expecting to release a beta real soon (As soon as I make StatServ useable)
|
||||
- Now have a project page at http://www.sourceforge.net/project/?group_id=2137
|
||||
- Get the Latest Development Version of our Code at:
|
||||
CVS: cvs -d:pserver:anonymous@cvs.neostats.sourceforge.net:/cvsroot/NeoStats/ login
|
||||
when prompted for a password, just hit Enter
|
||||
cvs -d:pserver:anonymous@cvs.neostats.sourceforge.net:/cvsroot/NeoStats co 2.0
|
||||
|
||||
|
||||
* NeoStats * Fish * Version 1.2.Alpha 4
|
||||
- The Beginnings of a Decent Module API - See dl/modules.txt for more info
|
||||
- added a BOT api for the Modules. Any Module that puts a bot on the network must use this API
|
||||
- Added a Timer API for Modules.. So Modules can register a function to be triggered a specific intervals with NeoStats
|
||||
- Wrote dl/modules.txt - A pretty lame guide to writting your own Modules. Eventaully the Modules API will be Documented in here
|
||||
- Cleaned up a lot of bugs with the Dynamic Loading of Modules
|
||||
- Spam Module is now its own Self Contained Module
|
||||
- Re-done the Config file Reading in Preparation for Module Config items
|
||||
- Made a *nice* boot up screen cause I was bored with Pointers for a while!!!
|
||||
- Signal Handling... We now Die on SIGTERM, SIGHUP should rehash, but its also doing something strange I can't figure out, and best of all... SIGSEV, handling our Coredumps and so one now (Yeah, I stole the Code from Unreal!)
|
||||
- Back in a Hotel Room in Singapore, wondering when a Wircd version of Unreal 2.1.7 will be released?
|
||||
|
||||
|
||||
* NeoStats * Fish * Version 1.2.Alpha 3
|
||||
- Total Re-Write of Intenals, Namely, ircd.c
|
||||
- Now Support Dynamically Loading and Unloading Modules
|
||||
- Moved Spam User to a Module
|
||||
- Moving StatServ to a Module
|
||||
- New Default User, with no Modules Loaded, called, of Course, "NeoStats"
|
||||
- Fixed up Socket Code
|
||||
- Fixed up Server Info line, so it isn't corruped in /links
|
||||
- Started work on IcqServ, a new Module, providing ICQ services to irc users
|
||||
- wrote 2 Test Modules, version and version2 to test Loading and Unloading of Modules
|
||||
- smoked a few Ciggies while trying to work out bugs!
|
||||
|
||||
* NeoStats * Fish * Version 1.2.Alpha 2
|
||||
- if Unreal Protocol is 2109 or higher, uses SMO 1 for Debuging stuff
|
||||
- Automatically Upgrades Old Databases from NeoStats 1.1.2 and lower
|
||||
- Worked some more on Channel Hashes, Still a long way to go
|
||||
- Added SVS2MODE support.. Again Untested, but same code as SVSMODE, so it should work
|
||||
- Sweated in the heat..
|
||||
|
||||
* NeoStats * Fish * Version 1.2 Alpha 1
|
||||
- Gah, Flying to Canada this time!!!
|
||||
- Started to add the Beginings of Channel Hashes.
|
||||
- Started to Improve debuging output
|
||||
- Added/Fixed User/Server/Channels Dump to Coders
|
||||
- Updated Statistics Information, adding Total Number of connect to the
|
||||
Network/Servers with Dailystats as well...
|
||||
|
||||
|
||||
* NeoStats * Shmad * Version 1.1.2 Beta 3
|
||||
- Thought we should up the version number, been Beta 2 here for quite a while.
|
||||
- Fixed cosmetic problem in HELP
|
||||
- Fixed a RESET bug. ooops :/
|
||||
- Fixed OPERLIST dupe logging channel msg bug
|
||||
- Made OPERLIST BOTS into BOTLIST works great, Fish shouldn't put non-oper related stuff
|
||||
in the OPERLIST functions. :P had to do some minor code tweaks, but works great.
|
||||
- Apparently fixed problem where occasionally new records would make the server "peer out"
|
||||
* NeoStats * Fish * Version 1.1.2 Beta 3
|
||||
- Flying back to aussie. ;)
|
||||
|
||||
|
||||
|
||||
* NeoStats * Fish * Version 1.1.2 Beta 2
|
||||
- Removed all the Proxy Scanning Stuff, it was Broken, and useless anyway
|
||||
- Added /credits option to the server, and updated Credits information
|
||||
- Added Bots list to operlist
|
||||
- fixed a few Typos with operlist, and got noaway working again
|
||||
- Changed the UserModes of the statistics user to be +Sq and +a in the Services Channel
|
||||
- Changed the version to be Geostats-1.1.2-beta
|
||||
- Added a New Option to config file. If Defined, will occasionally broadcast the lag of
|
||||
each server in the services channel
|
||||
- Fixed up a bug with operlists being -1 (found the little sucker too)
|
||||
- Fixed a Problem with Shutdown CoreDumping the Server.. Grrrr, Shmad, Just cause we are
|
||||
shutting down doesn't mean u have to CoreDump the Server!
|
||||
- Added Support for SVSMODE, Untested though!!!
|
||||
- Change the New User record to be Walloped Instead of Globops, so normal users can see it
|
||||
as well (Thanks to EvilAndy for the Suggestion!)
|
||||
- Hrm, seems the Kick and Rejoin was Broken. Fixed it up again... (Why is Kick giving me
|
||||
sooo many problems?)
|
||||
- Fixed up messages when a Non-Oper joins the Services Channel. Now askes them to leave
|
||||
(I'd prefer to kick them out, but some other Services are not always Opered Up... Still
|
||||
thinking of a workaround for this
|
||||
- Wrote a Email to Shmad Kicking him up the Butt to update this File!!!
|
||||
- Again, watched Boring Television the whole time!!
|
||||
* NeoStats * Shmad * Version 1.1.2 Beta 2
|
||||
- Cleaned up a few messy/unused routines in the code.
|
||||
- Base for HTML writeups started, will be completed in next full release.
|
||||
- Wrote Documentation. see doc/ run read-faq or read-userman you can also print up FAQ or USERMAN. :P
|
||||
- Cursed at the car for the clutch popping today..
|
||||
- Went through every line of code looking for mis-spellings.. email me if you would like to do that. :-]
|
||||
- Harassed Fish some more about fixing his bugs. :P
|
||||
- Started a base for SUSPEND command, will be finished in next release.
|
||||
- Cleaned up this ChangeLog a bit, you can actually read it now! And that Fish guy better not
|
||||
mess it up! :P
|
||||
- Oh my god, I left like a huge section of code in there all commented out. Removed it (old buggy code)
|
||||
|
||||
|
||||
|
||||
|
||||
* NeoStats * Fish * Version 1.1.2 Beta 1
|
||||
- Fixed problem with not reading netinfo, or Server info lines from Config Files
|
||||
- Added LAG_TIME to Config file. If a server is Lagged out over this amount from statserv, then
|
||||
a Globops Message is sent (Should be changed to use RPONG
|
||||
- Added 2 new Options to Operlist, NET and TECH, to List only netadmins and Techadmins
|
||||
- Fixed a Problem when StatServer kicked a User for Flooding, it didn't Delete that User from its
|
||||
Database
|
||||
- Watched a really fucked up Moving on HBO about Man Size Killer Rats!
|
||||
* NeoStats * Shmad * Version 1.1.2 Beta 1
|
||||
- Renamed to NeoStats. :P
|
||||
- Fixed Kick problem where if you kick a person from your chan Stats would complain about being kicked
|
||||
- Added VERSION command
|
||||
- Added SHUTDOWN <reason>
|
||||
- Added RELOAD <reason> Stats Terminate and reload.
|
||||
- Fixed some minor cosmetic things in HELP
|
||||
- Added STATSERV_NETNAME to the stats.cfg (no more editting the ircd.c :P )
|
||||
- Added SERVER_INFOLINE to the stats.cfg (set statservs server info line in there now)
|
||||
- Sat around and watched TV for a few hours, space has some weird shows. ;)
|
||||
- Added RESET command wipes the .db clean. :P (It will temp flood in globops with new stats when done)
|
||||
|
||||
|
||||
|
||||
GeoStats - Fish - version 1.1.1
|
||||
- Removed the User Database, now uses IRCD Umodes
|
||||
- Umodes T (technical Admin) now is equivilent to god in the old stats
|
||||
- Umodes 1 (IRCD Coder) is used for Debuging Information
|
||||
- Supports Unreal IRCD 2.1.5-Tabby and higher only atm
|
||||
- Now joins a PreDefined Channel, and reports information such as connects and quits to the Channel
|
||||
- Reports via Globops when a User/Oper/Server Record is broken!
|
||||
- Reports via Globops when a User is set +q or +I
|
||||
- Prints channels that a User Joins and Parts when +I in the Services Channel
|
||||
- added JOIN Commmand
|
||||
- Allows you to select what Channels you want the Reporting software
|
||||
- added RAW Command
|
||||
- Allows you to send Raw Commands from the Server, only Tech Admins have this ability
|
||||
- Added Debug Command
|
||||
- At the Moment, only unhandled Commands are sent to +1 users
|
||||
- Next release a lot more information (such as what is sent to the Log files) will be sent to users +1
|
||||
- A lame attempt at getting statserv to slow down when sending you the log files, as it floods you of
|
||||
the server
|
||||
- added notice subrotine, used to send messages to the Services Channel
|
||||
- When a Oper Joins the Services Channel, statserv ops him, when a Normal User joins, statserv askes him
|
||||
to leave... TODO: setup a Ignore list, so Bots and Services can join without having to have a Umode +o
|
||||
- Proxy doesn't work on my machine due to lack of Threads, and no need for them, so I might have broken
|
||||
it. Can someone let me know?
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
GeoStats - version 1.1.0
|
||||
- Fixed hashing problem.
|
||||
- Added configuration option - OPERSONLY
|
||||
- Included patch from Ax0n (ax0n@starchat.net).
|
||||
- Implemented insecure proxy checking.
|
||||
|
||||
GeoStats - version 1.0.4
|
||||
- Added support for SVSNICK.
|
||||
- Small memory leak fixed.
|
||||
- Added 'STATS' command.
|
||||
-LIST statistic entries.
|
||||
-DEL statistic entries.
|
||||
v -COPY statistic entries.
|
||||
- Added 'LOGS' command.
|
||||
-Allows you to view today's logfile via PRIVMSG or NOTICE's.
|
||||
- Fixed -major- problem with the SHUTDOWN command ;-)
|
||||
- Logging Changes
|
||||
|
||||
netgod - version 1.0.3
|
||||
- Final Release (possibly?).
|
||||
- Fixed the initial core dump if no user file ;-)
|
||||
- Added close() call when reconnecting to a server. (in start())
|
||||
- -StatServ- Statistics up 8 days, 01:12
|
||||
|
||||
netgod - version 1.0.2
|
||||
- Fixed bug in 'AWAY' netstats.
|
||||
- Added a new part to 'HELP TLD'.
|
||||
- Modified 'server has split from '...
|
||||
|
||||
netgod - Fri Mar 12 18:43:21 CST 1999
|
||||
- Found/fixed small problem in 'SERVER' output.
|
||||
|
||||
netgod - Thu Mar 11 21:47:13 CST 1999
|
||||
- Servers with lag time of > 45 are now sent via privmsg to either a channel or user.
|
||||
|
||||
netgod - Sun Mar 7 17:59:47 CST 1999
|
||||
- Ok, found the fscking problem with not keeping track of IRCops right...
|
||||
|
||||
netgod - Sun Mar 7 13:51:26 CST 1999
|
||||
- Fixed small memory leak.
|
||||
- Corrected users-that-are-away %
|
||||
- Corrected Current Opers (NETSTATS)
|
||||
- Logfiles are now kept in logs/ changed every night..
|
||||
- Modified 'server has split from the network N times'
|
||||
|
||||
netgod - Sun Mar 7 09:55:48 CST 1999
|
||||
- Started ChangeLog
|
2
INSTALL
2
INSTALL
|
@ -1,2 +0,0 @@
|
|||
See the README file or for up to date installation instructions, visit
|
||||
http://wiki.neostats.net/confluence/display/NeoStats/Installation
|
18
INSTNOTES
18
INSTNOTES
|
@ -1,18 +0,0 @@
|
|||
_______________________________________________________
|
||||
| NeoStats compiled and installed successfully. |
|
||||
| |
|
||||
| Please read the README and visit |
|
||||
| http://wiki.neostats.net/confluence/display/NeoStats/ |
|
||||
| for information on how to configure NeoStats. |
|
||||
| |
|
||||
| You should now build and install any external modules |
|
||||
| such as SecureServ, OPSB, LogServ, StupidServ or any |
|
||||
| third party modules. Refer to the documentation with |
|
||||
| the modules for details on how to compile and install |
|
||||
| it. |
|
||||
| |
|
||||
| If this is an upgrade, you still need to rebuild and |
|
||||
| install external modules before running this version |
|
||||
| of NeoStats |
|
||||
|_______________________________________________________|
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
_______________________________________________________
|
||||
| NeoStats Development Version |
|
||||
| |
|
||||
| ******** WARNING ******** |
|
||||
| |
|
||||
| You are running the development version of NeoStats. |
|
||||
| No support is provided for development versions. |
|
||||
| Please read doc/README.dev before running this version|
|
||||
| on your network. |
|
||||
|_______________________________________________________|
|
||||
|
36
Makefile.am
36
Makefile.am
|
@ -1,36 +0,0 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = include lib src modules
|
||||
ACLOCAL_AMFLAGS = -I autotools
|
||||
AM_MAKEFLAGS = -s
|
||||
DISTCHECK_CONFIGURE_FLAGS = --cache-file=../config.cache
|
||||
dist_bin_SCRIPTS = makeconf
|
||||
dist_data_DATA = neostats.motd
|
||||
#docdir = @prefix@/doc
|
||||
dist_doc_DATA = doc/README.dev ChangeLog.old doc/CODINGMODULES.txt RELNOTES CREDITS README
|
||||
neodir = $(prefix)
|
||||
neo_SCRIPTS = neostats
|
||||
DISTCLEANFILES = autotools/ccdv
|
||||
|
||||
EXTRA_DIST = autotools/ccdv.c autotools/shtool INSTNOTES
|
||||
|
||||
all-local:
|
||||
if test ! -f .message; then \
|
||||
echo ""; \
|
||||
$(top_srcdir)/autotools/shtool echo -e "%BCompilation complete.%b"; \
|
||||
echo ""; \
|
||||
echo "Run 'make install' (or 'gmake install' on some systems) to install NeoStats."; \
|
||||
echo "If you require support, see the README file."; \
|
||||
touch .message;\
|
||||
fi;
|
||||
|
||||
|
||||
install-data-hook:
|
||||
test -z "$(prefix)/logs" || $(CCDV) $(mkdir_p) "$(prefix)/logs";
|
||||
echo ""
|
||||
$(top_srcdir)/autotools/shtool echo -e "%BInstallation complete.%b"
|
||||
echo ""
|
||||
echo "Change directory to '$(prefix)' then run './neostats'"
|
||||
echo "If you require support, see the README file."
|
||||
rm -f .message
|
||||
|
||||
include $(top_srcdir)/autotools/rules.mk
|
868
Makefile.in
868
Makefile.in
|
@ -1,868 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \
|
||||
$(dist_data_DATA) $(dist_doc_DATA) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/neostats.in \
|
||||
$(top_srcdir)/autotools/rules.mk $(top_srcdir)/configure \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS TODO autotools/compile \
|
||||
autotools/config.guess autotools/config.sub autotools/depcomp \
|
||||
autotools/install-sh autotools/ltmain.sh autotools/missing \
|
||||
autotools/mkinstalldirs autotools/ylwrap
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \
|
||||
$(top_srcdir)/autotools/ax_distversion.m4 \
|
||||
$(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_curl.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_pcre.m4 \
|
||||
$(top_srcdir)/autotools/berkeley_db.m4 \
|
||||
$(top_srcdir)/autotools/ccdv.m4 \
|
||||
$(top_srcdir)/autotools/libevent.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES = neostats
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(neodir)" \
|
||||
"$(DESTDIR)$(datadir)" "$(DESTDIR)$(docdir)"
|
||||
dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
neoSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(dist_bin_SCRIPTS) $(neo_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
dist_dataDATA_INSTALL = $(INSTALL_DATA)
|
||||
dist_docDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(dist_data_DATA) $(dist_doc_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
pkglibdir = $(prefix)/modules
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BLD_BDB = @BLD_BDB@
|
||||
BLD_LIBEXEC = @BLD_LIBEXEC@
|
||||
BUILD_CURL_FALSE = @BUILD_CURL_FALSE@
|
||||
BUILD_CURL_TRUE = @BUILD_CURL_TRUE@
|
||||
BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@
|
||||
BUILD_PCRE_TRUE = @BUILD_PCRE_TRUE@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CCDV = @CCDV@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
CURL_CFLAGS = @CURL_CFLAGS@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_LIBS = @CURL_LIBS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DB_CPPFLAGS = @DB_CPPFLAGS@
|
||||
DB_LDFLAGS = @DB_LDFLAGS@
|
||||
DB_LIBS = @DB_LIBS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DISTDIRVERSION = @DISTDIRVERSION@
|
||||
DO_PERL_FALSE = @DO_PERL_FALSE@
|
||||
DO_PERL_TRUE = @DO_PERL_TRUE@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EVNTLIBOBJS = @EVNTLIBOBJS@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBDB = @LIBDB@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LNK_LIBEXEC = @LNK_LIBEXEC@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MODULES = @MODULES@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PCRE_CFLAGS = @PCRE_CFLAGS@
|
||||
PCRE_LIBS = @PCRE_LIBS@
|
||||
PERL_CFLAGS = @PERL_CFLAGS@
|
||||
PERL_LDFLAGS = @PERL_LDFLAGS@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
POW_LIB = @POW_LIB@
|
||||
PROTOCOL = @PROTOCOL@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USECCDV = @USECCDV@
|
||||
USE_GNUTLS = @USE_GNUTLS@
|
||||
USE_SSLEAY = @USE_SSLEAY@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = $(prefix)/data
|
||||
datarootdir = @datarootdir@
|
||||
docdir = $(prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
perlpath = @perlpath@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sedpath = @sedpath@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
unamepath = @unamepath@
|
||||
wi_PWD = @wi_PWD@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = include lib src modules
|
||||
ACLOCAL_AMFLAGS = -I autotools
|
||||
AM_MAKEFLAGS = -s
|
||||
DISTCHECK_CONFIGURE_FLAGS = --cache-file=../config.cache
|
||||
dist_bin_SCRIPTS = makeconf
|
||||
dist_data_DATA = neostats.motd
|
||||
#docdir = @prefix@/doc
|
||||
dist_doc_DATA = doc/README.dev ChangeLog.old doc/CODINGMODULES.txt RELNOTES CREDITS README
|
||||
neodir = $(prefix)
|
||||
neo_SCRIPTS = neostats
|
||||
DISTCLEANFILES = autotools/ccdv
|
||||
EXTRA_DIST = autotools/ccdv.c autotools/shtool INSTNOTES
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
distdir = @DISTDIRVERSION@
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/autotools/rules.mk $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
neostats: $(top_builddir)/config.status $(srcdir)/neostats.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
uninstall-dist_binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-neoSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(neo_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(neodir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(neodir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
uninstall-dist_dataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(datadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dist_docDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(docdir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/autotools $(distdir)/doc
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(DATA) all-local
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(neodir)" "$(DESTDIR)$(datadir)" "$(DESTDIR)$(docdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_dataDATA install-dist_docDATA \
|
||||
install-neoSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-exec-am: install-dist_binSCRIPTS
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_binSCRIPTS uninstall-dist_dataDATA \
|
||||
uninstall-dist_docDATA uninstall-info-am uninstall-neoSCRIPTS
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \
|
||||
am--refresh check check-am clean clean-generic clean-libtool \
|
||||
clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-libtool distclean-recursive \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-data-hook \
|
||||
install-dist_binSCRIPTS install-dist_dataDATA \
|
||||
install-dist_docDATA install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-neoSCRIPTS install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-dist_binSCRIPTS uninstall-dist_dataDATA \
|
||||
uninstall-dist_docDATA uninstall-info-am uninstall-neoSCRIPTS
|
||||
|
||||
|
||||
all-local:
|
||||
if test ! -f .message; then \
|
||||
echo ""; \
|
||||
$(top_srcdir)/autotools/shtool echo -e "%BCompilation complete.%b"; \
|
||||
echo ""; \
|
||||
echo "Run 'make install' (or 'gmake install' on some systems) to install NeoStats."; \
|
||||
echo "If you require support, see the README file."; \
|
||||
touch .message;\
|
||||
fi;
|
||||
|
||||
install-data-hook:
|
||||
test -z "$(prefix)/logs" || $(CCDV) $(mkdir_p) "$(prefix)/logs";
|
||||
echo ""
|
||||
$(top_srcdir)/autotools/shtool echo -e "%BInstallation complete.%b"
|
||||
echo ""
|
||||
echo "Change directory to '$(prefix)' then run './neostats'"
|
||||
echo "If you require support, see the README file."
|
||||
rm -f .message
|
||||
|
||||
.c.o:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
|
||||
.c.lo:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
@list='ls .libs/*.so'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_dataDATA: $(dist_data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
$(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-neoSCRIPTS: $(neo_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(neodir)" || $(mkdir_p) "$(DESTDIR)$(neodir)"
|
||||
@list='$(neo_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(neoSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(neodir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
distcleancheck:
|
||||
@:
|
||||
distuninstallcheck:
|
||||
@:
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
1
NEWS
1
NEWS
|
@ -1 +0,0 @@
|
|||
Check our forums/website for the latest news
|
File diff suppressed because it is too large
Load diff
534
README
534
README
|
@ -1,534 +0,0 @@
|
|||
************************************************************************
|
||||
** NeoStats - IRC Statistical Services **
|
||||
** Copyright (c) 1999-2008 NeoStats Group. All Rights Reserved. **
|
||||
** This program and all associated documentation is free but **
|
||||
** copyrighted software; see the file COPYING for details. **
|
||||
** Homepage: http://www.neostats.net/ **
|
||||
************************************************************************
|
||||
|
||||
Thank you for downloading NeoStats.
|
||||
|
||||
NeoStats is a powerful and extendable set of *services* for IRC. By
|
||||
Services, we do not mean NickServ/Chanserv etc but additional services.
|
||||
These additional services include things like StatServ which gives you
|
||||
statistics on the number of users/operators/channels/servers, and
|
||||
MoraleServ, which is a *fun* module, to send funny messages to users,
|
||||
and utility modules. Some modules have a useful function on your
|
||||
network, other modules are developed for fun, and to make your IRC
|
||||
network more attractive to users.
|
||||
|
||||
The 3.0 series of NeoStats offers many improvements over previous
|
||||
versions. A detailed list of changes can be found in the ChangeLog file,
|
||||
but a brief summary is:
|
||||
- Simplified configure, build and install process.
|
||||
- Improved debug mode to provide information to us more easily in
|
||||
the event of problems and avoid polluting general logs with
|
||||
debug information.
|
||||
- New segfault log file to log any segfaults which occur with
|
||||
NeoStats for better support.
|
||||
- New and improved API for module coders.
|
||||
- Many updates to the various modules.
|
||||
- New backend database storage based on standard DBM systems.
|
||||
- New athentication modules and API to allow custom authentication.
|
||||
- Improved protocol module API to make it easier to add support for
|
||||
other IRCds.
|
||||
- Many optimisations of the core to speed up NeoStats operation and
|
||||
reduce the resource requirements.
|
||||
- DCC chat support to allow users to operate NeoStats via a DCC chat
|
||||
session.
|
||||
- Native Windows support including full support for modules.
|
||||
- All commands have configurable user levels.
|
||||
- Perl API, so you can write new modules or extend existing modules
|
||||
in the Perl Scripting Language
|
||||
- Automatic notification of new versions, when they become available
|
||||
- a large range of supported IRCd's
|
||||
|
||||
Visit http://www.neostats.net for the latest news and NeoStats updates.
|
||||
|
||||
Please read all documentation included with NeoStats carefully. The
|
||||
documents contain all the information you need to get NeoStats running
|
||||
on your network. These documents include README, and the wiki, at
|
||||
http://wiki.neostats.net/confluence/display/NeoStats/Home
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
All documentation applies to version 3.0.0 and higher. For older
|
||||
versions consult the documentation with that version or consider
|
||||
upgrading. New versions of NeoStats have many new features and bug
|
||||
fixes. We are not able to provide support for older versions of
|
||||
NeoStats.
|
||||
|
||||
Following is a quick guide to the main NeoStats documentation:
|
||||
|
||||
README - This file. How to install and configure NeoStats
|
||||
and support information.
|
||||
RELNOTES - Release notes about the current version. This is
|
||||
displayed during the installation process but you should
|
||||
refer to it if you have problems.
|
||||
ChangeLog - Information about what has changed between versions.
|
||||
Consult this document for detailed information about the
|
||||
changes.
|
||||
The Majority of Documentation can now be found on our NeoStats Wiki,
|
||||
located at http://wiki.neostats.net/confluence/display/NeoStats/Home
|
||||
You are encouraged to check that site, as thats where most recent
|
||||
version of our documenation will be
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
1. Installing and configuring NeoStats
|
||||
1.1 General notes
|
||||
1.2 Getting Started.
|
||||
1.3 Running configure
|
||||
1.4 Compiling NeoStats
|
||||
1.5 Installing NeoStats
|
||||
1.6 Setting up the neostats.conf file
|
||||
1.7 Compiling additional modules
|
||||
1.8 Running NeoStats
|
||||
1.9 Notes for upgraders
|
||||
2. Support Information
|
||||
2.1 Before contacting support
|
||||
2.2 Where to get support
|
||||
2.3 What to provide when requesting support.
|
||||
3. Contributions
|
||||
|
||||
|
||||
1. Installing and configuring NeoStats
|
||||
--------------------------------------
|
||||
|
||||
This section explains how to install and configure NeoStats. We
|
||||
recommend that you read this section in full before trying to install
|
||||
NeoStats.
|
||||
|
||||
If you have any problems NOT addressed in this or other documents,
|
||||
please see the Support section for how to contact us for help.
|
||||
|
||||
|
||||
1.1 General notes
|
||||
-----------------
|
||||
|
||||
All commands and filenames are case sensitive. This means that
|
||||
NeoStats, neostats and NEOSTATS are all different things. When
|
||||
typing commands you should use the same case as provided in this
|
||||
file or things will not work correctly.
|
||||
|
||||
|
||||
1.2 Getting Started
|
||||
-------------------
|
||||
|
||||
First, you need to uncompress NeoStats. To do this type the following:
|
||||
|
||||
tar xvfz NeoStats3.0.x.tar.gz
|
||||
|
||||
This will vary depending on the version you run of NeoStats. Change the
|
||||
x in NeoStats3.0.x.tar.gz to match your filename e.g.
|
||||
|
||||
NeoStats3.0.0.tar.gz
|
||||
|
||||
For systems that don't run a new version of tar you need to do this:
|
||||
|
||||
gzip -d NeoStats3.0.x.tar.gz
|
||||
tar xvf NeoStats3.0.x.tar
|
||||
|
||||
1.3 Running configure
|
||||
---------------------
|
||||
|
||||
You must first run the configure script so that NeoStats can determine
|
||||
your build environment.
|
||||
|
||||
To run configure, you must first change to the directory where you
|
||||
uncompressed NeoStats. e.g.
|
||||
|
||||
cd ~/NeoStats3.0.0
|
||||
|
||||
Your prompt should look something like:
|
||||
|
||||
[user@host NeoStats3.0.0]
|
||||
|
||||
Now type:
|
||||
|
||||
./configure
|
||||
|
||||
The configure script will then check to see if all necessary programs to
|
||||
run NeoStats are installed on your system.
|
||||
|
||||
Optional settings:
|
||||
------------------
|
||||
|
||||
There are some options you can pass to configure if you wish.
|
||||
|
||||
Debugging:
|
||||
|
||||
Most users will never look at this option. It compiles NeoStats
|
||||
with debugging turned on. I would only suggest using this if you
|
||||
have problems and are about to make a bug report.
|
||||
|
||||
--enable-debug Enables Debugging
|
||||
|
||||
Enabling RAW command:
|
||||
|
||||
We strongly recommend against the use of this option. Use of RAW
|
||||
commands can cause desync on your network and badly formatted commands
|
||||
can crash your network. If you do enable this option, we will not
|
||||
provide any support for your use of this command. Please do not contact
|
||||
us for support of the RAW command.
|
||||
|
||||
--enable-raw
|
||||
|
||||
|
||||
1.4 Compiling NeoStats
|
||||
----------------------
|
||||
|
||||
You should now be back at a shell prompt, type:
|
||||
|
||||
make
|
||||
|
||||
it will go through the source and compile it into an executable
|
||||
binary file.
|
||||
|
||||
|
||||
1.5 Installing NeoStats
|
||||
-----------------------
|
||||
|
||||
If you are upgrading a working version of NeoStats. Please read section
|
||||
1.9 Notes for Upgraders now.
|
||||
|
||||
NeoStats must be "installed" into its own directory. By default NeoStats
|
||||
will install into ~/NeoStats3.0/ i.e. in your home directory e.g.
|
||||
|
||||
/home/fish/NeoStats3.0/
|
||||
|
||||
If you wish to change the install location, please type
|
||||
|
||||
./configure --help
|
||||
|
||||
and follow the instructions on screen.
|
||||
|
||||
To install NeoStats type:
|
||||
|
||||
make install
|
||||
|
||||
This will create the necessary files, and copy them to the
|
||||
installation directory.
|
||||
|
||||
|
||||
1.6 Setting up the neostats.conf file
|
||||
-------------------------------------
|
||||
|
||||
Now you should change to the installation directory (~/NeoStats/, or
|
||||
whatever you specified in ./configure) e.g.
|
||||
|
||||
cd ~/NeoStats3.0
|
||||
|
||||
Your prompt should look something like:
|
||||
|
||||
[user@host NeoStats3.0]
|
||||
|
||||
Once in this directory, you need to create a configuration file. You
|
||||
should now run the makeconf script and answer the questions:
|
||||
|
||||
./bin/makeconf
|
||||
|
||||
You must edit neostats.conf to check that everything is set the way you
|
||||
want it before NeoStats will run. You can do this with:
|
||||
|
||||
pico neostats.conf
|
||||
|
||||
All the options are described in the neostats.conf file and you should
|
||||
refer to this file for assistance.
|
||||
|
||||
When you are finished, save the file. If using pico as in the previous
|
||||
example, press Ctrl-X then hit Y and enter to save the file and exit.
|
||||
|
||||
1.7 Compiling additional modules
|
||||
--------------------------------
|
||||
|
||||
If you have downloaded other NeoStats modules e.g. OPSB, you should now
|
||||
install them. If you are upgrading NeoStats, you must rebuild all other
|
||||
separate modules to work with the new version of NeoStats. See the
|
||||
documentation with these modules for instructions on building and
|
||||
installing them.
|
||||
|
||||
Modules written for previous series of NeoStats will not work with the
|
||||
3.0 series. You must contact the module author for an updated version of
|
||||
the module. All official modules have a 3.0 compatible version available.
|
||||
|
||||
1.8 Running NeoStats
|
||||
--------------------
|
||||
|
||||
NeoStats is now configured and installed.
|
||||
|
||||
Before running NeoStats you must make sure that your server(s) have C:
|
||||
N: and U: lines for your NeoStats server.
|
||||
WE WILL NOT ASSIST YOU WITH ADDING C: N: AND U: LINES TO YOUR SERVER,
|
||||
YOU SHOULD READ THE IRCD DOCUMENTATION IF YOU DO NOT KNOW HOW TO DO
|
||||
IT!!! DO NOT CONTACT US ABOUT C: N: and U: Lines
|
||||
|
||||
Once your C/N/U lines are setup, you need to start NeoStats. You should
|
||||
change to the directory where NeoStats in installed e.g.
|
||||
|
||||
cd ~/NeoStats3.0
|
||||
|
||||
Then to run NeoStats type:
|
||||
|
||||
./neostats start
|
||||
|
||||
It should link and sync with your server in a matter of seconds.
|
||||
|
||||
Please now read
|
||||
http://wiki.neostats.net/confluence/display/NeoStats/Operator+Manual
|
||||
for details on how to operate NeoStats from an IRC Client.
|
||||
|
||||
If anything goes wrong, there *might* be an error message in the log
|
||||
files. Have a look in ~/NeoStats3.0/logs/neostats-date.log it might give
|
||||
you a clue to what's wrong! NeoStats might also send a wallops to the
|
||||
network about what went wrong. Check the status window of your IRC client.
|
||||
|
||||
There are some command line options for NeoStats that you may find
|
||||
useful:
|
||||
|
||||
-h will display a help screen showing these options.
|
||||
-v will display the version number
|
||||
-d 1-10 Enable debugging output 1 = lowest, 10 = highest
|
||||
-n Do not load any modules on startup
|
||||
-q Quiet start - for cron scripts
|
||||
-f Do not fork into background (for debugging)
|
||||
|
||||
To use these options, add the option(s) you require when you run
|
||||
NeoStats, e.g.:
|
||||
|
||||
./neostats start -h
|
||||
|
||||
Note: although you can combine most of these options, -v (version)
|
||||
and -h (help) will return information to you and NeoStats will not
|
||||
process any other options you pass.
|
||||
|
||||
|
||||
1.9 Notes for upgraders
|
||||
-----------------------
|
||||
|
||||
This section is for users upgrading a NeoStats 3.0 series installation
|
||||
only. If you are upgrading from an older series of NeoStats such as
|
||||
2.5.x, you must treat it as a new installation. Your configuration and
|
||||
data from 2.5.x is not compatible with NeoStats 3.0.
|
||||
|
||||
If you are upgrading from an older version of the 3.0 series we
|
||||
recommend that you backup the current version first.
|
||||
|
||||
If you are running crontab for NeoStats, we recommend that you disable
|
||||
this before making the upgrade so that cron does not start up an older
|
||||
versopn while you are working on the upgrade.
|
||||
|
||||
Make sure that NeoStats is not running. In an IRC client connected to
|
||||
your network type:
|
||||
|
||||
/msg NeoStats shutdown Upgrade
|
||||
|
||||
NeoStats will save important information so wait for this to finish.
|
||||
|
||||
To make the backup go to your home directory and type:
|
||||
|
||||
cp NeoStats3.0 NeoStatsBackup -r
|
||||
|
||||
If you fail to perform this backup and the upgrade causes you problems,
|
||||
you might lose all NeoStats information.
|
||||
|
||||
We also recommend rebuilding any additional modules after upgrading
|
||||
NeoStats. You may not need to upgrade the additional module, just
|
||||
rebuild and reinstall it after the make install in Step 1.4 above.
|
||||
|
||||
If after upgrading, NeoStats crashes when loading one of your modules
|
||||
e.g. OPSB, this usually means that you did not rebuild the module for
|
||||
the latest version of NeoStats.
|
||||
|
||||
If you do run into problems upgrading and need to restore your backup,
|
||||
you can do so by going to your home directory and typing:
|
||||
|
||||
cp NeoStatsBackup NeoStats3.0 -r
|
||||
|
||||
Your old modules will also be restored along with the old version of
|
||||
NeoStats so there is no need to rebuild them for a restore.
|
||||
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2 Support Information
|
||||
---------------------
|
||||
|
||||
2.1 Before contacting support
|
||||
-----------------------------
|
||||
|
||||
** IMPORTANT - PLEASE READ BEFORE CONTACTING US **
|
||||
|
||||
In order that we can dedicate time to developing NeoStats and can address
|
||||
support issues quickly, there are some ways you can help to reduce
|
||||
unnecessary support calls to the NeoStats team.
|
||||
|
||||
First, check you are using the latest release version of NeoStats as found on
|
||||
the NeoStats download page. It could be that your problem is fixed or your
|
||||
suggestion implemented in the latest version. We are not able to provide
|
||||
support for older versions of NeoStats than the current release.
|
||||
|
||||
We provide no support for SVN snapshots whether released on the web site or
|
||||
not. If you have downloaded a SVN snapshot and are having problems, you should
|
||||
revert back to your previous working version or if this is your first
|
||||
installation, the current release build as indicated on the web site. Please
|
||||
do not contact us about problems with SVN versions. We will advise users
|
||||
occasionally to try a SVN snapshot to fix a problem, but as we do not put our
|
||||
SVN versions through extensive testing, there might be new bugs or problems.
|
||||
|
||||
We may occasionally provide a custom modification to resolve a problem. Other
|
||||
than in this event, we provide no support for modified versions of NeoStats.
|
||||
If you have modified NeoStats in any way and experience problems, you should
|
||||
only contact us if you can reproduce the problem with an unmodified version.
|
||||
We are not able to support modifications to NeoStats made by others.
|
||||
|
||||
Before contacting us with a problem or a bug, please make sure you have read
|
||||
all the documentation provided. You should then check the web site bug list
|
||||
and search the forums to see if your problem has already been reported and if
|
||||
a solution has been posted.
|
||||
|
||||
Read the log files. NeoStats tries to log problems it encounters and the log
|
||||
file should tell you what went wrong. If the error in the log file does not
|
||||
help you, you still need to tell us what it says.
|
||||
|
||||
Before sending us a suggestion, you should check the forums carefully to see
|
||||
if your suggestion has already been made and if the NeoStats team have decided
|
||||
to implement it or not.
|
||||
|
||||
You do not have to read all the messages to find out if your issue has
|
||||
already been discussed. The use of the "Search" feature on the forums is a
|
||||
great way to quickly get answers to your problem if other users have already
|
||||
encountered the issue.
|
||||
|
||||
Read the post entitled Bug Reporting Guidelines in the forum before posting.
|
||||
This is at the top of all the support forums. It reminds you what
|
||||
information you must provide to get support.
|
||||
|
||||
NeoStats Group are only able to help with issues affecting NeoStats. We are
|
||||
not able to help set up your IRC Server or Services on your network (including
|
||||
the setup of C: N: and U: lines) so please don't ask us. If you have a
|
||||
question about your IRC Server or Services package, please check the
|
||||
documentation that came with them and contact their team if you still need
|
||||
assistance.
|
||||
|
||||
The RAW command is an unsupported command. If you need help using it, you
|
||||
should probably not be using it. Please do not ask us for help on the RAW
|
||||
command.
|
||||
|
||||
Thank you.
|
||||
|
||||
|
||||
2.1 Where to get support
|
||||
------------------------
|
||||
|
||||
You can get support for NeoStats in a number of different ways so choose
|
||||
the one that suits you best.
|
||||
|
||||
* Bug reporting system
|
||||
You can check this to see if there are any known bugs in NeoStats and
|
||||
find out when they are fixed. For the bug tracking system, visit:
|
||||
|
||||
http://bugs.neostats.net/
|
||||
|
||||
* Message boards available at:
|
||||
|
||||
http://www.neostats.net/boards/
|
||||
|
||||
* The Neostats Wiki available at:
|
||||
http://wiki.neostats.net/confluence/display/NeoStats/
|
||||
|
||||
* The NeoStats IRC support channel at:
|
||||
|
||||
server: irc.irc-chat.net
|
||||
channel: #neostats
|
||||
|
||||
Be warned that we are not always available on the channel to help you.
|
||||
|
||||
2.2 What to provide when requesting support
|
||||
-------------------------------------------
|
||||
|
||||
It always helps to provide as much information as possible about your
|
||||
environment when asking for help. Please make sure you include at least
|
||||
the following information:
|
||||
|
||||
Operating system version (i.e., Redhat 7.0, Mandrake 9.1 etc)
|
||||
gcc version (found via gcc -v)
|
||||
Version of NeoStats you are using and if the problem is with a
|
||||
module, the version of the module (found via /msg neostats modlist)
|
||||
The type of IRCD you are attempting to connect to (and version
|
||||
number)
|
||||
NeoStats will generate a file called segfault.log if it crashes. If
|
||||
this file exists, you must send it to us.
|
||||
|
||||
We may request that you enable debugging and submit us the results of
|
||||
debugging. To enable debugging, use the following command to start
|
||||
NeoStats:
|
||||
|
||||
./bin/neostats -d10
|
||||
|
||||
When it crashes, or the bug has been reproduced, send the following
|
||||
files:
|
||||
|
||||
segfault.log
|
||||
logs/debug.log
|
||||
|
||||
This will help us to be able to reproduce the bug and create a fix for
|
||||
it.
|
||||
|
||||
Sometimes we might request you to run a GDB backtrace of the problem
|
||||
In order to generate that you will execute the following commands:
|
||||
|
||||
gdb bin/neostats
|
||||
|
||||
when you arrive at the GDB command prompt, type:
|
||||
|
||||
run -fd 10
|
||||
|
||||
now go and make NeoStats crash in some way. when it crashs, you will
|
||||
be returned to the GDB command prompt. Type:
|
||||
|
||||
bt full
|
||||
|
||||
and save that output to send to us. To exit GDB, just type "quit"
|
||||
|
||||
Remember you cannot give us too much information about your system and
|
||||
setup, but if you do not give us enough, we cannot help you and if we
|
||||
have to keep asking you to provide more information, that is less time
|
||||
we are spending fixing and developing NeoStats.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3. Contributions
|
||||
----------------
|
||||
|
||||
Want to Help us?
|
||||
|
||||
We are always looking for help.
|
||||
|
||||
Currently, what we really are looking for is people to help us out with
|
||||
our documentation on the wiki and of course, other people that can code
|
||||
in C to help us with development.
|
||||
|
||||
if you would like to have a go at writting your own module, in either
|
||||
C or Perl, you can consult
|
||||
http://wiki.neostats.net/confluence/display/Dev for documenation. We
|
||||
will also provide you with a SVN repository, bug tracker, and all the
|
||||
other tools that we use (such as build servers etc) if you want it.
|
||||
Just contact Fish to find out how to get started.
|
||||
|
||||
If you would like to help out, See Support Information above for details
|
||||
on how to contact us.
|
||||
|
||||
Finally, as I (Fish) do not have a single artistic bone in my body, I'm
|
||||
always looking for people to help out with our websites at
|
||||
http://www.neostats.net and http://secure.irc-chat.net/. If you are any
|
||||
good with HTML and would like to help us "spruce" up our webpages, just
|
||||
contact me.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
************************************************************************
|
||||
** This document was last updated on March 5th, 2008 by Fish **
|
||||
************************************************************************
|
|
@ -1,30 +0,0 @@
|
|||
Win32 Installation Instructions
|
||||
|
||||
Currently, Win32 versions of NeoStats appear to be stable, but for this
|
||||
Release, a Debug Version is used. This means that when run, NeoStats
|
||||
will open a console window and output large amounts of Debug
|
||||
Information. Closing this window will result in NeoStats closing as
|
||||
well.
|
||||
|
||||
To Configure NeoStats, you must edit the neostats.conf file located in the
|
||||
NeoStats installation directory, this is typically c:\Program Files\NeoStats
|
||||
but if you change it during the setup, it will be in the location you
|
||||
specify.
|
||||
|
||||
Once you have edited the Configuration File, you may start NeoStats by
|
||||
clicking on the NeoStats icon in your Start Menu. NeoStats will then
|
||||
open the Console Window and place a icon in the taskbar. After that,
|
||||
NeoStats will operate just like the Unix Version.
|
||||
|
||||
As 3rd party modules are released, we will provide Win32 installations
|
||||
for those files as well.
|
||||
|
||||
If you encounter any problems on Win32, please post the issues to our
|
||||
Forums so we can investigate.
|
||||
|
||||
We hope that with future releases, you will be able to run NeoStats as
|
||||
a service rather than as a program, but that is not currently implemented.
|
||||
|
||||
Thanks
|
||||
|
||||
The NeoStats Developers
|
36
RELNOTES
36
RELNOTES
|
@ -1,36 +0,0 @@
|
|||
* NeoStats * M & DNB & Fish * Version 3.0.2
|
||||
==============================================================================
|
||||
Important information you should know: (READ THIS!)
|
||||
==============================================================================
|
||||
|
||||
This if the first "gold" release of NeoStats 3.0. It is *NOT* compatible
|
||||
with previous 2.5.x releases of NeoStats, so you will have to setup
|
||||
NeoStats all over again. We may, in the future, provide some scripts to
|
||||
port some of your settings and data from 2.5 to 3.0, but these scripts are
|
||||
not available now.
|
||||
|
||||
NeoStats 3.0 will co exist with an existing 2.5 series installation so you
|
||||
can run both together for testing this version if you wish.
|
||||
|
||||
Settings and data files for previous 3.0 alpha versions may not be compatible
|
||||
with this version. You should delete or move all files with "gdbm" or "bdb"
|
||||
in the filename from the directory ~/NeoStats 3.0/data if you have
|
||||
problems/crashs after upgrading
|
||||
|
||||
Known issues that we are aware of and should not be reported:
|
||||
|
||||
==============================================================================
|
||||
* I get a link error: /usr/bin/ld: cannot find -lperl during the make step
|
||||
of the installation on Debian. What's wrong?
|
||||
|
||||
- You need to install the libperl-dev package.
|
||||
|
||||
Alternatively, create a symbolic link from libperl.so.5.6.1 to libperl.so in
|
||||
/usr/lib:
|
||||
|
||||
% cd /usr/lib; ln -s libperl.so.5.6.1 libperl.so
|
||||
and re-run the make step of the installation.
|
||||
|
||||
or if you dont want to take advantage of perl modules and extensions, then
|
||||
you can run ./configure --disable-perl
|
||||
==============================================================================
|
3
TODO
3
TODO
|
@ -1,3 +0,0 @@
|
|||
NeoStats - TODO Log:
|
||||
--------------------
|
||||
http://bugs.neostats.net
|
7264
aclocal.m4
vendored
7264
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,287 +0,0 @@
|
|||
AC_DEFUN([TYPE_SOCKLEN_T],
|
||||
[
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
AC_MSG_CHECKING([for socklen_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_socklen_t_equiv],
|
||||
[
|
||||
# Systems have either "struct sockaddr *" or
|
||||
# "void *" as the second argument to getpeername
|
||||
curl_cv_socklen_t_equiv=
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
int getpeername (int, $arg2 *, $t *);
|
||||
],[
|
||||
$t len;
|
||||
getpeername(0,0,&len);
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
done
|
||||
|
||||
if test "x$curl_cv_socklen_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_socklen_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
|
||||
[type to use in place of socklen_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
])
|
||||
|
||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||
dnl and a few other things. If not found, we set it to unsigned int, as even
|
||||
dnl 64-bit implementations use to set it to a 32-bit type.
|
||||
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
[
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
AC_MSG_CHECKING([for in_addr_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
|
||||
[
|
||||
curl_cv_in_addr_t_equiv=
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
],[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
|
||||
if test "x$curl_cv_in_addr_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[type to use in place of in_addr_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>])
|
||||
])
|
||||
AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET],
|
||||
[
|
||||
AC_MSG_CHECKING([non-blocking sockets style])
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for O_NONBLOCK test */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
],[
|
||||
/* try to compile O_NONBLOCK */
|
||||
|
||||
#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if defined(__SVR4) || defined(__srv4__)
|
||||
# define PLATFORM_SOLARIS
|
||||
# else
|
||||
# define PLATFORM_SUNOS4
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4)
|
||||
# define PLATFORM_AIX_V3
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
|
||||
#error "O_NONBLOCK does not work on this platform"
|
||||
#endif
|
||||
int socket;
|
||||
int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK);
|
||||
],[
|
||||
dnl the O_NONBLOCK test was fine
|
||||
nonblock="O_NONBLOCK"
|
||||
AC_DEFINE(HAVE_O_NONBLOCK, 1, [use O_NONBLOCK for non-blocking sockets])
|
||||
],[
|
||||
dnl the code was bad, try a different program now, test 2
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for FIONBIO test */
|
||||
#include <unistd.h>
|
||||
#include <stropts.h>
|
||||
],[
|
||||
/* FIONBIO source test (old-style unix) */
|
||||
int socket;
|
||||
int flags = ioctl(socket, FIONBIO, &flags);
|
||||
],[
|
||||
dnl FIONBIO test was good
|
||||
nonblock="FIONBIO"
|
||||
AC_DEFINE(HAVE_FIONBIO, 1, [use FIONBIO for non-blocking sockets])
|
||||
],[
|
||||
dnl FIONBIO test was also bad
|
||||
dnl the code was bad, try a different program now, test 3
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for ioctlsocket test (cygwin?) */
|
||||
#include <windows.h>
|
||||
],[
|
||||
/* ioctlsocket source code */
|
||||
int socket;
|
||||
int flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||
],[
|
||||
dnl ioctlsocket test was good
|
||||
nonblock="ioctlsocket"
|
||||
AC_DEFINE(HAVE_IOCTLSOCKET, 1, [use ioctlsocket() for non-blocking sockets])
|
||||
],[
|
||||
dnl ioctlsocket didnt compile!, go to test 4
|
||||
|
||||
AC_TRY_LINK([
|
||||
/* headers for IoctlSocket test (Amiga?) */
|
||||
#include <sys/ioctl.h>
|
||||
],[
|
||||
/* IoctlSocket source code */
|
||||
int socket;
|
||||
int flags = IoctlSocket(socket, FIONBIO, (long)1);
|
||||
],[
|
||||
dnl ioctlsocket test was good
|
||||
nonblock="IoctlSocket"
|
||||
AC_DEFINE(HAVE_IOCTLSOCKET_CASE, 1, [use Ioctlsocket() for non-blocking sockets])
|
||||
],[
|
||||
dnl Ioctlsocket didnt compile, do test 5!
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for SO_NONBLOCK test (BeOS) */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
],[
|
||||
/* SO_NONBLOCK source code */
|
||||
long b = 1;
|
||||
int socket;
|
||||
int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
|
||||
],[
|
||||
dnl the SO_NONBLOCK test was good
|
||||
nonblock="SO_NONBLOCK"
|
||||
AC_DEFINE(HAVE_SO_NONBLOCK, 1, [use SO_NONBLOCK for non-blocking sockets])
|
||||
],[
|
||||
dnl test 5 didnt compile!
|
||||
nonblock="nada"
|
||||
AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, [disabled non-blocking sockets])
|
||||
])
|
||||
dnl end of fifth test
|
||||
|
||||
])
|
||||
dnl end of forth test
|
||||
|
||||
])
|
||||
dnl end of third test
|
||||
|
||||
])
|
||||
dnl end of second test
|
||||
|
||||
])
|
||||
dnl end of non-blocking try-compile test
|
||||
AC_MSG_RESULT($nonblock)
|
||||
|
||||
if test "$nonblock" = "nada"; then
|
||||
AC_MSG_WARN([non-block sockets disabled])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
|
||||
define(DPKG_CACHED_TRY_COMPILE,[
|
||||
AC_MSG_CHECKING($1)
|
||||
AC_CACHE_VAL($2,[
|
||||
AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
|
||||
])
|
||||
if test "x$$2" = xyes; then
|
||||
true
|
||||
$5
|
||||
else
|
||||
true
|
||||
$6
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
||||
define(ADNS_C_GCCATTRIB,[
|
||||
DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),adns_cv_c_attribute_supported,,
|
||||
[extern int testfunction(int x) __attribute__((,,))],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GNUC25_ATTRIB, 1, HAVE_GNUC25_ATTRIB)
|
||||
DPKG_CACHED_TRY_COMPILE(__attribute__((noreturn)),adns_cv_c_attribute_noreturn,,
|
||||
[extern int testfunction(int x) __attribute__((noreturn))],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GNUC25_NORETURN, 1, HAVE_GNUC25_NORETURN),
|
||||
AC_MSG_RESULT(no))
|
||||
DPKG_CACHED_TRY_COMPILE(__attribute__((const)),adns_cv_c_attribute_const,,
|
||||
[extern int testfunction(int x) __attribute__((const))],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GNUC25_CONST, 1, HAVE_GNUC25_CONST),
|
||||
AC_MSG_RESULT(no))
|
||||
DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),adns_cv_attribute_format,,
|
||||
[extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GNUC25_PRINTFFORMAT, 1, HAVE_GNUC25_PRINTFFORMAT),
|
||||
AC_MSG_RESULT(no)),
|
||||
AC_MSG_RESULT(no))
|
||||
])
|
||||
|
||||
define(ADNS_C_GETFUNC,[
|
||||
AC_CHECK_FUNC([$1],,[
|
||||
AC_CHECK_LIB([$2],[$1],[$3],[
|
||||
AC_MSG_ERROR([cannot find library function $1])
|
||||
])
|
||||
])
|
||||
])
|
||||
AC_DEFUN([AC_MSG_HEADER], [
|
||||
echo ""
|
||||
$srcdir/autotools/shtool echo -e "%B$1%b"
|
||||
echo ""
|
||||
])
|
||||
# Prevent libtool for checking how to run C++ compiler and check for other
|
||||
# tools we don't want to use. We do this by m4-defining the _LT_AC_TAGCONFIG
|
||||
# variable to the code to run, as by default it uses a much more complicated
|
||||
# approach. The code below that is actually added seems to be used for cases
|
||||
# where configure has trouble figuring out what C compiler to use but where
|
||||
# the installed libtool has an idea.
|
||||
#
|
||||
# This function is a re-implemented version of the Paolo Bonzini fix posted to
|
||||
# the c-ares mailing list by Bram Matthys on May 6 2006. My version removes
|
||||
# redundant code but also adds the LTCFLAGS check that wasn't in that patch.
|
||||
#
|
||||
# Some code in this function was extracted from the generated configure script.
|
||||
#
|
||||
# CARES_CLEAR_LIBTOOL_TAGS
|
||||
AC_DEFUN([CARES_CLEAR_LIBTOOL_TAGS],
|
||||
[m4_define([_LT_AC_TAGCONFIG], [
|
||||
if test -f "$ltmain"; then
|
||||
if test ! -f "${ofile}"; then
|
||||
AC_MSG_WARN([output file `$ofile' does not exist])
|
||||
fi
|
||||
|
||||
if test -z "$LTCC"; then
|
||||
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
|
||||
if test -z "$LTCC"; then
|
||||
AC_MSG_WARN([output file `$ofile' does not look like a libtool
|
||||
script])
|
||||
else
|
||||
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
|
||||
fi
|
||||
fi
|
||||
if test -z "$LTCFLAGS"; then
|
||||
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
|
||||
fi
|
||||
fi
|
||||
])]
|
||||
)
|
||||
|
4243
autotools/aclocal.m4
vendored
4243
autotools/aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,162 +0,0 @@
|
|||
dnl @synopsis AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
dnl
|
||||
dnl This macro compares two version strings. It is used heavily in the
|
||||
dnl macro _AX_PATH_BDB for library checking. Due to the various number
|
||||
dnl of minor-version numbers that can exist, and the fact that string
|
||||
dnl comparisons are not compatible with numeric comparisons, this is
|
||||
dnl not necessarily trivial to do in a autoconf script. This macro
|
||||
dnl makes doing these comparisons easy.
|
||||
dnl
|
||||
dnl The six basic comparisons are available, as well as checking
|
||||
dnl equality limited to a certain number of minor-version levels.
|
||||
dnl
|
||||
dnl The operator OP determines what type of comparison to do, and can
|
||||
dnl be one of:
|
||||
dnl
|
||||
dnl eq - equal (test A == B)
|
||||
dnl ne - not equal (test A != B)
|
||||
dnl le - less than or equal (test A <= B)
|
||||
dnl ge - greater than or equal (test A >= B)
|
||||
dnl lt - less than (test A < B)
|
||||
dnl gt - greater than (test A > B)
|
||||
dnl
|
||||
dnl Additionally, the eq and ne operator can have a number after it to
|
||||
dnl limit the test to that number of minor versions.
|
||||
dnl
|
||||
dnl eq0 - equal up to the length of the shorter version
|
||||
dnl ne0 - not equal up to the length of the shorter version
|
||||
dnl eqN - equal up to N sub-version levels
|
||||
dnl neN - not equal up to N sub-version levels
|
||||
dnl
|
||||
dnl When the condition is true, shell commands ACTION-IF-TRUE are run,
|
||||
dnl otherwise shell commands ACTION-IF-FALSE are run. The environment
|
||||
dnl variable 'ax_compare_version' is always set to either 'true' or
|
||||
dnl 'false' as well.
|
||||
dnl
|
||||
dnl Examples:
|
||||
dnl
|
||||
dnl AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
|
||||
dnl AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
|
||||
dnl
|
||||
dnl would both be true.
|
||||
dnl
|
||||
dnl AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
|
||||
dnl AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
|
||||
dnl
|
||||
dnl would both be false.
|
||||
dnl
|
||||
dnl AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
|
||||
dnl
|
||||
dnl would be true because it is only comparing two minor versions.
|
||||
dnl
|
||||
dnl AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
|
||||
dnl
|
||||
dnl would be true because it is only comparing the lesser number of
|
||||
dnl minor versions of the two values.
|
||||
dnl
|
||||
dnl Note: The characters that separate the version numbers do not
|
||||
dnl matter. An empty string is the same as version 0. OP is evaluated
|
||||
dnl by autoconf, not configure, so must be a string, not a variable.
|
||||
dnl
|
||||
dnl The author would like to acknowledge Guido Draheim whose advice
|
||||
dnl about the m4_case and m4_ifvaln functions make this macro only
|
||||
dnl include the portions necessary to perform the specific comparison
|
||||
dnl specified by the OP argument in the final configure script.
|
||||
dnl
|
||||
dnl @category Misc
|
||||
dnl @author Tim Toolan <toolan@ele.uri.edu>
|
||||
dnl @version 2004-03-01
|
||||
dnl @license GPLWithACException
|
||||
|
||||
dnl #########################################################################
|
||||
AC_DEFUN([AX_COMPARE_VERSION], [
|
||||
# Used to indicate true or false condition
|
||||
ax_compare_version=false
|
||||
|
||||
# Convert the two version strings to be compared into a format that
|
||||
# allows a simple string comparison. The end result is that a version
|
||||
# string of the form 1.12.5-r617 will be converted to the form
|
||||
# 0001001200050617. In other words, each number is zero padded to four
|
||||
# digits, and non digits are removed.
|
||||
AS_VAR_PUSHDEF([A],[ax_compare_version_A])
|
||||
A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
AS_VAR_PUSHDEF([B],[ax_compare_version_B])
|
||||
B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
|
||||
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
|
||||
-e 's/[[^0-9]]//g'`
|
||||
|
||||
dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
|
||||
dnl # then the first line is used to determine if the condition is true.
|
||||
dnl # The sed right after the echo is to remove any indented white space.
|
||||
m4_case(m4_tolower($2),
|
||||
[lt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[gt],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
|
||||
],
|
||||
[le],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],
|
||||
[ge],[
|
||||
ax_compare_version=`echo "x$A
|
||||
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
|
||||
],[
|
||||
dnl Split the operator from the subversion count if present.
|
||||
m4_bmatch(m4_substr($2,2),
|
||||
[0],[
|
||||
# A count of zero means use the length of the shorter version.
|
||||
# Determine the number of characters in A and B.
|
||||
ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
|
||||
ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
|
||||
|
||||
# Set A to no more than B's length and B to no more than A's length.
|
||||
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
|
||||
],
|
||||
[[0-9]+],[
|
||||
# A count greater than zero means use only that many subversions
|
||||
A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
|
||||
],
|
||||
[.+],[
|
||||
AC_WARNING(
|
||||
[illegal OP numeric parameter: $2])
|
||||
],[])
|
||||
|
||||
# Pad zeros at end of numbers to make same length.
|
||||
ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
|
||||
B="$B`echo $A | sed 's/./0/g'`"
|
||||
A="$ax_compare_version_tmp_A"
|
||||
|
||||
# Check for equality or inequality as necessary.
|
||||
m4_case(m4_tolower(m4_substr($2,0,2)),
|
||||
[eq],[
|
||||
test "x$A" = "x$B" && ax_compare_version=true
|
||||
],
|
||||
[ne],[
|
||||
test "x$A" != "x$B" && ax_compare_version=true
|
||||
],[
|
||||
AC_WARNING([illegal OP parameter: $2])
|
||||
])
|
||||
])
|
||||
|
||||
AS_VAR_POPDEF([A])dnl
|
||||
AS_VAR_POPDEF([B])dnl
|
||||
|
||||
dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
|
||||
if test "$ax_compare_version" = "true" ; then
|
||||
m4_ifvaln([$4],[$4],[:])dnl
|
||||
m4_ifvaln([$5],[else $5])dnl
|
||||
fi
|
||||
]) dnl AX_COMPARE_VERSION
|
|
@ -1,6 +0,0 @@
|
|||
AC_DEFUN([AX_DISTVERSION], [
|
||||
AC_ARG_WITH(distversion, AC_HELP_STRING([--with-distversion], [Version Name to use for making distributions]),
|
||||
[DISTDIRVERSION="$PACKAGE-$VERSION-$withval"],
|
||||
[DISTDIRVERSION="$PACKAGE-$VERSION"])
|
||||
AC_SUBST(DISTDIRVERSION)
|
||||
])
|
|
@ -1,25 +0,0 @@
|
|||
dnl @* AX_MAINTAINER_MODE_AUTO_SILENT
|
||||
dnl
|
||||
dnl Set autotools to error/sleep settings so that they are not run when
|
||||
dnl being errornously triggered. Likewise make libtool-silent when
|
||||
dnl libtool has been used.
|
||||
dnl
|
||||
dnl I am using the macro quite a lot since some automake versions had the
|
||||
dnl tendency to try to rerun some autotools on a mere make even when not
|
||||
dnl quite in --maintainer-mode. That is very annoying. Likewise, a user
|
||||
dnl who installs from source does not want to see doubled compiler messages.
|
||||
dnl
|
||||
dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I?
|
||||
dnl
|
||||
dnl @: guidod@gmx.de
|
||||
dnl @$Id: ax_maintainer_mode_auto_silent.m4,v 1.1 2003/10/19 00:12:45 guidod Exp $
|
||||
|
||||
AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],
|
||||
[AC_MSG_CHECKING(silent building of source files)
|
||||
if test ".$LIBTOOL" != "." ; then
|
||||
LIBTOOL="$LIBTOOL --quiet"
|
||||
AC_MSG_RESULT([Enabled])
|
||||
else
|
||||
AC_MSG_RESULT([Disabled])
|
||||
fi
|
||||
])
|
File diff suppressed because it is too large
Load diff
|
@ -1,91 +0,0 @@
|
|||
dnl @* AX_PATH_LIB_PCRE [(A/NA)]
|
||||
dnl
|
||||
dnl check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly.
|
||||
dnl
|
||||
dnl also provide --with-pcre option that may point to the $prefix of
|
||||
dnl the pcre installation - the macro will check $pcre/include and
|
||||
dnl $pcre/lib to contain the necessary files.
|
||||
dnl
|
||||
dnl the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported
|
||||
dnl and they can take advantage of the LIBS/CFLAGS additions.
|
||||
dnl @: guidod@gmx.de
|
||||
dnl @$Id: $
|
||||
|
||||
|
||||
AC_DEFUN([AX_PATH_LIB_PCRE], [dnl
|
||||
AC_MSG_HEADER([Configuring for libpcre now])
|
||||
AX_CONFIG_LIB_PCRE
|
||||
])
|
||||
AC_DEFUN([AX_PATH_LIB_PCRE_NOTUSED], [dnl
|
||||
AC_ARG_WITH(pcre,
|
||||
[ --with-pcre[[=prefix]] compile xmlpcre part (via libpcre check)],,
|
||||
with_pcre="yes")
|
||||
if test ".$with_pcre" = ".no" ; then
|
||||
AC_MSG_RESULT([disabled])
|
||||
m4_ifval($2,$2)
|
||||
AX_CONFIG_LIB_PCRE
|
||||
else
|
||||
AC_MSG_RESULT([(testing)])
|
||||
OLDLIBS="$LIBS"
|
||||
AC_CHECK_LIB(pcre, pcre_study)
|
||||
if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
|
||||
PCRE_LIBS="-lpcre"
|
||||
PCRE_CFLAGS='-I$(top_srcdir)'/lib/pcre
|
||||
LIBS="$OLDLIBS"
|
||||
AC_MSG_CHECKING([lib pcre])
|
||||
AC_MSG_RESULT([$PCRE_LIBS])
|
||||
m4_ifval($1,$1)
|
||||
AM_CONDITIONAL(BUILD_PCRE, false)
|
||||
AC_CHECK_HEADERS(pcre.h)
|
||||
if eval pcre-config --cflags 2>/dev/null >/dev/null; then
|
||||
PCRE_CFLAGS=`pcre-config --cflags`
|
||||
PCRE_LIBS=`pcre-config --libs`
|
||||
fi
|
||||
else
|
||||
OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib"
|
||||
OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include"
|
||||
OLDLIBS="$LIBS"
|
||||
AC_CHECK_LIB(pcre, pcre_compile)
|
||||
LIBS="$OLDLIBS"
|
||||
CPPFLAGS="$OLDCPPFLAGS"
|
||||
LDFLAGS="$OLDLDFLAGS"
|
||||
if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
|
||||
AC_MSG_RESULT(setting PCRE_LIBS -L$with_pcre/lib -lpcre)
|
||||
PCRE_LIBS="-L$with_pcre/lib -lpcre"
|
||||
test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
|
||||
AC_CHECK_HEADERS(pcre.h)
|
||||
AC_MSG_CHECKING([lib pcre])
|
||||
AC_MSG_RESULT([$PCRE_LIBS])
|
||||
m4_ifval($1,$1)
|
||||
AM_CONDITIONAL(BUILD_PCRE, false)
|
||||
else
|
||||
AC_MSG_CHECKING([lib pcre])
|
||||
AC_MSG_RESULT([no, (WARNING)])
|
||||
m4_ifval($2,$2)
|
||||
AX_CONFIG_LIB_PCRE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([PCRE_LIBS])
|
||||
AC_SUBST([PCRE_CFLAGS])
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CONFIG_LIB_PCRE],[dnl
|
||||
dnl PCRE options
|
||||
NPCRE_MAJOR_VERSION=4
|
||||
NPCRE_MINOR_VERSION=3
|
||||
NPCRE_VERSION=$PCRE_MAJOR_VERSION.$PCRE_MINOR_VERSION
|
||||
|
||||
AC_DEFINE(LINK_SIZE, 2, "PCRE Lnk size")
|
||||
AC_DEFINE(POSIX_MALLOC_THRESHOLD, 5, "Malloc Threshold")
|
||||
AC_DEFINE(MATCH_LIMIT, 10000000, "PCRE Match limit")
|
||||
AC_DEFINE(USE_LOCAL_PCRE, 1, "Use the local copy of PCRE")
|
||||
AC_DEFINE(PCRE_MAJOR_VERSION, $NPCRE_MAJOR_VERSION, "PCRE Version")
|
||||
AC_DEFINE(PCRE_MINOR_VERSION, NPCRE_MINOR_VERSION, "PCRE Version")
|
||||
AC_DEFINE(PCRE_VERSION, NPCRE_VERSION, "Pcre full version")
|
||||
PCRE_LIBS='${top_srcdir}/'lib/pcre/libpcre.la
|
||||
PCRE_CFLAGS='-I${top_srcdir}/'lib/pcre
|
||||
AC_SUBST([PCRE_LIBS])
|
||||
AC_SUBST([PCRE_CFLAGS])
|
||||
AM_CONDITIONAL(BUILD_PCRE, true)
|
||||
])
|
|
@ -1,138 +0,0 @@
|
|||
##### http://autoconf-archive.cryp.to/berkeley_db.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BERKELEY_DB([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro tries to find Berkeley DB. It honors MINIMUM-VERSION if
|
||||
# given.
|
||||
#
|
||||
# If libdb is found, DB_HEADER and DB_LIBS variables are set and
|
||||
# ACTION-IF-FOUND shell code is executed if specified. DB_HEADER is
|
||||
# set to location of db.h header in quotes (e.g. "db3/db.h") and
|
||||
# AC_DEFINE_UNQUOTED is called on it, so that you can type
|
||||
#
|
||||
# #include DB_HEADER
|
||||
#
|
||||
# in your C/C++ code. DB_LIBS is set to linker flags needed to link
|
||||
# against the library (e.g. -ldb3.1) and AC_SUBST is called on it.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2007-07-29
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2007 Vaclav Slavik <vaclav.slavik@matfyz.cz>
|
||||
#
|
||||
# Copying and distribution of this file, with or without
|
||||
# modification, are permitted in any medium without royalty provided
|
||||
# the copyright notice and this notice are preserved.
|
||||
|
||||
AC_DEFUN([AX_BERKELEY_DB],
|
||||
[
|
||||
old_LIBS="$LIBS"
|
||||
# Add --with-bdb-dir option to configure.
|
||||
AC_ARG_WITH([bdb-dir],
|
||||
[AC_HELP_STRING([--with-bdb-dir=DIR],
|
||||
[Berkeley DB installation directory])])
|
||||
|
||||
# Check if --with-bdb-dir was specified.
|
||||
if test "x$with_bdb_dir" != "x" ; then
|
||||
# Set --with-bdb-dir option.
|
||||
ax_path_bdb_INC="$with_bdb_dir/include"
|
||||
ax_path_bdb_LIB="$with_bdb_dir/lib"
|
||||
|
||||
dnl # Save previous environment, and modify with new stuff.
|
||||
ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
|
||||
|
||||
ax_path_bdb_save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
|
||||
fi
|
||||
minversion=ifelse([$1], ,,$1)
|
||||
|
||||
DB_HEADER=""
|
||||
DB_LIBS=""
|
||||
|
||||
if test -z $minversion ; then
|
||||
minvermajor=0
|
||||
minverminor=0
|
||||
minverpatch=0
|
||||
AC_MSG_CHECKING([for Berkeley DB])
|
||||
else
|
||||
minvermajor=`echo $minversion | cut -d. -f1`
|
||||
minverminor=`echo $minversion | cut -d. -f2`
|
||||
minverpatch=`echo $minversion | cut -d. -f3`
|
||||
minvermajor=${minvermajor:-0}
|
||||
minverminor=${minverminor:-0}
|
||||
minverpatch=${minverpatch:-0}
|
||||
AC_MSG_CHECKING([for Berkeley DB >= $minversion])
|
||||
fi
|
||||
|
||||
for version in "" 5.0 4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 3.6 3.5 3.4 3.3 3.2 3.1 ; do
|
||||
|
||||
if test -z $version ; then
|
||||
db_lib="-ldb"
|
||||
try_headers="db.h"
|
||||
else
|
||||
db_lib="-ldb-$version"
|
||||
try_headers="db$version/db.h db`echo $version | sed -e 's,\..*,,g'`/db.h db`echo $version | sed -e 's:\.::g'`/db.h"
|
||||
fi
|
||||
|
||||
LIBS="$old_LIBS $db_lib"
|
||||
|
||||
for db_hdr in $try_headers ; do
|
||||
if test -z $DB_HEADER ; then
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[
|
||||
#include <${db_hdr}>
|
||||
],
|
||||
[
|
||||
#if !((DB_VERSION_MAJOR > (${minvermajor}) || \
|
||||
(DB_VERSION_MAJOR == (${minvermajor}) && \
|
||||
DB_VERSION_MINOR > (${minverminor})) || \
|
||||
(DB_VERSION_MAJOR == (${minvermajor}) && \
|
||||
DB_VERSION_MINOR == (${minverminor}) && \
|
||||
DB_VERSION_PATCH >= (${minverpatch}))))
|
||||
#error "too old version"
|
||||
#endif
|
||||
|
||||
DB *db;
|
||||
db_create(&db, NULL, 0);
|
||||
])],
|
||||
[
|
||||
if test "x$with_bdb_dir" != "x" ; then
|
||||
AC_MSG_RESULT([directory $ax_path_bdb_INC, header $db_hdr, library $db_lib])
|
||||
DB_CPPFLAGS="-I$ax_path_bdb_INC"
|
||||
DB_LDFLAGS="-L$ax_path_bdb_LIB"
|
||||
CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
|
||||
LDFLAGS="$ax_path_bdb_save_LDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([header $db_hdr, library $db_lib])
|
||||
DB_LDFLAGS=""
|
||||
DB_CPPFLAGS=""
|
||||
fi
|
||||
DB_HEADER="$db_hdr"
|
||||
DB_LIBS="$db_lib"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
LIBS="$old_LIBS"
|
||||
|
||||
if test -z $DB_HEADER ; then
|
||||
AC_MSG_RESULT([not found])
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DB_HEADER, ["$DB_HEADER"], [Berkeley DB Header])
|
||||
AC_SUBST(DB_LIBS)
|
||||
AC_SUBST(DB_CPPFLAGS)
|
||||
AC_SUBST(DB_LDFLAGS)
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
])
|
404
autotools/ccdv.c
404
autotools/ccdv.c
|
@ -1,404 +0,0 @@
|
|||
/* ccdv.c
|
||||
*
|
||||
* Copyright (C) 2002-2008, by Mike Gleason, NcFTP Software.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Licensed under the GNU Public License.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define SETCOLOR_SUCCESS (gANSIEscapes ? "\033\1331;32m" : "")
|
||||
#define SETCOLOR_FAILURE (gANSIEscapes ? "\033\1331;31m" : "")
|
||||
#define SETCOLOR_WARNING (gANSIEscapes ? "\033\1331;33m" : "")
|
||||
#define SETCOLOR_NORMAL (gANSIEscapes ? "\033\1330;39m" : "")
|
||||
|
||||
#define TEXT_BLOCK_SIZE 8192
|
||||
#define INDENT 2
|
||||
|
||||
#define TERMS "vt100:vt102:vt220:vt320:xterm:xterm-color:ansi:linux:scoterm:scoansi:dtterm:cons25:cygwin"
|
||||
|
||||
size_t gNBufUsed = 0, gNBufAllocated = 0;
|
||||
char *gBuf = NULL;
|
||||
int gCCPID;
|
||||
char gAction[64] = "";
|
||||
char gTarget[64] = "";
|
||||
char gAr[32] = "";
|
||||
char gArLibraryTarget[64] = "";
|
||||
int gDumpCmdArgs = 0;
|
||||
char gArgsStr[800];
|
||||
int gColumns = 80;
|
||||
int gANSIEscapes = 0;
|
||||
int gExitStatus = 95;
|
||||
|
||||
static void
|
||||
DumpFormattedOutput(void)
|
||||
{
|
||||
char *cp;
|
||||
char spaces[8 + 1] = " ";
|
||||
char *saved;
|
||||
int curcol;
|
||||
int i;
|
||||
|
||||
curcol = 0;
|
||||
saved = NULL;
|
||||
for (cp = gBuf + ((gDumpCmdArgs == 0) ? strlen(gArgsStr) : 0); ; cp++) {
|
||||
if (*cp == '\0') {
|
||||
if (saved != NULL) {
|
||||
cp = saved;
|
||||
saved = NULL;
|
||||
} else break;
|
||||
}
|
||||
if (*cp == '\r')
|
||||
continue;
|
||||
if (*cp == '\t') {
|
||||
saved = cp + 1;
|
||||
cp = spaces + 8 - (8 - ((curcol - INDENT - 1) % 8));
|
||||
}
|
||||
if (curcol == 0) {
|
||||
for (i = INDENT; --i >= 0; )
|
||||
putchar(' ');
|
||||
curcol = INDENT;
|
||||
}
|
||||
putchar(*cp);
|
||||
if (++curcol == (gColumns - 1)) {
|
||||
putchar('\n');
|
||||
curcol = 0;
|
||||
} else if (*cp == '\n')
|
||||
curcol = 0;
|
||||
}
|
||||
free(gBuf);
|
||||
} /* DumpFormattedOutput */
|
||||
|
||||
|
||||
|
||||
/* Difftime(), only for timeval structures. */
|
||||
static void TimeValSubtract(struct timeval *tdiff, struct timeval *t1, struct timeval *t0)
|
||||
{
|
||||
tdiff->tv_sec = t1->tv_sec - t0->tv_sec;
|
||||
tdiff->tv_usec = t1->tv_usec - t0->tv_usec;
|
||||
if (tdiff->tv_usec < 0) {
|
||||
tdiff->tv_sec--;
|
||||
tdiff->tv_usec += 1000000;
|
||||
}
|
||||
} /* TimeValSubtract */
|
||||
|
||||
|
||||
|
||||
static void
|
||||
Wait(void)
|
||||
{
|
||||
int pid2, status;
|
||||
|
||||
do {
|
||||
status = 0;
|
||||
pid2 = (int) waitpid(gCCPID, &status, 0);
|
||||
} while (((pid2 >= 0) && (! WIFEXITED(status))) || ((pid2 < 0) && (errno == EINTR)));
|
||||
if (WIFEXITED(status))
|
||||
gExitStatus = WEXITSTATUS(status);
|
||||
} /* Wait */
|
||||
|
||||
|
||||
|
||||
static int
|
||||
SlurpProgress(int fd)
|
||||
{
|
||||
char s1[71];
|
||||
char *newbuf;
|
||||
int nready;
|
||||
size_t ntoread;
|
||||
ssize_t nread;
|
||||
struct timeval now, tnext, tleft;
|
||||
fd_set ss;
|
||||
fd_set ss2;
|
||||
const char *trail = "/-\\|", *trailcp;
|
||||
|
||||
trailcp = trail;
|
||||
snprintf(s1, sizeof(s1), "%s%s%s... ", gAction, gTarget[0] ? " " : "", gTarget);
|
||||
printf("\r%-70s%-9s", s1, "");
|
||||
fflush(stdout);
|
||||
|
||||
gettimeofday(&now, NULL);
|
||||
tnext = now;
|
||||
tnext.tv_sec++;
|
||||
tleft.tv_sec = 0;
|
||||
tleft.tv_usec = 500;
|
||||
FD_ZERO(&ss2);
|
||||
FD_SET(fd, &ss2);
|
||||
for(;;) {
|
||||
if (gNBufUsed == (gNBufAllocated - 1)) {
|
||||
if ((newbuf = (char *) realloc(gBuf, gNBufAllocated + TEXT_BLOCK_SIZE)) == NULL) {
|
||||
perror("ccdv: realloc");
|
||||
return (-1);
|
||||
}
|
||||
gNBufAllocated += TEXT_BLOCK_SIZE;
|
||||
gBuf = newbuf;
|
||||
}
|
||||
for (;;) {
|
||||
ss = ss2;
|
||||
nready = select(fd + 1, &ss, NULL, NULL, &tleft);
|
||||
if (nready == 1)
|
||||
break;
|
||||
if (nready < 0) {
|
||||
if (errno != EINTR) {
|
||||
perror("ccdv: select");
|
||||
return (-1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
gettimeofday(&now, NULL);
|
||||
if ((now.tv_sec > tnext.tv_sec) || ((now.tv_sec == tnext.tv_sec) && (now.tv_usec >= tnext.tv_usec))) {
|
||||
tnext = now;
|
||||
tnext.tv_sec++;
|
||||
tleft.tv_sec = 0;
|
||||
tleft.tv_usec = 500;
|
||||
printf("\r%-71s%c%-7s", s1, *trailcp, "");
|
||||
fflush(stdout);
|
||||
if (*++trailcp == '\0')
|
||||
trailcp = trail;
|
||||
} else {
|
||||
TimeValSubtract(&tleft, &tnext, &now);
|
||||
}
|
||||
}
|
||||
ntoread = (gNBufAllocated - gNBufUsed - 1);
|
||||
nread = read(fd, gBuf + gNBufUsed, ntoread);
|
||||
if (nread < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
perror("ccdv: read");
|
||||
return (-1);
|
||||
} else if (nread == 0) {
|
||||
break;
|
||||
}
|
||||
gNBufUsed += nread;
|
||||
gBuf[gNBufUsed] = '\0';
|
||||
}
|
||||
snprintf(s1, sizeof(s1), "%s%s%s: ", gAction, gTarget[0] ? " " : "", gTarget);
|
||||
Wait();
|
||||
if (gExitStatus == 0) {
|
||||
printf("\r%-70s", s1);
|
||||
printf("[%s%s%s]", ((gNBufUsed - strlen(gArgsStr)) < 4) ? SETCOLOR_SUCCESS : SETCOLOR_WARNING, "OK", SETCOLOR_NORMAL);
|
||||
printf("%-5s\n", " ");
|
||||
} else {
|
||||
printf("\r%-70s", s1);
|
||||
printf("[%s%s%s]", SETCOLOR_FAILURE, "ERROR", SETCOLOR_NORMAL);
|
||||
printf("%-2s\n", " ");
|
||||
gDumpCmdArgs = 1; /* print cmd when there are errors */
|
||||
}
|
||||
fflush(stdout);
|
||||
return (0);
|
||||
} /* SlurpProgress */
|
||||
|
||||
|
||||
|
||||
static int
|
||||
SlurpAll(int fd)
|
||||
{
|
||||
char *newbuf;
|
||||
size_t ntoread;
|
||||
ssize_t nread;
|
||||
|
||||
printf("%s%s%s.\n", gAction, gTarget[0] ? " " : "", gTarget);
|
||||
fflush(stdout);
|
||||
|
||||
for(;;) {
|
||||
if (gNBufUsed == (gNBufAllocated - 1)) {
|
||||
if ((newbuf = (char *) realloc(gBuf, gNBufAllocated + TEXT_BLOCK_SIZE)) == NULL) {
|
||||
perror("ccdv: realloc");
|
||||
return (-1);
|
||||
}
|
||||
gNBufAllocated += TEXT_BLOCK_SIZE;
|
||||
gBuf = newbuf;
|
||||
}
|
||||
ntoread = (gNBufAllocated - gNBufUsed - 1);
|
||||
nread = read(fd, gBuf + gNBufUsed, ntoread);
|
||||
if (nread < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
perror("ccdv: read");
|
||||
return (-1);
|
||||
} else if (nread == 0) {
|
||||
break;
|
||||
}
|
||||
gNBufUsed += nread;
|
||||
gBuf[gNBufUsed] = '\0';
|
||||
}
|
||||
Wait();
|
||||
gDumpCmdArgs = (gExitStatus != 0); /* print cmd when there are errors */
|
||||
return (0);
|
||||
} /* SlurpAll */
|
||||
|
||||
|
||||
|
||||
static const char *
|
||||
Basename(const char *path)
|
||||
{
|
||||
const char *cp;
|
||||
cp = strrchr(path, '/');
|
||||
if (cp == NULL)
|
||||
return (path);
|
||||
return (cp + 1);
|
||||
} /* Basename */
|
||||
|
||||
|
||||
|
||||
static const char *
|
||||
Extension(const char *path)
|
||||
{
|
||||
const char *cp = path;
|
||||
cp = strrchr(path, '.');
|
||||
if (cp == NULL)
|
||||
return ("");
|
||||
return (cp);
|
||||
} /* Extension */
|
||||
|
||||
|
||||
|
||||
static void
|
||||
Usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: ccdv /path/to/cc CFLAGS...\n\n");
|
||||
fprintf(stderr, "I wrote this to reduce the deluge Make output to make finding actual problems\n");
|
||||
fprintf(stderr, "easier. It is intended to be invoked from Makefiles, like this. Instead of:\n\n");
|
||||
fprintf(stderr, "\t.c.o:\n");
|
||||
fprintf(stderr, "\t\t$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $< -c\n");
|
||||
fprintf(stderr, "\nRewrite your rule so it looks like:\n\n");
|
||||
fprintf(stderr, "\t.c.o:\n");
|
||||
fprintf(stderr, "\t\t@ccdv $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $< -c\n\n");
|
||||
fprintf(stderr, "ccdv 1.1.0 is Free under the GNU Public License. Enjoy!\n");
|
||||
fprintf(stderr, " -- Mike Gleason, NcFTP Software <http://www.ncftp.com>\n");
|
||||
exit(96);
|
||||
} /* Usage */
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int pipe1[2];
|
||||
int devnull;
|
||||
char emerg[256];
|
||||
int fd;
|
||||
int nread;
|
||||
int i;
|
||||
int cc = 0, pch = 0, inst = 0;
|
||||
const char *quote;
|
||||
|
||||
if (argc < 2)
|
||||
Usage();
|
||||
|
||||
snprintf(gAction, sizeof(gAction), "Running %s", Basename(argv[1]));
|
||||
memset(gArgsStr, 0, sizeof(gArgsStr));
|
||||
for (i = 1; i < argc; i++) {
|
||||
quote = (strchr(argv[i], ' ') != NULL) ? "\"" : "";
|
||||
snprintf(gArgsStr + strlen(gArgsStr), sizeof(gArgsStr) - strlen(gArgsStr), "%s%s%s%s%s", (i == 1) ? "" : " ", quote, argv[i], quote, (i == (argc - 1)) ? "\n" : "");
|
||||
if ((strcmp(argv[i], "-o") == 0) && ((i + 1) < argc)) {
|
||||
if (strcasecmp(Extension(argv[i + 1]), ".o") != 0) {
|
||||
strcpy(gAction, "Linking");
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[i + 1]));
|
||||
continue;
|
||||
}
|
||||
} else if (strncasecmp(Basename(argv[i]), "install", 7) == 0) {
|
||||
inst++;
|
||||
} else if (strchr("-+/", (int) argv[i][0]) != NULL) {
|
||||
continue;
|
||||
} else if ((strncasecmp(Extension(argv[i]), ".c", 2) == 0)) {
|
||||
if (inst == 0) cc++;
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[i]));
|
||||
} else if ((strncasecmp(Extension(argv[i]), ".h", 2) == 0) && (cc == 0)) {
|
||||
if (inst == 0) pch++;
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[i]));
|
||||
} else if ((i == 1) && (strcmp(Basename(argv[i]), "ar") == 0)) {
|
||||
snprintf(gAr, sizeof(gAr), "%s", Basename(argv[i]));
|
||||
} else if ((gArLibraryTarget[0] == '\0') && (strcasecmp(Extension(argv[i]), ".a") == 0)) {
|
||||
snprintf(gArLibraryTarget, sizeof(gArLibraryTarget), "%s", Basename(argv[i]));
|
||||
} else if ((strcasecmp(Extension(argv[i]), ".la") == 0) && (gTarget[0] == '\0')) {
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[i]));
|
||||
} else if ((strcasecmp(Extension(argv[i]), ".so") == 0) && (gTarget[0] == '\0')) {
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[i]));
|
||||
}
|
||||
}
|
||||
if ((gAr[0] != '\0') && (gArLibraryTarget[0] != '\0')) {
|
||||
strcpy(gAction, "Creating library");
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", gArLibraryTarget);
|
||||
} else if (pch > 0) {
|
||||
strcpy(gAction, "Precompiling");
|
||||
} else if (cc > 0) {
|
||||
strcpy(gAction, "Compiling");
|
||||
} else if (inst > 0) {
|
||||
strcpy(gAction, "Installing");
|
||||
}
|
||||
if ((inst > 0) && (gTarget[0] == '\0')) {
|
||||
snprintf(gTarget, sizeof(gTarget), "%s", Basename(argv[argc-1]));
|
||||
}
|
||||
|
||||
if (pipe(pipe1) < 0) {
|
||||
perror("ccdv: pipe");
|
||||
exit(97);
|
||||
}
|
||||
(void) close(0);
|
||||
devnull = open("/dev/null", O_RDWR, 00666);
|
||||
if ((devnull != 0) && (dup2(devnull, 0) == 0))
|
||||
close(devnull);
|
||||
|
||||
gCCPID = (int) fork();
|
||||
if (gCCPID < 0) {
|
||||
(void) close(pipe1[0]);
|
||||
(void) close(pipe1[1]);
|
||||
perror("ccdv: fork");
|
||||
exit(98);
|
||||
} else if (gCCPID == 0) {
|
||||
/* Child */
|
||||
(void) close(pipe1[0]); /* close read end */
|
||||
if (pipe1[1] != 1) { /* use write end on stdout */
|
||||
(void) dup2(pipe1[1], 1);
|
||||
(void) close(pipe1[1]);
|
||||
}
|
||||
(void) dup2(1, 2); /* use write end on stderr */
|
||||
execvp(argv[1], argv + 1);
|
||||
perror(argv[1]);
|
||||
exit(99);
|
||||
}
|
||||
|
||||
/* parent */
|
||||
(void) close(pipe1[1]); /* close write end */
|
||||
fd = pipe1[0]; /* use read end */
|
||||
|
||||
gColumns = (getenv("COLUMNS") != NULL) ? atoi(getenv("COLUMNS")) : 80;
|
||||
gANSIEscapes = (getenv("TERM") != NULL) && (strstr(TERMS, getenv("TERM")) != NULL);
|
||||
gBuf = (char *) malloc(TEXT_BLOCK_SIZE);
|
||||
if (gBuf == NULL)
|
||||
goto panic;
|
||||
gNBufUsed = 0;
|
||||
gNBufAllocated = TEXT_BLOCK_SIZE;
|
||||
if (strlen(gArgsStr) < (gNBufAllocated - 1)) {
|
||||
strcpy(gBuf, gArgsStr);
|
||||
gNBufUsed = strlen(gArgsStr);
|
||||
}
|
||||
|
||||
if (isatty(1)) {
|
||||
if (SlurpProgress(fd) < 0)
|
||||
goto panic;
|
||||
} else {
|
||||
if (SlurpAll(fd) < 0)
|
||||
goto panic;
|
||||
}
|
||||
DumpFormattedOutput();
|
||||
exit(gExitStatus);
|
||||
|
||||
panic:
|
||||
gDumpCmdArgs = 1; /* print cmd when there are errors */
|
||||
DumpFormattedOutput();
|
||||
while ((nread = read(fd, emerg, (size_t) sizeof(emerg))) > 0)
|
||||
(void) write(2, emerg, (size_t) nread);
|
||||
Wait();
|
||||
exit(gExitStatus);
|
||||
} /* main */
|
||||
/* eof ccdv.c */
|
|
@ -1,142 +0,0 @@
|
|||
AC_DEFUN([wi_ARG_DISABLE_CCDV], [
|
||||
AC_ARG_ENABLE(ccdv,[ --disable-ccdv disable use of ccdv program in Makefiles],use_ccdv="$enableval",use_ccdv=yes)
|
||||
])
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
|
||||
AC_DEFUN([wi_PATH_PWD], [
|
||||
AC_PATH_PROG(wi_PWD, "pwd", "pwd")
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([wi_RESOLVE_PATH], [
|
||||
AC_REQUIRE([wi_PATH_PWD])
|
||||
wi_path="$1"
|
||||
if test -d "$wi_path" ; then
|
||||
wi_resolved_path=`cd "$wi_path" ; $wi_PWD 2>/dev/null`
|
||||
elif test ! -f "$wi_path" ; then
|
||||
wi_resolved_path="$wi_path"
|
||||
else
|
||||
wi_parent_dir="$wi_path"
|
||||
wi_file_name="$wi_path"
|
||||
wi_DIRNAME(wi_parent_dir)
|
||||
wi_BASENAME(wi_file_name)
|
||||
wi_resolved_path=`cd "$wi_parent_dir" ; $wi_PWD 2>/dev/null`
|
||||
if test "x$wi_resolved_path" != x ; then
|
||||
wi_resolved_path="$wi_resolved_path/$wi_file_name"
|
||||
fi
|
||||
unset wi_parent_dir wi_file_name
|
||||
fi
|
||||
if test "x$wi_resolved_path" = x ; then
|
||||
$2="[$]$1"
|
||||
else
|
||||
$2="$wi_resolved_path"
|
||||
fi
|
||||
unset wi_resolved_path wi_path
|
||||
])
|
||||
dnl
|
||||
|
||||
AC_DEFUN([wi_PROG_CCDV_NO_CREATE], [
|
||||
if test "x$use_ccdv" = "xno" ; then
|
||||
AC_MSG_CHECKING([for ccdv])
|
||||
AC_MSG_RESULT([(disabled)])
|
||||
else
|
||||
AC_PATH_PROG(CCDV, "CCDV", "")
|
||||
CCDV="$wi_cv_path_ccdv"
|
||||
if test "x$CCDV" != x ; then
|
||||
CC="$CCDV $CC" # trailing space needed
|
||||
fi
|
||||
AC_SUBST(CC)
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
AC_DEFUN([wi_PROG_CCDV], [
|
||||
if test "x$use_ccdv" = "xno" ; then
|
||||
AC_MSG_CHECKING([for ccdv])
|
||||
AC_MSG_RESULT([(disabled)])
|
||||
else
|
||||
unset wi_cv_path_ccdv # can't use cache if it was a temp prog last time
|
||||
wi_used_cache_path_ccdv="yes"
|
||||
AC_CACHE_CHECK([for ccdv], [wi_cv_path_ccdv], [
|
||||
wi_used_cache_path_ccdv="no"
|
||||
for CCDV in /usr/bin/ccdv /usr/local/bin/ccdv /usr/ccs/bin/ccdv NONE
|
||||
do
|
||||
if test "$CCDV" = NONE ; then CCDV="" ; break ; fi
|
||||
$CCDV >/dev/null 2>&1
|
||||
if test $? -eq 96 ; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "x$CCDV" = "x" ; then
|
||||
${CC-cc} $DEFS $CPPFLAGS $CFLAGS "autotools/ccdv.c" -o "ccdv" >/dev/null 2>&1
|
||||
strip ./ccdv >/dev/null 2>&1
|
||||
./ccdv >/dev/null 2>&1
|
||||
if test $? -eq 96 ; then
|
||||
CCDV="./ccdv"
|
||||
USECCDV="#"
|
||||
else
|
||||
/bin/rm -f ccdv
|
||||
USECCDV=""
|
||||
fi
|
||||
fi
|
||||
if test "x$CCDV" != x ; then
|
||||
wi_RESOLVE_PATH([$CCDV], [CCDV])
|
||||
wi_cv_path_ccdv="$CCDV"
|
||||
CC="$CCDV $CC" # trailing space needed
|
||||
USECCDV="#"
|
||||
AC_MSG_RESULT($CCDV)
|
||||
else
|
||||
wi_cv_path_ccdv=""
|
||||
USECCDV=""
|
||||
AC_MSG_RESULT("Not Found")
|
||||
fi
|
||||
])
|
||||
if test "$wi_used_cache_path_ccdv" = yes ; then
|
||||
CCDV="$wi_cv_path_ccdv"
|
||||
if test "x$CCDV" != x ; then
|
||||
CC="$CCDV $CC" # trailing space needed
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CC)
|
||||
AC_SUBST(USECCDV)
|
||||
fi
|
||||
])
|
||||
AC_DEFUN([wi_DIRNAME], [
|
||||
changequote({{, }})dnl
|
||||
$1=`echo "{{$}}$1" | sed -n '
|
||||
s-//*-/-g
|
||||
s-/*$--
|
||||
/^\/\/*[^/]*$/{
|
||||
c\\
|
||||
/
|
||||
p
|
||||
q
|
||||
}
|
||||
/^[^/]*$/{
|
||||
c\\
|
||||
.
|
||||
p
|
||||
q
|
||||
}
|
||||
/./{
|
||||
s-/[^/]*$--
|
||||
p
|
||||
q
|
||||
}'`dnl
|
||||
changequote([, ])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([wi_BASENAME], [
|
||||
$1=`echo "[$]$1" | sed -n '
|
||||
s-//*-/-g
|
||||
s-/*$--
|
||||
s-^/$--
|
||||
s-^.*/--
|
||||
p
|
||||
q'`dnl
|
||||
])
|
|
@ -1,99 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# compile PROGRAM [ARGS]...
|
||||
# `-o FOO.o' is removed from the args passed to the actual compile.
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
args=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we do something ugly here.
|
||||
ofile=$2
|
||||
shift
|
||||
case "$ofile" in
|
||||
*.o | *.obj)
|
||||
;;
|
||||
*)
|
||||
args="$args -o $ofile"
|
||||
ofile=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
args="$args $1"
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$prog" $args
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir $lockdir > /dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir $lockdir; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$prog" $args
|
||||
status=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir $lockdir
|
||||
exit $status
|
1471
autotools/config.guess
vendored
1471
autotools/config.guess
vendored
File diff suppressed because it is too large
Load diff
1599
autotools/config.sub
vendored
1599
autotools/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,479 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -1,294 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
|
@ -1,236 +0,0 @@
|
|||
AC_DEFUN([CHK_LIBEVNT], [
|
||||
dnl Check for optional stuff
|
||||
AC_ARG_WITH(rtsig,
|
||||
AC_HELP_STRING([--with-rtsig], [compile with support for real time signals (experimental)]),
|
||||
[usertsig=yes], [usertsig=no])
|
||||
|
||||
dnl Checks for header files.
|
||||
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
|
||||
AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
|
||||
AC_EGREP_CPP(yes,
|
||||
[
|
||||
#include <sys/queue.h>
|
||||
#ifdef TAILQ_FOREACH
|
||||
yes
|
||||
#endif
|
||||
], [AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_TAILQFOREACH, 1,
|
||||
[Define if TAILQ_FOREACH is defined in <sys/queue.h>])],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_header_sys_time_h" = "xyes"; then
|
||||
AC_MSG_CHECKING(for timeradd in sys/time.h)
|
||||
AC_EGREP_CPP(yes,
|
||||
[
|
||||
#include <sys/time.h>
|
||||
#ifdef timeradd
|
||||
yes
|
||||
#endif
|
||||
], [ AC_DEFINE(HAVE_TIMERADD, 1,
|
||||
[Define if timeradd is defined in <sys/time.h>])
|
||||
AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
|
||||
)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for F_SETFD in fcntl.h)
|
||||
AC_EGREP_CPP(yes,
|
||||
[
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
#ifdef F_SETFD
|
||||
yes
|
||||
#endif
|
||||
], [ AC_DEFINE(HAVE_SETFD, 1,
|
||||
[Define if F_SETFD is defined in <fcntl.h>])
|
||||
AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))
|
||||
|
||||
needsignal=no
|
||||
haveselect=no
|
||||
AC_CHECK_FUNCS(select, [haveselect=yes], )
|
||||
if test "x$haveselect" = "xyes" ; then
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS select.c"
|
||||
needsignal=yes
|
||||
fi
|
||||
|
||||
havepoll=no
|
||||
havertsig=no
|
||||
AC_CHECK_FUNCS(poll, [havepoll=yes], )
|
||||
if test "x$havepoll" = "xyes" ; then
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS poll.c"
|
||||
needsignal=yes
|
||||
|
||||
if test "x$usertsig" = "xyes" ; then
|
||||
AC_CHECK_FUNCS(sigtimedwait, [havertsig=yes], )
|
||||
fi
|
||||
fi
|
||||
if test "x$havertsig" = "xyes" ; then
|
||||
AC_MSG_CHECKING(for F_SETSIG in fcntl.h)
|
||||
AC_EGREP_CPP(yes,
|
||||
[
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
#ifdef F_SETSIG
|
||||
yes
|
||||
#endif
|
||||
], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); havertsig=no])
|
||||
fi
|
||||
if test "x$havertsig" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_RTSIG, 1, [Define if your system supports POSIX realtime signals])
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS rtsig.c"
|
||||
AC_MSG_CHECKING(for working rtsig on pipes)
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int sigio()
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int fd[2];
|
||||
|
||||
pipe(fd);
|
||||
signal(SIGIO, sigio);
|
||||
fcntl(fd[0], F_SETOWN, getpid());
|
||||
fcntl(fd[0], F_SETSIG, SIGIO);
|
||||
fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL) | O_ASYNC);
|
||||
write(fd[1], "", 1);
|
||||
return 1;
|
||||
}
|
||||
], [ AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_WORKING_RTSIG, 1, [Define if realtime signals work on pipes])],
|
||||
AC_MSG_RESULT(no))
|
||||
fi
|
||||
|
||||
haveepoll=no
|
||||
AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
|
||||
if test "x$haveepoll" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_EPOLL, 1,
|
||||
[Define if your system supports the epoll system calls])
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS epoll.c"
|
||||
needsignal=yes
|
||||
fi
|
||||
|
||||
havedevpoll=no
|
||||
if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
|
||||
AC_DEFINE(HAVE_DEVPOLL, 1,
|
||||
[Define if /dev/poll is available])
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS devpoll.c"
|
||||
fi
|
||||
|
||||
havekqueue=no
|
||||
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
|
||||
AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
|
||||
if test "x$havekqueue" = "xyes" ; then
|
||||
AC_MSG_CHECKING(for working kqueue)
|
||||
AC_TRY_RUN(
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/event.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int kq;
|
||||
int n;
|
||||
int fd[[2]];
|
||||
struct kevent ev;
|
||||
struct timespec ts;
|
||||
char buf[[8000]];
|
||||
|
||||
if (pipe(fd) == -1)
|
||||
exit(1);
|
||||
if (fcntl(fd[[1]], F_SETFL, O_NONBLOCK) == -1)
|
||||
exit(1);
|
||||
|
||||
while ((n = write(fd[[1]], buf, sizeof(buf))) == sizeof(buf))
|
||||
;
|
||||
|
||||
if ((kq = kqueue()) == -1)
|
||||
exit(1);
|
||||
|
||||
ev.ident = fd[[1]];
|
||||
ev.filter = EVFILT_WRITE;
|
||||
ev.flags = EV_ADD | EV_ENABLE;
|
||||
n = kevent(kq, &ev, 1, NULL, 0, NULL);
|
||||
if (n == -1)
|
||||
exit(1);
|
||||
|
||||
read(fd[[0]], buf, sizeof(buf));
|
||||
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 0;
|
||||
n = kevent(kq, NULL, 0, &ev, 1, &ts);
|
||||
if (n == -1 || n == 0)
|
||||
exit(1);
|
||||
|
||||
exit(0);
|
||||
}, [AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
|
||||
[Define if kqueue works correctly with pipes])
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS kqueue.c"],
|
||||
AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||
fi
|
||||
fi
|
||||
|
||||
haveepollsyscall=no
|
||||
if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
|
||||
if test "x$haveepoll" = "xno" ; then
|
||||
AC_MSG_CHECKING(for epoll system call)
|
||||
AC_TRY_RUN(
|
||||
#include <stdint.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
epoll_create(int size)
|
||||
{
|
||||
return (syscall(__NR_epoll_create, size));
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int epfd;
|
||||
|
||||
epfd = epoll_create(256);
|
||||
exit (epfd == -1 ? 1 : 0);
|
||||
}, [AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_EPOLL, 1,
|
||||
[Define if your system supports the epoll system calls])
|
||||
needsignal=yes
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS epoll_sub.c epoll.c"],
|
||||
AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$needsignal" = "xyes" ; then
|
||||
EVNTLIBOBJS="$EVNTLIBOBJS signal.c"
|
||||
fi
|
||||
|
||||
AC_REPLACE_FUNCS(err)
|
||||
|
||||
AC_MSG_CHECKING([for socklen_t])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[socklen_t x;],
|
||||
AC_MSG_RESULT([yes]),
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_DEFINE(socklen_t, unsigned int,
|
||||
[Define to unsigned int if you dont have it])]
|
||||
)
|
||||
])
|
6863
autotools/ltmain.sh
6863
autotools/ltmain.sh
File diff suppressed because it is too large
Load diff
|
@ -1,336 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -1,111 +0,0 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
|
@ -1,150 +0,0 @@
|
|||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
.c.o:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
|
||||
.c.lo:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
@list='ls .libs/*.so'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_dataDATA: $(dist_data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
$(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-neoSCRIPTS: $(neo_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(neodir)" || $(mkdir_p) "$(DESTDIR)$(neodir)"
|
||||
@list='$(neo_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(neoSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(neodir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
pkglibdir = $(prefix)/modules
|
||||
datadir = $(prefix)/data
|
||||
docdir = $(prefix)/doc
|
||||
|
||||
distdir = @DISTDIRVERSION@
|
||||
distcleancheck:
|
||||
@:
|
||||
distuninstallcheck:
|
||||
@:
|
1046
autotools/shtool
1046
autotools/shtool
File diff suppressed because it is too large
Load diff
223
autotools/ylwrap
223
autotools/ylwrap
|
@ -1,223 +0,0 @@
|
|||
#! /bin/sh
|
||||
# ylwrap - wrapper for lex/yacc invocations.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case "$1" in
|
||||
'')
|
||||
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
--basedir)
|
||||
basedir=$2
|
||||
shift 2
|
||||
;;
|
||||
-h|--h*)
|
||||
cat <<\EOF
|
||||
Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
|
||||
|
||||
Wrapper for lex/yacc invocations, renaming files as desired.
|
||||
|
||||
INPUT is the input file
|
||||
OUTPUT is one file PROG generates
|
||||
DESIRED is the file we actually want instead of OUTPUT
|
||||
PROGRAM is program to run
|
||||
ARGS are passed to PROG
|
||||
|
||||
Any number of OUTPUT,DESIRED pairs may be used.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v|--v*)
|
||||
echo "ylwrap $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# The input.
|
||||
input="$1"
|
||||
shift
|
||||
case "$input" in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
# Absolute path; do nothing.
|
||||
;;
|
||||
*)
|
||||
# Relative path. Make it absolute.
|
||||
input="`pwd`/$input"
|
||||
;;
|
||||
esac
|
||||
|
||||
pairlist=
|
||||
while test "$#" -ne 0; do
|
||||
if test "$1" = "--"; then
|
||||
shift
|
||||
break
|
||||
fi
|
||||
pairlist="$pairlist $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# The program to run.
|
||||
prog="$1"
|
||||
shift
|
||||
# Make any relative path in $prog absolute.
|
||||
case "$prog" in
|
||||
[\\/]* | ?:[\\/]*) ;;
|
||||
*[\\/]*) prog="`pwd`/$prog" ;;
|
||||
esac
|
||||
|
||||
# FIXME: add hostname here for parallel makes that run commands on
|
||||
# other machines. But that might take us over the 14-char limit.
|
||||
dirname=ylwrap$$
|
||||
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
|
||||
mkdir $dirname || exit 1
|
||||
|
||||
cd $dirname
|
||||
|
||||
case $# in
|
||||
0) $prog "$input" ;;
|
||||
*) $prog "$@" "$input" ;;
|
||||
esac
|
||||
ret=$?
|
||||
|
||||
if test $ret -eq 0; then
|
||||
set X $pairlist
|
||||
shift
|
||||
first=yes
|
||||
# Since DOS filename conventions don't allow two dots,
|
||||
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
|
||||
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
|
||||
y_tab_nodot="no"
|
||||
if test -f y_tab.c || test -f y_tab.h; then
|
||||
y_tab_nodot="yes"
|
||||
fi
|
||||
|
||||
# The directory holding the input.
|
||||
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
|
||||
# Quote $INPUT_DIR so we can use it in a regexp.
|
||||
# FIXME: really we should care about more than `.' and `\'.
|
||||
input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
|
||||
|
||||
while test "$#" -ne 0; do
|
||||
from="$1"
|
||||
# Handle y_tab.c and y_tab.h output by DOS
|
||||
if test $y_tab_nodot = "yes"; then
|
||||
if test $from = "y.tab.c"; then
|
||||
from="y_tab.c"
|
||||
else
|
||||
if test $from = "y.tab.h"; then
|
||||
from="y_tab.h"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test -f "$from"; then
|
||||
# If $2 is an absolute path name, then just use that,
|
||||
# otherwise prepend `../'.
|
||||
case "$2" in
|
||||
[\\/]* | ?:[\\/]*) target="$2";;
|
||||
*) target="../$2";;
|
||||
esac
|
||||
|
||||
# We do not want to overwrite a header file if it hasn't
|
||||
# changed. This avoid useless recompilations. However the
|
||||
# parser itself (the first file) should always be updated,
|
||||
# because it is the destination of the .y.c rule in the
|
||||
# Makefile. Divert the output of all other files to a temporary
|
||||
# file so we can compare them to existing versions.
|
||||
if test $first = no; then
|
||||
realtarget="$target"
|
||||
target="tmp-`echo $target | sed s/.*[\\/]//g`"
|
||||
fi
|
||||
# Edit out `#line' or `#' directives.
|
||||
#
|
||||
# We don't want the resulting debug information to point at
|
||||
# an absolute srcdir; it is better for it to just mention the
|
||||
# .y file with no path.
|
||||
#
|
||||
# We want to use the real output file name, not yy.lex.c for
|
||||
# instance.
|
||||
#
|
||||
# We want the include guards to be adjusted too.
|
||||
FROM=`echo "$from" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||
TARGET=`echo "$2" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||
|
||||
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
|
||||
-e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
|
||||
|
||||
# Check whether header files must be updated.
|
||||
if test $first = no; then
|
||||
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
|
||||
echo "$2" is unchanged
|
||||
rm -f "$target"
|
||||
else
|
||||
echo updating "$2"
|
||||
mv -f "$target" "$realtarget"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# A missing file is only an error for the first file. This
|
||||
# is a blatant hack to let us support using "yacc -d". If -d
|
||||
# is not specified, we don't want an error when the header
|
||||
# file is "missing".
|
||||
if test $first = yes; then
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
shift
|
||||
first=no
|
||||
done
|
||||
else
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
# Remove the directory.
|
||||
cd ..
|
||||
rm -rf $dirname
|
||||
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
513
configure.in
513
configure.in
|
@ -1,513 +0,0 @@
|
|||
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT()
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
AC_CONFIG_SRCDIR([src/main.c])
|
||||
AC_CONFIG_HEADER([include/config.h])
|
||||
AC_PREFIX_DEFAULT(~/NeoStats3.0)
|
||||
AC_CACHE_LOAD
|
||||
#Standard Defines for autoconf here
|
||||
x_maj=3
|
||||
x_min='0'
|
||||
x_rev='2'
|
||||
x_package='NeoStats'
|
||||
MODULES="connectserv hostserv statserv ircdauth extauth limitserv textserv quoteserv operlog dccpartyline perltest templateauth template update"
|
||||
#dont edit anything after this line!
|
||||
|
||||
x_version=$x_maj.$x_min.$x_rev
|
||||
AM_INIT_AUTOMAKE($x_package, $x_version)
|
||||
AM_MAINTAINER_MODE
|
||||
AC_DEFINE_UNQUOTED(MAJOR, $x_maj, "Major Version Number")
|
||||
AC_DEFINE_UNQUOTED(MINOR, $x_min, "Minor Version Number")
|
||||
AC_DEFINE_UNQUOTED(REV, $x_rev, "Revision Version Number")
|
||||
AC_DEFINE_UNQUOTED(NEO_VERSION, "$x_version", "Full Version")
|
||||
|
||||
AC_MSG_HEADER([Configuring Core Now])
|
||||
|
||||
AC_LIBTOOL_DLOPEN
|
||||
dnl AC_DISABLE_SHARED
|
||||
dnl AC_LIBTOOL_WIN32_DLL
|
||||
dnl AC_LIBLTDL_CONVENIENCE
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
CARES_CLEAR_LIBTOOL_TAGS
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_YACC
|
||||
AC_PROG_LEX
|
||||
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
|
||||
|
||||
AC_PATH_PROG(unamepath, uname)
|
||||
if test "_$unamepath" = _; then
|
||||
system="unknown"
|
||||
else
|
||||
AC_MSG_CHECKING(system type)
|
||||
system=`$unamepath -s`
|
||||
AC_MSG_RESULT($system)
|
||||
fi
|
||||
|
||||
case "$system" in
|
||||
"Darwin")
|
||||
;;
|
||||
*)
|
||||
CFLAGS="$CFLAGS -g -rdynamic"
|
||||
LDFLAGS="$LDFLAGS -g -rdynamic"
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
||||
|
||||
# Checks for libraries.
|
||||
# AC_LIB_LTDL
|
||||
AC_CHECK_LIB(dl, dlopen)
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
AC_CHECK_LIB(m, log10)
|
||||
AC_REPLACE_FUNCS(getopt)
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(
|
||||
sys/time.h \
|
||||
sys/socket.h \
|
||||
malloc.h \
|
||||
assert.h \
|
||||
ctype.h \
|
||||
errno.h \
|
||||
stddef.h \
|
||||
stdio.h \
|
||||
stdarg.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser.h \
|
||||
net/if.h \
|
||||
netinet/in.h \
|
||||
netdb.h \
|
||||
sys/sockio.h \
|
||||
sys/param.h \
|
||||
sys/resource.h \
|
||||
termios.h \
|
||||
termio.h \
|
||||
sgtty.h \
|
||||
fcntl.h \
|
||||
alloca.h \
|
||||
winsock.h \
|
||||
time.h \
|
||||
io.h \
|
||||
pwd.h \
|
||||
utime.h \
|
||||
limits.h \
|
||||
sys/utime.h \
|
||||
sys/poll.h \
|
||||
setjmp.h \
|
||||
sys/file.h \
|
||||
sys/dir.h \
|
||||
poll.h \
|
||||
signal.h \
|
||||
sys/epoll.h \
|
||||
sys/queue.h \
|
||||
sys/event.h \
|
||||
sys/ioctl.h \
|
||||
sys/devpoll.h,
|
||||
dnl to do if not found
|
||||
[],
|
||||
dnl to do if found
|
||||
[],
|
||||
dnl default includes
|
||||
[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]
|
||||
)
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_PID_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
AC_C_VOLATILE
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
AC_CHECK_TYPE(u_int64_t, unsigned long long)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
AC_CHECK_TYPE(u_int8_t, unsigned char)
|
||||
|
||||
AC_CHECK_TYPE(long long,
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])])
|
||||
|
||||
# check for ssize_t
|
||||
AC_CHECK_TYPE(ssize_t, ,
|
||||
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
|
||||
|
||||
TYPE_SOCKLEN_T
|
||||
TYPE_IN_ADDR_T
|
||||
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_CHECK_FUNCS( socket \
|
||||
select \
|
||||
strdup \
|
||||
strstr \
|
||||
strspn \
|
||||
strsep \
|
||||
strcasestr \
|
||||
strtok_r \
|
||||
uname \
|
||||
strcasecmp \
|
||||
stricmp \
|
||||
strcmpi \
|
||||
gethostbyaddr \
|
||||
gettimeofday \
|
||||
inet_addr \
|
||||
inet_ntoa \
|
||||
inet_aton \
|
||||
inet_pton \
|
||||
inet_ntop \
|
||||
perror \
|
||||
closesocket \
|
||||
siginterrupt \
|
||||
sigaction \
|
||||
signal \
|
||||
getpwuid \
|
||||
geteuid \
|
||||
dlopen \
|
||||
utime \
|
||||
sigsetjmp \
|
||||
memmove \
|
||||
bcopy \
|
||||
strerror \
|
||||
poll \
|
||||
rename \
|
||||
ftruncate \
|
||||
flock \
|
||||
fsync \
|
||||
vasprintf \
|
||||
fcntl,
|
||||
dnl if found
|
||||
[],
|
||||
dnl if not found, $ac_func is the name we check for
|
||||
func="$ac_func"
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_TRY_LINK( [],
|
||||
[ $func ();],
|
||||
AC_MSG_RESULT(yes!)
|
||||
eval "ac_cv_func_$func=yes"
|
||||
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
|
||||
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
|
||||
AC_MSG_RESULT(but still no)
|
||||
)
|
||||
|
||||
)
|
||||
ADNS_C_GCCATTRIB
|
||||
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
# AC_REPLACE_FNMATCH
|
||||
AC_FUNC_FORK
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRTOD
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(strnlen strlcpy strlcat strndup)
|
||||
|
||||
dnl backtrace is used for segv reporting
|
||||
AC_CHECK_FUNC(backtrace,
|
||||
[LIBS="-g $LIBS"],
|
||||
[BLD_LIBEXEC="execinfo"
|
||||
LNK_LIBEXEC="execinfo/libexecinfo.la"
|
||||
CFLAGS="$CFLAGS "'-I$(top_srcdir)/lib/execinfo/'
|
||||
LIBS="-g $LIBS"]
|
||||
)
|
||||
AC_DEFINE(HAVE_BACKTRACE, 1, 'backtrace function available')
|
||||
AC_SUBST([BLD_LIBEXEC])
|
||||
AC_SUBST([LNK_LIBEXEC])
|
||||
|
||||
|
||||
dnl **** Check for underscore on external symbols ****
|
||||
|
||||
AC_CACHE_CHECK(whether external symbols need an underscore prefix,
|
||||
ac_cv_c_extern_prefix,
|
||||
[saved_libs=$LIBS
|
||||
LIBS="conftest_asm.s $LIBS"
|
||||
cat > conftest_asm.s <<EOF
|
||||
.globl _ac_test
|
||||
_ac_test:
|
||||
.long 0
|
||||
EOF
|
||||
AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
|
||||
ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
|
||||
LIBS=$saved_libs])
|
||||
if test "$ac_cv_c_extern_prefix" = "yes"
|
||||
then
|
||||
AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1, "Our Platfrom requires Underscores")
|
||||
fi
|
||||
|
||||
dnl How to copy one va_list to another?
|
||||
AC_CACHE_CHECK([for va_copy], ns_va_copy, [AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);])],
|
||||
[ns_va_copy="yes"],
|
||||
[ns_va_copy="no"]
|
||||
)])
|
||||
if test "$ns_va_copy" = "yes" ; then
|
||||
AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) fi
|
||||
|
||||
AC_CACHE_CHECK([for __va_copy], ns___va_copy, [AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);])],
|
||||
[ns___va_copy="yes"],
|
||||
[ns___va_copy="no"]
|
||||
)])
|
||||
if test "$ns___va_copy" = "yes" ; then
|
||||
AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy]) fi
|
||||
|
||||
|
||||
dnl Set NEO_PREFIX in config.h.
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(NEO_PREFIX, "${ac_default_prefix}", "Installation Prefix")
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(NEO_PREFIX, "${prefix}", "Installation Prefix")
|
||||
fi
|
||||
|
||||
|
||||
|
||||
AX_PATH_LIB_PCRE
|
||||
AX_PATH_LIB_CURL
|
||||
|
||||
|
||||
|
||||
AC_ARG_ENABLE(perl,
|
||||
[ --disable-perl don't build the perl plugin],
|
||||
perl=$enableval, perl=yes)
|
||||
|
||||
if test "$perl" = yes; then
|
||||
AC_MSG_HEADER([Configuring for Perl Modules Now])
|
||||
AC_PATH_PROG(sedpath, sed)
|
||||
if test "_$sedpath" = _; then
|
||||
AC_MSG_ERROR("Cannot find sed: I need it\!")
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(perlpath, perl)
|
||||
|
||||
AC_MSG_CHECKING(for Perl compile flags)
|
||||
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
|
||||
dnl PERL_CFLAGS=`echo $PERL_CFLAGS |$sedpath 's/-Wdeclaration-after-statement //'`
|
||||
if test "_$PERL_CFLAGS" = _ ; then
|
||||
AC_MSG_RESULT([not found, building without perl.])
|
||||
perl=no
|
||||
else
|
||||
AC_MSG_RESULT(ok)
|
||||
AC_MSG_CHECKING([Checking for perl includes directory])
|
||||
PERL_INCLUDES=`$perlpath -MExtUtils::Embed -e perl_inc 2>/dev/null`
|
||||
AC_MSG_RESULT($PERL_INCLUDES)
|
||||
CFLAGS="$CFLAGS "$PERL_INCLUDES
|
||||
PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
|
||||
if test "$system" = "Linux"; then
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
|
||||
fi
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
|
||||
|
||||
AC_MSG_CHECKING(for $perlpath >= 5.8.0)
|
||||
PERL_VER=`$perlpath -e 'print $]>= 5.008?"yes":"no"'`
|
||||
|
||||
if test "$PERL_VER" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
perl=no
|
||||
dnl AC_MSG_CHECKING([Checking for perl compiler, linker, libraries and headers])
|
||||
AC_CHECK_HEADERS([EXTERN.h perl.h XSUB.h], [
|
||||
perl=yes
|
||||
],
|
||||
[
|
||||
perl=no
|
||||
PERL_LDFLAGS=""
|
||||
PERL_CFLAGS=""
|
||||
AC_MSG_RESULT([Failed. Perl Support Disabled. See the RELNOTES file])
|
||||
break
|
||||
],
|
||||
[
|
||||
#ifdef HAVE_EXTERN_H
|
||||
#include <EXTERN.h>
|
||||
#endif
|
||||
#ifdef HAVE_PERL_H
|
||||
#include <perl.h>
|
||||
#endif
|
||||
#ifdef HAVE_XSUB_H
|
||||
#include <XSUB.h>
|
||||
#endif
|
||||
]
|
||||
)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
PERL_LDFLAGS=""
|
||||
PERL_CFLAGS=""
|
||||
perl=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_SUBST(PERL_CFLAGS)
|
||||
AC_SUBST(PERL_LDFLAGS)
|
||||
AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
|
||||
if test "x$perl" = "xyes"; then
|
||||
AC_DEFINE_UNQUOTED(USE_PERL, 1, 'Enable Perl Support')
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(NS_HOST, "$host_os", "Operating System Host")
|
||||
AC_MSG_HEADER([Configuring CCDV Now])
|
||||
wi_ARG_DISABLE_CCDV
|
||||
wi_PROG_CCDV
|
||||
AC_MSG_HEADER([Configuring LibEvent Now])
|
||||
CHK_LIBEVNT
|
||||
dnl option to disable BDB
|
||||
AC_MSG_CHECKING([Should we try to compile BDB])
|
||||
AC_ARG_ENABLE(bdb, AC_HELP_STRING([--enable-bdb],[Enable Berkley Database Support]),
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
AC_MSG_RESULT([Yes])
|
||||
AC_MSG_HEADER([Checking for Berkeley Database])
|
||||
AX_BERKELEY_DB([4.1],
|
||||
[BLD_BDB=bdb
|
||||
AC_SUBST(BLD_BDB)]
|
||||
)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
AC_MSG_HEADER([NeoStats Configuration Summary:])
|
||||
|
||||
dnl check if we are running with Debug....
|
||||
AC_MSG_CHECKING(Whether to Enable Debuging...)
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug], [Enable Debuging]),
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
AC_DEFINE(DEBUG, 1, 'Enable Debugging')
|
||||
CFLAGS="$CFLAGS -ggdb -Wall"
|
||||
AC_MSG_RESULT(yes - Watch your Log Files)
|
||||
;;
|
||||
*)
|
||||
CFLAGS="$CFLAGS -DNDEBUG"
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac],
|
||||
CFLAGS="$CFLAGS -DNDEBUG"
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
AC_MSG_CHECKING(To Enable AutoTools Debug Mode?)
|
||||
AC_ARG_ENABLE(autodebug, AC_HELP_STRING([--enable-autodebug], [Enable AutoTools Debug]),
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
AX_MAINTAINER_MODE_AUTO_SILENT
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no)
|
||||
AX_MAINTAINER_MODE_AUTO_SILENT
|
||||
)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(To Enable Raw command?)
|
||||
AC_ARG_ENABLE(raw, AC_HELP_STRING([--enable-raw], [Enable Raw command]),
|
||||
[ case "$enableval" in
|
||||
yes)
|
||||
AC_DEFINE(USE_RAW, 1, 'Use Raw command')
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(The Modules that will be automatically compiled)
|
||||
AC_MSG_RESULT($MODULES)
|
||||
|
||||
AC_MSG_CHECKING(The additional modules to compile?)
|
||||
AC_ARG_WITH(modules, AC_HELP_STRING([--with-modules],[Additional Modules to compile]),
|
||||
MODULES="$MODULES $withval"
|
||||
AC_MSG_RESULT($withval),
|
||||
AC_MSG_RESULT("None"))
|
||||
|
||||
AX_DISTVERSION
|
||||
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
AC_SUBST(PROTOCOL)
|
||||
AC_SUBST(SED)
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
AC_SUBST(MODULES)
|
||||
AC_SUBST(LIBDB)
|
||||
AC_SUBST(CCDV)
|
||||
AC_SUBST(EVNTLIBOBJS)
|
||||
AC_CONFIG_FILES([Makefile
|
||||
include/Makefile
|
||||
src/Makefile
|
||||
modules/protocol/Makefile
|
||||
modules/dbm/Makefile
|
||||
modules/dbm/bdb/Makefile
|
||||
modules/dbm/gdbm/Makefile
|
||||
lib/Makefile
|
||||
lib/curl/Makefile
|
||||
lib/pcre/Makefile
|
||||
lib/event/Makefile
|
||||
lib/nxml/Makefile
|
||||
lib/execinfo/Makefile
|
||||
modules/Makefile
|
||||
modules/connectserv/Makefile
|
||||
modules/extauth/Makefile
|
||||
modules/hostserv/Makefile
|
||||
modules/ircdauth/Makefile
|
||||
modules/statserv/Makefile
|
||||
modules/textserv/Makefile
|
||||
modules/quoteserv/Makefile
|
||||
modules/limitserv/Makefile
|
||||
modules/operlog/Makefile
|
||||
modules/dccpartyline/Makefile
|
||||
modules/perltest/Makefile
|
||||
modules/templateauth/Makefile
|
||||
modules/template/Makefile
|
||||
modules/update/Makefile
|
||||
neostats])
|
||||
|
||||
AC_CACHE_SAVE
|
||||
AC_OUTPUT
|
||||
AC_MSG_HEADER([Configuration complete.])
|
||||
if test ! -f .hush; then \
|
||||
read -p "Press Enter key to read the release notes"; \
|
||||
clear; \
|
||||
more RELNOTES; \
|
||||
echo "Run 'make' (or 'gmake' on some systems) to compile NeoStats."; \
|
||||
echo "If you require support, see the README file."; \
|
||||
fi;
|
|
@ -1,5 +0,0 @@
|
|||
DEFAULT #NeoStats Welcome to the NeoStats Developmental Testing Server
|
||||
OPER #services Welcome oper!
|
||||
#IGNORE
|
||||
|
||||
|
251
data/tlds.nfo
251
data/tlds.nfo
|
@ -1,251 +0,0 @@
|
|||
UnResolved (num)
|
||||
Generic Top Level Domain (net)
|
||||
Generic Top Level Domain (com)
|
||||
Generic Top Level Domain (org)
|
||||
Generic Top Level Domain (edu)
|
||||
Generic Top Level Domain (gov)
|
||||
.info Top Level Domain (info)
|
||||
.biz Top Level Domain (biz)
|
||||
Afghanistan (af)
|
||||
Albania (al)
|
||||
Algeria (dz)
|
||||
American Samoa (as)
|
||||
Andorra (ad)
|
||||
Angola (ao)
|
||||
Anguilla (ai)
|
||||
Antarctica (aq)
|
||||
Antigua and Barbuda (ag)
|
||||
Argentina (ar)
|
||||
Armenia (am)
|
||||
Aruba (aw)
|
||||
Ascension Island (ac)
|
||||
Austria (at)
|
||||
Australia (au)
|
||||
Azerbaijan (az)
|
||||
The Bahamas (bs)
|
||||
Bahrain (bh)
|
||||
Bangladesh (bd)
|
||||
Barbados (bb)
|
||||
Belarus (by)
|
||||
Belgium (be)
|
||||
Belize (bz)
|
||||
Benin (bj)
|
||||
Bermuda (bm)
|
||||
Bhutan (bt)
|
||||
Bolivia (bo)
|
||||
Bosnia and Herzegowina (ba)
|
||||
Botswana (bw)
|
||||
Bouvet Island (bv)
|
||||
Brazil (br)
|
||||
British Indian Ocean Territory (io)
|
||||
Brunei (bn)
|
||||
Bulgaria (bg)
|
||||
Burkina Faso (bf)
|
||||
Burundi (bi)
|
||||
Cambodia (kh)
|
||||
Cameroon (cm)
|
||||
Canada (ca)
|
||||
Cape Verde (cv)
|
||||
The Cayman Islands (ky)
|
||||
Central African Republic (cf)
|
||||
Chad (td)
|
||||
Channel Islands, Guernsey (gg)
|
||||
Channel Islands, Jersey (je)
|
||||
Chile (cl)
|
||||
China (cn)
|
||||
Christmas Island (cx)
|
||||
Cocos (Keeling) Islands (cc)
|
||||
Colombia (co)
|
||||
Comoros (km)
|
||||
Congo (cg)
|
||||
Cook Islands (ck)
|
||||
Costa Rica (cr)
|
||||
Cote d'Ivoire (ci)
|
||||
Croatia (hr)
|
||||
Cuba (cu)
|
||||
Cyprus (cy)
|
||||
Czech Republic (cz)
|
||||
Denmark (dk)
|
||||
Djibouti (dj)
|
||||
Dominica (dm)
|
||||
Dominican Republic (do)
|
||||
East Timor (tp)
|
||||
Ecuador (ec)
|
||||
Egypt (eg)
|
||||
El Salvador (sv)
|
||||
Equatorial Guinea (gq)
|
||||
Eritrea (er)
|
||||
Estonia (ee)
|
||||
Ethiopia (et)
|
||||
Falklands Islands (fk)
|
||||
Faroe Islands (fo)
|
||||
Fiji (fj)
|
||||
Finland (fi)
|
||||
France (fr)
|
||||
French, Metropolitan (fx)
|
||||
French Guiana (gf)
|
||||
French Polynesia (pf)
|
||||
French Southern Territories (tf)
|
||||
Gabon (ga)
|
||||
Gambia (gm)
|
||||
Georgia (ge)
|
||||
Germany (de)
|
||||
Ghana (gh)
|
||||
Gibraltar (gi)
|
||||
Greece (gr)
|
||||
Greenland (gl)
|
||||
Grenada (gd)
|
||||
Guadeloupe (gp)
|
||||
Guam (gu)
|
||||
Guatemala (gt)
|
||||
Guinea (gn)
|
||||
Guinea-Bissau (gw)
|
||||
Guyana (gy)
|
||||
Haiti (ht)
|
||||
Heard and Mc Donald Islands (hm)
|
||||
Honduras (hn)
|
||||
Hong Kong (hk)
|
||||
Hungary (hu)
|
||||
Iceland (is)
|
||||
India (in)
|
||||
Indonesia (id)
|
||||
Iran (ir)
|
||||
Iraq (iq)
|
||||
Ireland (ie)
|
||||
Isle of Man (im)
|
||||
Israel (il)
|
||||
Italy (it)
|
||||
Jamaica (jm)
|
||||
Japan (jp)
|
||||
Jordan (jo)
|
||||
Kazakhstan (kz)
|
||||
Kenya (ke)
|
||||
Kiribati (ki)
|
||||
Korea, Democratic People's Republic of (kp)
|
||||
Korea, Republic of (kr)
|
||||
Kuwait (kw)
|
||||
Kyrgyzstan (kg)
|
||||
Laos (la)
|
||||
Latvia (lv)
|
||||
Lebanon (lb)
|
||||
Lesotho (ls)
|
||||
Liberia (lr)
|
||||
Libyan Arab Jamahiriya (ly)
|
||||
Liechtenstein (li)
|
||||
Lithuania (lt)
|
||||
Luxembourg (lu)
|
||||
Macao (mo)
|
||||
Macedonia (mk)
|
||||
Madagascar (mg)
|
||||
Malawi (mw)
|
||||
Malaysia (my)
|
||||
Mali (ml)
|
||||
Malta (mt)
|
||||
Marshall Islands (mh)
|
||||
Martinique (mq)
|
||||
Mauritania (mr)
|
||||
Mauritius (mu)
|
||||
Maldives (mv)
|
||||
Mayotte (yt)
|
||||
Mexico (mx)
|
||||
Micronesia (fm)
|
||||
Moldova (md)
|
||||
Monaco (mc)
|
||||
Mongolia (mn)
|
||||
Montserrat (ms)
|
||||
Morocco (ma)
|
||||
Mozambique (mz)
|
||||
Myanmar (mm)
|
||||
Namibia (na)
|
||||
Nauru (nr)
|
||||
Nepal (np)
|
||||
Netherlands (nl)
|
||||
Netherlands Antilles (an)
|
||||
New Caledonia (nc)
|
||||
New Zealand (nz)
|
||||
Nicaragua (ni)
|
||||
Niger (ne)
|
||||
Nigeria (ng)
|
||||
Niue (nu)
|
||||
Norfolk Island (nf)
|
||||
Northern Mariana Islands (mp)
|
||||
Norway (no)
|
||||
Oman (om)
|
||||
Pakistan (pk)
|
||||
Palau (pw)
|
||||
Panama (pa)
|
||||
Papua New Guinea (pg)
|
||||
Paraguay (py)
|
||||
Peru (pe)
|
||||
Philippines (ph)
|
||||
Pitcairn (pn)
|
||||
Poland (pl)
|
||||
Portugal (pt)
|
||||
Puerto Rico (pr)
|
||||
Qatar (qa)
|
||||
Reunion (re)
|
||||
Romania (ro)
|
||||
Russia (ru)
|
||||
Rwanda (rw)
|
||||
Saint Kitts and Nevis (kn)
|
||||
Saint Lucia (lc)
|
||||
Saint Vincent and the Grenadines (vc)
|
||||
Samoa (ws)
|
||||
San Marino (sm)
|
||||
Sao Tome and Principe (st)
|
||||
Saudi Arabia (sa)
|
||||
Senegal (sn)
|
||||
Seychelles (sc)
|
||||
Sierra Leone (sl)
|
||||
Singapore (sg)
|
||||
Slovakia (sk)
|
||||
Slovenia (si)
|
||||
Solomon Islands (sb)
|
||||
Somalia (so)
|
||||
South Africa (za)
|
||||
South Georgia and the South Sandwich Islands (gs)
|
||||
Spain (es)
|
||||
Sri Lanka (lk)
|
||||
St. Helena (sh)
|
||||
St. Pierre and Miquelon (pm)
|
||||
Sudan (sd)
|
||||
Suriname (sr)
|
||||
Svalbard and Jan Mayen Islands (sj)
|
||||
Swaziland (sz)
|
||||
Sweden (se)
|
||||
Switzerland (ch)
|
||||
Syria (sy)
|
||||
Taiwan (tw)
|
||||
Tajikistan (tj)
|
||||
Tanzania (tz)
|
||||
Thailand (th)
|
||||
Togo (tg)
|
||||
Tokelau (tk)
|
||||
Tonga (to)
|
||||
Trinidad and Tobago (tt)
|
||||
Tunisia (tn)
|
||||
Turkey (tr)
|
||||
Turkmenistan (tm)
|
||||
Turks and Caicos Islands (tc)
|
||||
Tuvalu (tv)
|
||||
Uganda (ug)
|
||||
Ukraine (ua)
|
||||
United Arab Emirates (ae)
|
||||
United Kingdom (uk)
|
||||
United States (us)
|
||||
United States Minor Outlying Islands (um)
|
||||
Uruguay (uy)
|
||||
Uzbekistan (uz)
|
||||
Vanuatu (vu)
|
||||
Vatican City State (va)
|
||||
Venezuela (ve)
|
||||
Vietnam (vn)
|
||||
Virgin Islands - British (vg)
|
||||
Virgin Islands - US (vi)
|
||||
Wallis and Futuna Islands (wf)
|
||||
Western Sahara (eh)
|
||||
Yemen (ye)
|
||||
Yugoslavia (yu)
|
||||
Zaire (zr)
|
||||
Zambia (zm)
|
||||
Zimbabwe (zw)
|
|
@ -1,307 +0,0 @@
|
|||
************************************************************************
|
||||
** NeoStats - IRC Statistical Services **
|
||||
** Copyright (c) 1999-2008 NeoStats Group. All Rights Reserved. **
|
||||
** This program and all associated documentation is free but **
|
||||
** copyrighted software; see the file COPYING for details. **
|
||||
** Homepage: http://www.neostats.net/ **
|
||||
************************************************************************
|
||||
|
||||
(For the most recent version of these guides, refer to
|
||||
http://wiki.neostats.net/confluence/display/Dev)
|
||||
|
||||
How to write a NeoStats 3.0 Module
|
||||
----------------------------------
|
||||
|
||||
This document explains how to write modules for NeoStats 3.0. These
|
||||
instructions apply to versions 3.0 and higher. For older versions you
|
||||
must refer to the documentation which comes with that version since they
|
||||
versions had a different API specification.
|
||||
|
||||
This document also includes a section at the end for upgrading your
|
||||
modules to 3.0 from 2.5.x.
|
||||
|
||||
NeoStats 3.0 has four types of module.
|
||||
|
||||
1) General Modules. These are the type of module you will usually want
|
||||
to develop and are discussed in this file.
|
||||
2) Authentication Modules. These provide authentication systems which
|
||||
define what users have access to NeoStats functions and are discussed
|
||||
in this file.
|
||||
3) Protocol modules. These allow NeoStats to talk to a given type of
|
||||
IRCd. For information on protocol modules see protocol.txt.
|
||||
4) DBA modules. These allow NeoStats to store and fetch data from a
|
||||
given DBM. For information on DBA modules see dba.txt.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
What can modules do?
|
||||
--------------------
|
||||
|
||||
Anything that the Server receives from users, or other servers can be
|
||||
intercepted by a module. This basically means that you can do what ever
|
||||
you want in your modules.
|
||||
|
||||
In order to help you learn how to make a module, we have included an
|
||||
example basic module in template/template.c. The easiest way to start
|
||||
a module is to copy that file and add the features you want. For
|
||||
authentication modules use the file templateauth/templateauth.c as
|
||||
the starting point.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
First we must include the header file which gives our code access to the
|
||||
NeoStats API:
|
||||
|
||||
#include "neostats.h"
|
||||
|
||||
We must export a definition of specific information about the module.
|
||||
This is required.
|
||||
|
||||
/** Module Info definition
|
||||
* This describes the module to the NeoStats core and provides information
|
||||
* to end users when modules are queried.
|
||||
* The structure is required but some fields are optional.
|
||||
*/
|
||||
ModuleInfo module_info = {
|
||||
/* REQUIRED:
|
||||
* name of module e.g. StatServ */
|
||||
"Template",
|
||||
/* REQUIRED:
|
||||
* one line brief description of module */
|
||||
"Put your brief module description here",
|
||||
/* OPTIONAL:
|
||||
* pointer to a NULL terminated list with copyright information
|
||||
* NeoStats will automatically provide a CREDITS command to output this
|
||||
* use NULL for none */
|
||||
template_copyright,
|
||||
/* OPTIONAL:
|
||||
* pointer to a NULL terminated list with extended description
|
||||
* NeoStats will automatically provide an ABOUT command to output this
|
||||
* use NULL for none */
|
||||
template_about,
|
||||
/* REQUIRED:
|
||||
* version of neostats used to build module
|
||||
* must be NEOSTATS_VERSION or your module will not load */
|
||||
NEOSTATS_VERSION,
|
||||
/* REQUIRED:
|
||||
* string containing version of module
|
||||
* returned when a user requests
|
||||
* /msg botname version */
|
||||
"1.0",
|
||||
/* REQUIRED: string containing build date of module
|
||||
* should be __DATE__ */
|
||||
__DATE__,
|
||||
/* REQUIRED: string containing build time of module
|
||||
* should be __TIME__ */
|
||||
__TIME__,
|
||||
/* OPTIONAL:
|
||||
* Module control flags,
|
||||
* use 0 if not needed */
|
||||
0,
|
||||
/* OPTIONAL:
|
||||
* Protocol flags for required protocol specfic features e.g. SETHOST
|
||||
* use 0 if not needed */
|
||||
0,
|
||||
};
|
||||
|
||||
This information is used to report back to users on what modules and
|
||||
what versions are loaded and can be used by the core and other modules
|
||||
to check that they are compatible.
|
||||
|
||||
We can also have a table for any events on IRC that we wish to process.
|
||||
This is optional.
|
||||
|
||||
/** Module event list
|
||||
* What events we will act on
|
||||
* This is required if you want your module to respond to events on IRC
|
||||
* see events.h for a list of all events available
|
||||
*/
|
||||
ModuleEvent module_events[] = {
|
||||
{EVENT_NULL, NULL, 0}
|
||||
NS_EVENT_END()
|
||||
};
|
||||
|
||||
The table contains the event we want to process (e.g. SIGNON), the
|
||||
function to call when it happens (e.g. MySignonHandler) and optional
|
||||
flags related to event (e.g. EVENT_FLAG_USE_EXCLUDE). Events are
|
||||
raised for both server and user actions.
|
||||
|
||||
The table must be NULL terminated with a correctly formed NULL entry.
|
||||
A macro NS_EVENT_END() is provided for this purpose.
|
||||
|
||||
Descriptions of all available events and their parameters are listed in
|
||||
"events.h". The header file is automatically included by "neostats.h"
|
||||
so you do not need to include it in your module.
|
||||
|
||||
There are three specialist functions that a module must define:
|
||||
|
||||
ModInit is called when a module is first loaded so can be used to
|
||||
initialise settings for your module. It must not be used to start
|
||||
anything which will try to send commands to the IRC network such
|
||||
as starting a bot since you may not be connected to a network when
|
||||
this function is called. It is mainly useful for processing
|
||||
configuration and starting databases.
|
||||
|
||||
/** @brief ModInit
|
||||
*
|
||||
* Init module
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModInit( void )
|
||||
{
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
ModSynch is called when your module is able to send over IRC so is
|
||||
where you would init a bot if you wanted one.
|
||||
|
||||
/** @brief ModSynch
|
||||
*
|
||||
* Startup handler
|
||||
* Introduce bot onto network
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModSynch( void )
|
||||
{
|
||||
/* Introduce a bot onto the network saving the bot handle */
|
||||
template_bot = AddBot (&template_bot_info);
|
||||
if (!template_bot) {
|
||||
return NS_FAILURE;
|
||||
}
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
ModFini is called when a module is unloaded so is useful for saving
|
||||
databases.
|
||||
|
||||
/** @brief ModFini
|
||||
*
|
||||
* Fini handler
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModFini (void)
|
||||
{
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
NeoStats provides an API to send commands over IRC. These are designed
|
||||
to mimic the way you send commands on IRC as a user to make them
|
||||
intuitive to use but must be sent from a bot you have created.
|
||||
|
||||
To create a bot, you must first use a definition to describe the bot:
|
||||
|
||||
/** Define information about our bot
|
||||
*/
|
||||
BotInfo template_bot_info =
|
||||
{
|
||||
/* REQUIRED:
|
||||
* nick */
|
||||
"changeme",
|
||||
/* OPTIONAL:
|
||||
* altnick, use "" if not needed */
|
||||
"altnick",
|
||||
/* REQUIRED:
|
||||
* user */
|
||||
"changeme",
|
||||
/* REQUIRED:
|
||||
* host that this bot will use
|
||||
* for the neostats host, use BOT_COMMON_HOST */
|
||||
BOT_COMMON_HOST,
|
||||
/* REQUIRED:
|
||||
* realname */
|
||||
"Example NeoStats module",
|
||||
/* OPTIONAL:
|
||||
* flags */
|
||||
0,
|
||||
/* OPTIONAL:
|
||||
* bot command list pointer, use NULL if not needed */
|
||||
template_commands,
|
||||
/* OPTIONAL:
|
||||
* bot command setting pointer, use NULL if not needed */
|
||||
template_settings,
|
||||
};
|
||||
|
||||
You then pass this structure to NeoStats with the AddBot function
|
||||
call from your ModSynch function:
|
||||
|
||||
/* Introduce a bot onto the network saving the bot handle */
|
||||
template_bot = AddBot (&template_bot_info);
|
||||
|
||||
Your bot can now issue commands on IRC as if it was a user but using
|
||||
the irc_command functions. E.g. if you want your bot to join a
|
||||
channel you would use the irc_join function.
|
||||
|
||||
irc_join (template_bot, "#channelname", "");
|
||||
|
||||
A full list of available irc functions are found in "neostats.h".
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
Timers are available for your module. There are several types of timer
|
||||
you can choose from.
|
||||
|
||||
To add a timer:
|
||||
|
||||
AddTimer( type, func, name, interval );
|
||||
|
||||
type - Type of timer from
|
||||
TIMER_TYPE_INTERVAL
|
||||
TIMER_TYPE_DAILY
|
||||
TIMER_TYPE_WEEKLY
|
||||
TIMER_TYPE_MONTHLY
|
||||
TIMER_TYPE_COUNTDOWN
|
||||
func - the function you want to trigger when this timer
|
||||
is triggered
|
||||
name - a descriptive name of the timer
|
||||
interval - interval in seconds that this function is to be
|
||||
called (TIMER_TYPE_INTERVAL and TIMER_TYPE_COUNTDOWN).
|
||||
|
||||
Note, this interval is not precise. NeoStats will check the timers and
|
||||
if at least interval has passed, will call your routine. Since NeoStats
|
||||
is single threaded, it runs in a continuous loop, meaning that if
|
||||
NeoStats itself, or another module held up that loop, then the timers
|
||||
are not going to run until that piece of code completes. Therefore an
|
||||
interval of 60 seconds might be called after 65 seconds.
|
||||
|
||||
To delete a timer:
|
||||
|
||||
int DelTimer( name )
|
||||
|
||||
name - the name the timer created with in AddTimer
|
||||
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
TODO:
|
||||
Sockets. They can make outgoing tcp connections to other servers (i.e.,
|
||||
web, email, etc)
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
Upgrading modules from 2.5.x to 3.0
|
||||
-----------------------------------
|
||||
|
||||
TODO
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
That's about it.
|
||||
|
||||
The module API is constantly reviewed and is updated and added to from
|
||||
time to time. We try to maintain backwards compatibility where it is
|
||||
possible for a short time after we make any major changes. Your modules
|
||||
should always work with all releases of the 3.0 series.
|
||||
|
||||
If you have any questions, comments or suggestions about our module API
|
||||
or this document, please post on our message boards at www.neostats.net.
|
||||
|
||||
************************************************************************
|
||||
** This document was last updated on January 31st, 2005 by M **
|
||||
************************************************************************
|
129
doc/README.dev
129
doc/README.dev
|
@ -1,129 +0,0 @@
|
|||
************************************************************************
|
||||
** NeoStats - IRC Statistical Services **
|
||||
** Copyright (c) 1999-2008 NeoStats Group. All Rights Reserved. **
|
||||
** This program and all associated documentation is free but **
|
||||
** copyrighted software; see the file COPYING for details. **
|
||||
** Homepage: http://www.neostats.net/ **
|
||||
************************************************************************
|
||||
|
||||
Tips for using the SVN version of NeoStats.
|
||||
--------------------------------------------------------------
|
||||
|
||||
So you like to live life on the bleeding edge of NeoStats development?
|
||||
|
||||
Although we do not support our development version being used in
|
||||
production environments, here are a few tips that might come in handy for
|
||||
those that want to follow development as it happens.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1 The development mailing list - devel@lists.neostats.net
|
||||
|
||||
An ideal accessory for your copy of NeoStats development version is the
|
||||
development mailing list. This is an open mailing list to receive commit
|
||||
notices and discuss development issues relating to NeoStats. We recommend
|
||||
that regular users of the development version join our development mailing
|
||||
list.
|
||||
To subscribe, send a mail to devel-subscribe@lists.neostats.net
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2 Random crashes after getting the latest version
|
||||
|
||||
The development version of NeoStats is in a constant state of change so
|
||||
you may occasionally find that it appears to crash for no reason after
|
||||
getting the latest version. Before reporting this as a problem, please
|
||||
perform a full rebuild of NeoStats and all external modules that you use
|
||||
(secureserv, opsb, stupidserv, logserv and any third party modules). To
|
||||
perform a full build, run "make clean" then start from begin from the
|
||||
configure step as you would for a new installation. Also see below for a
|
||||
tip on faster clean rebuilds.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3 Speeding up full builds
|
||||
|
||||
To speed up full rebuilds of the core, it is possible to skip the
|
||||
configure step by using the following sequence:
|
||||
|
||||
1) make clean
|
||||
2) ./config.status
|
||||
3) cd curl
|
||||
4) ./config.status
|
||||
5) cd ..
|
||||
6) make
|
||||
7) make install
|
||||
|
||||
For external modules, use the following sequence:
|
||||
|
||||
1) make clean
|
||||
2) ./config.status
|
||||
3) make
|
||||
4) make install
|
||||
|
||||
However, if configure.in or configure change in an update, you must use
|
||||
configure since your config.status needs updating.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
4 When external modules must be rebuilt
|
||||
|
||||
As a general guide, if stats.h or dl.h changes, the safest way is to
|
||||
rebuild all external modules (secureserv, opsb, stupidserv, logserv and
|
||||
any third party modules). If you ever get a crash in the core or an
|
||||
external module after using SVN update, make sure you have done a full
|
||||
rebuild of both the core and all external modules to discount this sort of
|
||||
error.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
5 I found a problem, do you want to know?
|
||||
|
||||
Problem reports are often helpful to us but unlike the release version,
|
||||
problems with the development version are handled in a different manner.
|
||||
You must subscribe to our development mailing list and you should send any
|
||||
report to devel@lists.neostats.net if no one else has already reported the
|
||||
problem.
|
||||
|
||||
Please do not post problems encountered in the development version on the
|
||||
NeoStats forums and only add them to the bug list if they also occur in
|
||||
release versions. Also, please indicate which revision you are running.
|
||||
This is given when you type 'svn update' to get files but if you forget,
|
||||
type 'svn info' to see which revision you are running.
|
||||
|
||||
If you have modified NeoStats in any way, do not contact us unless you
|
||||
can reproduce the problem on an unmodified version. We provide no support
|
||||
at all for modifications made to NeoStats by others.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
6 I get warnings when I compile, do you want to know?
|
||||
|
||||
Generally no. Warnings are just that, warnings. The ones you are likely to
|
||||
encounter rarely indicate a problem and we do see them ourselves and fix
|
||||
them up as we work. We will also clean up any remaining warnings just
|
||||
before a release. Just consider them a feature of life with the
|
||||
development version.
|
||||
|
||||
Warnings on released versions of our software should be reported through
|
||||
the usual channels of the forums or the bug list since they are generally
|
||||
issued by a particular compiler that we have not used so have not seen
|
||||
ourselves so you should also provide full details of your OS and compiler
|
||||
as for any other bug report.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
7 I have a feature request
|
||||
|
||||
There is some discussion about the specifics of a given feature request
|
||||
and improving features on the development list (particularly when we are
|
||||
working with an individual or a group on a feature e.g. sqlserv). New
|
||||
feature requests such as say support for a certain IRCd protocol that we
|
||||
do not yet have or a new type of module should generally be posted on the
|
||||
NeoStats forums or the bug list.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
************************************************************************
|
||||
** This document was last updated on February 9th, 2004 by M **
|
||||
************************************************************************
|
|
@ -1,29 +0,0 @@
|
|||
Win32 Build files
|
||||
|
||||
NeoStats for Windows requires Microsoft Visual Studio .NET 2005.
|
||||
It may or not build on other versions of Visual Studio.
|
||||
|
||||
Main build files:
|
||||
neostatslibs.sln - Library solution.
|
||||
neostats.sln - Main solution.
|
||||
|
||||
NeoStats requires that ActivePerl be installed before you compile,
|
||||
and that the ActivePerl installation is located at c:\perl. If your
|
||||
activeperl is located at a different location, you will have to
|
||||
modify the INCLUDE and LIBRARY paths specifiec in the properties
|
||||
of the neostats.sln solution.
|
||||
|
||||
NeoStats depends on the libraries in the library solution. To build
|
||||
NeoStats for Windows, load the library solution and select build
|
||||
solution from the Build menu. Then load the neostats solution and
|
||||
select build solution from the Build menu.
|
||||
|
||||
The NeoStats Setup exe that we distribute NeoStats with also
|
||||
contains the library and header files you need to compile other
|
||||
modules. By default they are installed when you install NeoStats
|
||||
and are located in the include and library directories of your
|
||||
NeoStats installation. 3rd party modules (such as OPSB) are
|
||||
setup to look in these directories when building, so if you
|
||||
change the location of NeoStats installation then you will
|
||||
need to modify the INCLUDE and LIBRARY paths for those
|
||||
3rd party modules to point to the correct directory.
|
|
@ -1,85 +0,0 @@
|
|||
ConnectServ Module for NeoStats 2.x ChangeLog
|
||||
Shmad & ^Enigma^
|
||||
==============================================================================
|
||||
* Version 1.14 * Mark (M) * Feb 17, 2004
|
||||
- SET interface for nick/user/host/realname added (M)
|
||||
|
||||
* Version 1.13 * Mark (M) * January 9, 2004
|
||||
- New SERVWATCH option to track server joins/quits (M)
|
||||
- Tidy up message strings (M)
|
||||
- Add user@host to server kills (M)
|
||||
- Fix mem leak from strdup (M)
|
||||
- Use new IsMe macro rather than comparing strings to exclude NeoStats users from reports (M)
|
||||
|
||||
* Version 1.12 * Fish (F) * December 28, 2003
|
||||
- Gecos is echoed in signon/signoff now (F)
|
||||
|
||||
* Version 1.11 * Mark (M) * December 2, 2003
|
||||
- Use core bot message handler to process commands (M)
|
||||
- Use core bot set handler (M)
|
||||
- Removed Invisibility (+I) handling since it no longer exists in Unreal and no other IRCDs need it (M)
|
||||
- Use GOTUSERSMODES feature define so we can support Quantum correctly and not just Ultimate 3 (M)
|
||||
- Removed local module_function table to use core for /VERSION replies (M)
|
||||
|
||||
* Version 1.10 * Mark (M) * November 13, 2003
|
||||
- Moved mode defines to ircd header files (M)
|
||||
|
||||
* Version 1.9 * Mark (M) * November 1, 2003
|
||||
- Message system cleanup (M)
|
||||
- Nick change messages now include user@host for spotting nick flooders (M)
|
||||
|
||||
* Version 1.8 * Fish (F) & Mark (M) * August 29, 2003
|
||||
- Colorized Output thanks to MrAllThat (F)
|
||||
- Now only compiles for Modes that are relevent (F)
|
||||
- Help text cleanup (M)
|
||||
- Added ABOUT command (M)
|
||||
- Coloured output is now optional - see cs.c for details (M)
|
||||
- Changed to new Module API system removing need for __module_get_xxx() calls (M)
|
||||
- Added missing NULL checks for finduser results to avoid referencing NULL pointers (M)
|
||||
- Renamed output module to connectserv to fix load/unload issues (M)
|
||||
|
||||
* Version 1.7 * July 15th, 2003
|
||||
- Fixed a problem with connectserv clobering the avlist for modes
|
||||
|
||||
* Version 1.6 * Mar 11th, 2003
|
||||
- Moved ConnectServ to new Logging and Config Interface
|
||||
|
||||
* Version 1.5 * September 12th, 2002
|
||||
- Fixed cosmetic bug reported by eggy (Shmad)
|
||||
- Added NICK watching support for nick changes (Shmad)
|
||||
- Fixed other misc bugs.
|
||||
|
||||
* Version 1.4 * July 17th, 2002
|
||||
- Moved to new Event API (Fish)
|
||||
- Stopped it flooding the net when neo starts up (Fish)
|
||||
|
||||
* Version 1.3 * March 12th, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* Version 1.2 * November 18th, 2001
|
||||
- Add u->mode check for Local Kills (^Enigma^)
|
||||
- Changed LOCAL KILL format to same as GLOBAL format (much nicer..) (Shmad)
|
||||
- Changed KILL code. Local kills prefixed with LOCAL KILL, Globals with GLOBAL KILL (Shmad)
|
||||
- Added Local Kill code. (Shmad)
|
||||
- Fixed Global Kill reason msg (Shmad)
|
||||
|
||||
* Version 1.1 * November 16th, 2001
|
||||
|
||||
- Version 1.1 is ready to be released in next ver of NeoStats
|
||||
- fixed compiler warnings. (Shmad)
|
||||
- Fixed cs_user_modes() segfault. Was in _init() *thwaps niggles* (Shmad)
|
||||
- Updated LoadConf(); to parse quicker. :) (Shmad)
|
||||
- Updated LoadConf(); to only load valid settings!! (Shmad)
|
||||
- Added LoadConfig(); to load connect.db (Shmad)
|
||||
- Command Settings in connect.db loaded upon module load (Shmad)
|
||||
- Command settings now saved to connect.db (^Enigma^)
|
||||
|
||||
* Version 1.0 * November 13th, 2001
|
||||
|
||||
- Version 1.0 is ready to use in the devel NeoStats
|
||||
- ABOUT Added - Little info about service (^Enigma^)
|
||||
- STATUS Added - Check if KILLWATCH, MODEWATCH or SIGNWATCH is active or not (^Enigma^)
|
||||
- KILLWATCH Added - Watch for server or oper /kill's (^Enigma^)
|
||||
- MODEWATCH Added - Watch for users chaning to oper flags or opers changing flags (^Enigma^)
|
||||
- SIGNWATCH Added - Watch for signon/signoffs (^Enigma^)
|
||||
- Started the module, not much here yet. (^Enigma^)
|
|
@ -1,153 +0,0 @@
|
|||
HostServ Module for NeoStats 2.x ChangeLog
|
||||
Shmad <shmad@neostats.net>
|
||||
^Enigma^ <enigma@neostats.net>
|
||||
==============================================================================
|
||||
* Version 3.4 * Mark (M) * Feb 17, 2004
|
||||
- SET interface for nick/user/host/realname added (M)
|
||||
|
||||
* Version 3.3 * Fish (F) * Jan 27, 2004
|
||||
- HostServ uses Global Exclusions in Unet style vhosts, and also on signon
|
||||
|
||||
* Version 3.2 * Mark (M) * November 27, 2003
|
||||
- Use core bot message handler to process commands (M)
|
||||
- Fix for hidden host bug id 92 (M)
|
||||
- Fix for disable message not passing enough parameters (M)
|
||||
- Fixes to config load to validate expiry times and memory leak with hidden host (M)
|
||||
- New string functions means we no longer need to allocate MAXHOST+1 when reading bans. (M)
|
||||
- Use core bot set handler (M)
|
||||
- Cleaned up config system (M)
|
||||
- Allow EXPIRE to accept a value of 0 to disable expiry processing (M)
|
||||
- Removed local module_function table to use core for /VERSION replies (M)
|
||||
|
||||
* Version 3.1 * Fish (F) & Mark (M) * Oct 17th, 2003
|
||||
- Fixed incorrect buffer size for password field (M)
|
||||
- Improved buffer size calculations in hs_addban and hs_config and replaced strlen calls (M)
|
||||
|
||||
* Version 3.0 * Fish * Oct 6th, 2003
|
||||
- Moved to lists to allow sorting and displaying (F)
|
||||
- Help text cleanup (M)
|
||||
- Added ABOUT command (M)
|
||||
- Undernet Style Hidden Hosts for registered nicknames is now supported! (F)
|
||||
- Changed to use new module export API (M)
|
||||
- Added missing NULL checks for finduser results to avoid referencing NULL pointers (M)
|
||||
|
||||
* Version 2.7.1 * Shmad * May 11th, 2003
|
||||
- Fixed a nasty seg bug *smacks fish* we don't free(s_HostServ);
|
||||
|
||||
* Version 2.7 * Fish * Apr 15th, 2003
|
||||
- Moved Hostserv over to new configuration backed
|
||||
- added interface to manipulate the ban list (/msg hostserv help bans for more info)
|
||||
- Added an interface to manipulate default levels (/msg hostserv levels)
|
||||
- added autoexpiry of un-used vhosts. Defaults at 60 days. Add option "ExpireDays" to HostServ config to change default.
|
||||
|
||||
* Version 2.6 * Fish * Mar 11th, 2003
|
||||
- Fixed a bug with adding Vhosts for users online already and sending an online message to the wrong user!
|
||||
|
||||
* Version 2.5 * Fish * Feb 3rd, 2003
|
||||
- check for duplicate nicks before adding entries
|
||||
- added a command to show configured levels
|
||||
|
||||
* Version 2.4 * Fish * Jan 29th, 2003
|
||||
- a few typo's in the messages
|
||||
- chpass can only be used if you match the host, or u have level 100 with neostats
|
||||
|
||||
* Version 2.3 * Shmad & Fish * January 4th, 2003
|
||||
- Write to DB who added the record.
|
||||
- VIEW # now shows also who added the record.
|
||||
- hostserv.h now contains defines for access for each function.
|
||||
- Fixed a segfault when upgrading from earlier versions if a
|
||||
passwd field wasnt present.
|
||||
- Made it possible to configure the levels for each command due
|
||||
to different people wanting different levels... :) removed
|
||||
Shmads old hostserv.h
|
||||
- Moved HostServ to use NeoStats hash system to store data.
|
||||
More efficient and nicer than righting and reading and
|
||||
moving files around...
|
||||
- Added Banned Vhost support to HostServ...
|
||||
Add HOSTSERV_BANNED_VHOSTS *badhost* to neostats.cfg (Can add Multiple
|
||||
times)
|
||||
- Added ChangePassword Ability to HostServ
|
||||
- HostServ Permissions are configurable (put in neostats.cfg):
|
||||
HOSTSERV_LVL_VIEW <- what level ppl can /msg hostserv view
|
||||
HOSTSERV_LVL_ADD <- what level ppl can /msg hostserv add
|
||||
HOSTSERV_LVL_DEL <- what level ppl can /msg hostserv del
|
||||
HOSTSERV_LVL_LIST <- what level ppl can /msg hostserv list
|
||||
eg:
|
||||
HOSTSERV_LVL_LIST 100 (ServerAdmins and higher)
|
||||
|
||||
* Version 2.2 * Fish * December 26th, 2002
|
||||
- Due to massive bitching by people who use HostServ opers can
|
||||
ADD/LIST/VIEW now and only admins and higher can DEL
|
||||
- Fixed a problem with Permissions and a typo in the help file
|
||||
|
||||
|
||||
* Version 2.1 * Shmad * October 20, 2002
|
||||
- Fixed an issue with fnmatch being a hoe.
|
||||
- Added LOGIN support for vhosts.
|
||||
- Updated Helpfiles.
|
||||
- Updated ADD procedure to use PASSWORD field.
|
||||
- Fixed a small problem with segfaulting with older databases.
|
||||
- Adding ability for users to change their vhost passwords.
|
||||
|
||||
|
||||
* Version 2.0 * Shmad * July 24, 2002
|
||||
- Fixed misc. bug with hs_signon (slaps himself)
|
||||
- Updated all HELPFILES.
|
||||
- Added an ERRORmsg to VIEW/DEL if the access # doesnt exist.
|
||||
- Fixed a segfault bug if av[2] was null (cant convert to int obviously)
|
||||
- Added new VIEW command, to view access #'s from VIEW, gives detailed information.
|
||||
- Overhauls to "LIST" routine:
|
||||
LIST is now numbered. 1, 2, 3, etc, etc, etc..
|
||||
Changing to tabulated displays so hosts all line up nicely.
|
||||
LIST now ONLY displays NICK & VHOST use VIEW # to get full info.
|
||||
- Overhauls to "DEL" routine:
|
||||
Can ONLY delete data by Line #
|
||||
- Example: /msg HoStServ DEL 1
|
||||
(Thanks for JH for finding the annoying deletion bug (which is why we are
|
||||
using list numbering now))
|
||||
- Changed over to new event handlers
|
||||
|
||||
|
||||
* Version 1.7 * March 30th, 2002
|
||||
- Possible signon crash fixed
|
||||
- "Can't Find db" message only appears once now
|
||||
|
||||
* Version 1.6 * March 15th, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* Version 1.5 * January 14th, 2002
|
||||
- Access levels reviewed and changed.
|
||||
|
||||
* Version 1.4 * January 8th, 2002
|
||||
- Overhauls to "DEL" routine:
|
||||
Syntax must be entire and complete
|
||||
The "xxx Has been deleted" message will only
|
||||
show up when something has actually been deleted
|
||||
Deletion code cleaned up slightly
|
||||
- "/msg HostServ DEL" exploit taken out (Thanks to
|
||||
JK & Error|51 informing me and then crashing thier
|
||||
NeoStats every 5 minutes with it :P)
|
||||
|
||||
* Version 1.3 * January 6th, 2002
|
||||
- Access levels changed (JK's Request)
|
||||
|
||||
* Version 1.2 * December 19th, 2001
|
||||
- I feel like chicken tonight, like chicken tonight!
|
||||
- fnmatch.h was missing from includes, *thwaps niggles*
|
||||
- Wildcards now supported w00t!.... 1-2-3.myisp.com.country can
|
||||
have thier host check set to *.myisp.com.country
|
||||
- When vhost is added and user is online... the vhost is
|
||||
set (no need to disconnect & reconnect)
|
||||
- Issued With 'ADD' Fixed
|
||||
- 'DEL' Function added
|
||||
|
||||
* Version 1.1 * December 18th, 2001
|
||||
- Vhost now works... w00t!
|
||||
- small issue with 'ADD'... will possibly fix within the next day or so
|
||||
|
||||
* Version 1.0 * November 5th, 2001
|
||||
- Entire Code Overhauled
|
||||
|
||||
* Version 0.1 * September 30th, 2001
|
||||
- Started the module, not much here yet.
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
Program: LoveServ Module for NeoStats 2.x ChangeLog
|
||||
Author: Shmad <shmad@neostats.net>
|
||||
==============================================================================
|
||||
* Version 1.91 *
|
||||
- We now try to read nick, user, host and realname so these can be configured more
|
||||
easily (M)
|
||||
- SET interface for nick/user/host/realname added (M)
|
||||
|
||||
* Version 1.9 *
|
||||
- Use core bot message handler to process commands (M)
|
||||
- Code cleaned up to reduce bloat (M)
|
||||
- Removed local module_function table to use core for /VERSION replies (M)
|
||||
|
||||
* Version 1.8 * October 6th, 2003
|
||||
- Help text cleanup (M)
|
||||
- Added ABOUT command (M)
|
||||
- Changed to use new module export API (M)
|
||||
- Added missing NULL checks for finduser results to avoid referencing NULL pointers (M)
|
||||
|
||||
* Version 1.7 * April 17th, 2003
|
||||
- Updated with new Logging functions
|
||||
|
||||
* Version 1.6 * July 25, 2002
|
||||
- Updated for new handlers
|
||||
|
||||
* Version 1.5 * March 16, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
- Fixed HELP sysetm not displaying command commands for techs
|
||||
|
||||
|
||||
* Version 1.4 * November 25, 2001
|
||||
- Fixed some typos/formatting in Help System.
|
||||
- Changed the way LoveServ checks to see if a user exists before sending any data.
|
||||
- LoveServ now CANNOT send itself things.. You ppl :)
|
||||
- Added APOLOGY to send someone an APOLOGY (w/reason)
|
||||
- Added THANKYOU to send someone a thank you note (w/reason)
|
||||
|
||||
|
||||
* Version 1.2 * October 31, 2001
|
||||
- Added VERSION to show LoveServ's Version & Author contact information.
|
||||
- LoveServ now checks to see if User Exists before sending any data (much safer)
|
||||
^Enigma^ should switch MoraleServ to this as well before MoraleServ sends any data.
|
||||
- Made LoveServ Neo compliant storing logs in logs/ directory instead of main directory.
|
||||
- VIEWLOGS added for Network and Technical Admins to view the LoveServ log file.
|
||||
- Added Network/Technical Admin Features
|
||||
- Added Missing HELP Topics.
|
||||
- Improved on HELP parsing routine in main help function for LoveServ, much faster now.
|
||||
|
||||
|
||||
* Version 1.1 * October 25, 2001
|
||||
- Removed Hardcoded servernames, and replaced with me.name (Thanks to fish for noticing and Patching)
|
||||
|
||||
|
||||
* Version 1.0 * September 1st, 2001
|
||||
- Send someone a customized LOVENOTE
|
||||
- Send someone some CANDY yummy!
|
||||
- Send someone some CHOCOLATE mmmm
|
||||
- Added ADMIRER - tell someone they have a secret admirer
|
||||
- HUG someone
|
||||
- TONSIL kiss someone very deeply LOL
|
||||
- KISS to kiss someone
|
||||
- ROSE to send a rose to someone
|
||||
- Added new command KISS to send a virtual kiss to someone
|
||||
- Started the module, not much here yet.
|
|
@ -1,85 +0,0 @@
|
|||
MoraleServ ChangeLog - Anything we add/remove/fix/change is in here (even our rants)
|
||||
==============================================================================
|
||||
* MoraleServ * Mark (M) * Version 2.23
|
||||
- We now try to read nick, user, host and realname so these can be configured more
|
||||
easily (M)
|
||||
- SET interface for nick/user/host/realname added (M)
|
||||
|
||||
* MoraleServ * Mark (M) * Version 2.22
|
||||
- Use core bot message handler to process commands (M)
|
||||
- Fixed chanalert messages to report bot as sender, not neostats (M)
|
||||
- Code cleaned up to reduce bloat (M)
|
||||
- Removed local module_function table to use core for /VERSION replies (M)
|
||||
|
||||
* MoraleServ * Mark (M) * Version 2.21
|
||||
- Help text cleanup (M)
|
||||
- Added ABOUT command (M)
|
||||
- Changed to use new module export API (M)
|
||||
- Added missing NULL checks for finduser results to avoid referencing NULL pointers (M)
|
||||
- Renamed output module to moraleserv to fix load/unload issues (M)
|
||||
|
||||
* MoraleServ * Fish * Version 2.20
|
||||
- Moved to new Logging Functions
|
||||
|
||||
* MoraleServ * Fish * Version 2.19
|
||||
- Removed a lot of crap that should have never been in MoraleServ (Like SVSJOIN? Log Viewers?)
|
||||
|
||||
* MoraleServ * Shmad * Version Increment -> 2.18
|
||||
= Code overhaul for NeoStats-2.5.0 Beta3 core.
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.17
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* MoraleServ * Shmad * Version Increment -> 2.16
|
||||
- Fixed retarded crash..
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.15
|
||||
- Slight typo in the "User Not Found" message corrected.
|
||||
- "Channel Not Found" Code added (main use in the MSG routine... although used in
|
||||
other parts of the code)
|
||||
- Minimum access 180 raised to 185 (NA level) nfi what I was thinking when I dropped
|
||||
it to 180 ;p
|
||||
- Realised not all routines had the seggie code. All routines now have it
|
||||
- Some older code indented... looks purdy now :P
|
||||
- NA/TA requirement moved to first minimum requirement for the "special" commands
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.14
|
||||
- In line with LoveServ the "User Not Found" Patch was added
|
||||
- Proper Stats.* host name now ;o) (-x)
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.13
|
||||
- Many little things changed for "standard" release.
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.12
|
||||
- MoraleServ Echos unknown topics (in full) to the Services chan - JB's idea (odd little man)
|
||||
- MoraleServ no longer a "Test Code" service.
|
||||
|
||||
* MoraleServ * ^Enigma^ * Version Increment -> 2.1
|
||||
- Changed 185->190 "TechAdmin-Ship" sounds much nicer than "NetAdmin-Ship"... plus I'm a TA,
|
||||
not a NA :P~~~~
|
||||
- Changed 190->185 @ request of shmad. This is a sad day in irc. Lets take a little moment to
|
||||
remember when only the "clever" people could screw the system with raw commands shall we?
|
||||
- Decision made about Version 2.5 -> will no longer be a "Test Code Service". Renaming of
|
||||
NigglesServ to MoraleServ on the agenda but may not happen will V3.0
|
||||
- printfile & unlinkfile added to code... no HELP menu docuementation... too evil for that ;p
|
||||
(Although commands are documented through "HELP PRINTFILE" & "HELP UNLINKFILE")
|
||||
# printfile can open and print any file via PRIVMSG/NOTICE. God I'd hate to be the poor bastard
|
||||
who tries to dump a couple thousand lines lmao. Originaly designed to create a backup of
|
||||
"hostserv.c" on a shell without ftpd (there is proof that Shmad & Me are REALLY coding it! :P)
|
||||
- LOAD & UNLOAD of module now recorded in the log. Useful for uptime calculation (cept for
|
||||
seggies) prolly won't go much further than this lmao.
|
||||
- Overhauls to the entire LOG system. Backup and reset offered. LOGS renamed to VIEWLOG
|
||||
- MSG command changed due to a little abuse problem. Non-Access list people now have a
|
||||
"(MSG issued by xxx)" added to thier MSG command. Hopefully this will deter. Access-Users don't
|
||||
get the attachment ;p
|
||||
- Fixed the "root access denied" for 'normal users' requesting HELP
|
||||
- Added new feature - "WONDERFUL"... sings a little song, makes the user feel special
|
||||
|
||||
Log Started (V2.0.11)
|
||||
|
||||
* Prelim information:
|
||||
MoraleServ orginally started off as something other than the service it is today. Over time,
|
||||
MoraleServ grew into a some what popular "play service". New fuctions were added, both good
|
||||
and evil ;p Version 2.0 saw an increase in the use due to the features and 2.0.11 offered some
|
||||
advanced techie features. 2.0.11 was then renamed to MoraleServ and the "Test Code" was dropped
|
||||
to become the stable 2.1
|
|
@ -1,21 +0,0 @@
|
|||
Program: NeoServ Module for NeoStats 2.x ChangeLog
|
||||
Author: ^Enigma^ <enigma@neostats.net>
|
||||
|
||||
* Version 1.3 * March 8th, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
- Pointed out the ability to send users things ya shouldnt be able to :)
|
||||
|
||||
* Version 1.2 * December 22nd, 2001
|
||||
- More topics Added (now 22 topics)
|
||||
- Logging Function added to monitor usage
|
||||
|
||||
* Version 1.1 * December 22nd, 2001
|
||||
- 15 Help Topics to Date
|
||||
- 'SEND' fucntion added for Net Admins or higher to have
|
||||
NeoServ send a relevant topic to a user
|
||||
|
||||
* Version 1.0 * December 21st, 2001
|
||||
|
||||
- ChangeLog & Core Files Created.... so far today the
|
||||
village idiots are quiet!
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
ConnectServ Module for NeoStats 2.x ChangeLog
|
||||
Shmad & ^Enigma^
|
||||
|
||||
* Version 1.5 * September 12th, 2002
|
||||
- Fixed cosmetic bug reported by eggy (Shmad)
|
||||
- Added NICK watching support for nick changes (Shmad)
|
||||
- Fixed other misc bugs.
|
||||
|
||||
* Version 1.4 * July 17th, 2002
|
||||
- Moved to new Event API (Fish)
|
||||
- Stopped it flooding the net when neo starts up (Fish)
|
||||
|
||||
* Version 1.3 * March 12th, 2002
|
||||
- Code overhaul for NeoStats-2.5 core.
|
||||
|
||||
* Version 1.2 * November 18th, 2001
|
||||
- Add u->mode check for Local Kills (^Enigma^)
|
||||
- Changed LOCAL KILL format to same as GLOBAL format (much nicer..) (Shmad)
|
||||
- Changed KILL code. Local kills prefixed with LOCAL KILL, Globals with GLOBAL KILL (Shmad)
|
||||
- Added Local Kill code. (Shmad)
|
||||
- Fixed Global Kill reason msg (Shmad)
|
||||
|
||||
* Version 1.1 * November 16th, 2001
|
||||
|
||||
- Version 1.1 is ready to be released in next ver of NeoStats
|
||||
- fixed compiler warnings. (Shmad)
|
||||
- Fixed cs_user_modes() segfault. Was in _init() *thwaps niggles* (Shmad)
|
||||
- Updated LoadConf(); to parse quicker. :) (Shmad)
|
||||
- Updated LoadConf(); to only load valid settings!! (Shmad)
|
||||
- Added LoadConfig(); to load connect.db (Shmad)
|
||||
- Command Settings in connect.db loaded upon module load (Shmad)
|
||||
- Command settings now saved to connect.db (^Enigma^)
|
||||
|
||||
* Version 1.0 * November 13th, 2001
|
||||
|
||||
- Version 1.0 is ready to use in the devel NeoStats
|
||||
- ABOUT Added - Little info about service (^Enigma^)
|
||||
- STATUS Added - Check if KILLWATCH, MODEWATCH or SIGNWATCH is active or not (^Enigma^)
|
||||
- KILLWATCH Added - Watch for server or oper /kill's (^Enigma^)
|
||||
- MODEWATCH Added - Watch for users chaning to oper flags or opers changing flags (^Enigma^)
|
||||
- SIGNWATCH Added - Watch for signon/signoffs (^Enigma^)
|
||||
- Started the module, not much here yet. (^Enigma^)
|
|
@ -1,121 +0,0 @@
|
|||
StatServ Module for NeoStats 2.x ChangeLog
|
||||
==============================================================================
|
||||
Shmad & ^Enigma & Fish^
|
||||
(S) denotes Shmad (E) denotes ^Enigma^
|
||||
(F) denotes Fish (M) denotes Mark
|
||||
|
||||
* Revision 1199 * Feb 17, 2004 (M)
|
||||
- SET interface for nick/user/host/realname added (M)
|
||||
|
||||
* Revision 1199 * January 9, 2004 (M)
|
||||
- removed fopen attempt on old system of dl/statserv/html/index.tpl. (M)
|
||||
- improved error message for failed open of template and output file (M)
|
||||
- begin reworking announcement code for wallops (M)
|
||||
- move SERVER join/quit anouncements to ConnectServ since it is not really a
|
||||
StatServ task (M)
|
||||
- New set options LAGALERT and RECORDALERT which allow a user to determine
|
||||
how these alerts are managed 0 none, 1 channel, 2 globops, 3 wallops (M)
|
||||
- Removed MSGTHROTTLE and LAG options. These are superceded by new options
|
||||
MSGINTERVAL, MSGLIMIT, LAGTIME (M)
|
||||
- Fix mem leak from strdup (M)
|
||||
- TLDmap is now using GeoIP from Netmax.com. Will add City and Region/ISP code soon (but requires a paid version of the DB) (F)
|
||||
- Most of the commands were limited to opers, changed back so users can view stats (F)
|
||||
- bug fix for #109 away counts (M)
|
||||
|
||||
* Revision 810 * Nov 23rd, 2003 (M)
|
||||
- change SSMNAME to __module_info.module_name to be consistent with other modules (M)
|
||||
- Use core bot message handler to process commands (M)
|
||||
- Changed SET command so SET LIST displays current settings and SET alone will error (M)
|
||||
- Removed local module_function table to use core for /VERSION replies (M)
|
||||
|
||||
* Revision 791 * Oct 30th, 2003 (F)
|
||||
- Channel stats are now dynamically loaded, and saved as needed. Not loaded into
|
||||
memory at boot time. Should help large networks with lots of channels
|
||||
that experience pingouts every 8 hours!
|
||||
|
||||
* Version 3.10 * Sep 11th, 2003 (F)
|
||||
- Added clientstats to html output (F)
|
||||
- strip colors/underlines etc from client versions (F)
|
||||
- Help text cleanup (M)
|
||||
- Added ABOUT command (M)
|
||||
- Changed to use new module export API (M)
|
||||
|
||||
* Version 3.9 * July 15th, 2003 (F)
|
||||
- Fixed a minor problem with oper counting.
|
||||
|
||||
* Version 3.8 * May 9th, 2003 (F)
|
||||
- Fixed TLDCount for Daily users for Unresolved Domains
|
||||
- Added the ability to recieve client versions from SecureServ and record them.
|
||||
|
||||
* Version 3.7 * April 17th, 2003 (F)
|
||||
- Moved to new logging and conf API
|
||||
- Fixed a wrong usercount on channels with kick
|
||||
|
||||
* Version 3.6 * March 28th, 2003 (F)
|
||||
- Fix a problem with oper counts... something got messed up somewhere
|
||||
|
||||
* Version 3.5 * December 13th, 2002 (F)
|
||||
- StatServ now has the option to only wallop 5 records broken in a particular timeframe.
|
||||
eg, 5 wallops per 5 minutes, any more, and statserv doesn't say a thing.
|
||||
set WALLOP_INTERVAL in neostats.cfg to the interval time
|
||||
- Some Stats that we were collecting was never displayed, added it to the output and html display
|
||||
- DelOldChan was only deleting 1 chan per hour, and could delete chans that were older than 1 day, but still had members. Fixed.
|
||||
- Fixed the ok_to_wallops stuff
|
||||
- Fixed up OperList
|
||||
|
||||
* Version 3.42 * September 3rd, 2002 (S)
|
||||
- Fixed make insall now copies the template too
|
||||
- RESET now just tells you how to properly reset Server Statistics database.
|
||||
- Can ONLY delete stats if the server IS NOT Online.
|
||||
- Changed all levels from 190 to 185 since Unreal users just cant seem to install SR in any
|
||||
event Net/Tech are same level essentially. So internals for SS use 185 as highest level.
|
||||
- Fixed a bug with deloldchan timer where it would only delete one channel per hour! (F)
|
||||
|
||||
* Version 3.41 * July 29th, 2002 (S)
|
||||
- Fixed a bug where channel alerts would get dropped notice changed to chanalert()
|
||||
- Stopped walloping new records on new DB and when syncing to the network (not walloping on syncing only works in statserv is loaded via config file. If loaded via /msg neostats load, then it will yell. Tough. Load it via the config file!)
|
||||
|
||||
* Version 3.4 * July 17th, 2002(F)
|
||||
- Ported to the new Module Event API
|
||||
- Fixed a bug with getting incorrect channel count and channel member count when loaded as a module after neo has already been running
|
||||
- Why the hell was statserv changing the u->is_away structure. StatServ doesn't and shouldn't do that. Fixed (maybe fixes crazy away count bug?)
|
||||
|
||||
* Version 3.3 * May 19th, 2002 (F)
|
||||
- added tldmap to statserv output
|
||||
- fixed htmlstats to write out straight away, instead of buffer, this fixed overflow problems and random crashes on large networks
|
||||
|
||||
* Version 3.2 * March 29th, 2002 (F)
|
||||
- Fixed a bug with segfaulting when no DB existed.
|
||||
- Fixed up help with the most current commands available
|
||||
- Fixed a bug with -1 opers on servers due to serviceroots code
|
||||
- Added tldmap to htmloutput
|
||||
|
||||
* Version 3.1 * February 8th, 2002 (F)
|
||||
- Code overhauls for NeoStats-2.5 Core
|
||||
- Added Channel Statistics for overall time, and daily stats
|
||||
- updated HTML stats to use templates
|
||||
- fixed a few innocent bugs (setting daily uses to Max? hu, Crackhead code (S) :) )
|
||||
- split up statserv into a few diff files, as it was getting un-manageable :)
|
||||
|
||||
* Version 3.0 * January 2nd, 2001
|
||||
- Removed Echos to the shell when starting Neo with SS loaded.. now the rest of the modules.. ugh (S)
|
||||
- Fixed an annoying crash bug caused by strlower (S)
|
||||
- Fixed crash bug in ss_new_user (S)
|
||||
- Fixed bug in findstats()
|
||||
- Overhauled a lot of the older code (S)
|
||||
- Noticed something odd.. looked into it.. just my eyes wiggin out. (S)
|
||||
|
||||
|
||||
* Version 2.1 * December 11th, 2001
|
||||
- Fixed a small DAILY bug where at midnight it would reset to 0
|
||||
we should reset to CURRENT stats at midnight. Now fixed. (S)
|
||||
- Fixed DAILY STATS.. now reports correctly 110% of the time. (S)
|
||||
- This aint too shabby for 3 hours work :)
|
||||
- ServerKills in SERVER info accurate (S)
|
||||
- OperKills in SERVER info accurate (S)
|
||||
- Fixed split counting..works now (S)
|
||||
- added s_user_away(); StatServ now keeps track of users set away. (S)
|
||||
- added s_del_server(); StatServ now decreases Servers when one splits/goes down (S)
|
||||
- Fixed StatServ Crash bug. (S)
|
||||
- Added HTML Stats writeouts. (E)
|
||||
- Started ChangeLog
|
268
doc/old/FAQ
268
doc/old/FAQ
|
@ -1,268 +0,0 @@
|
|||
************************************************************************
|
||||
** NeoStats - IRC Statistical Services **
|
||||
** Copyright (c) 1999-2008 NeoStats Group. All Rights Reserved. **
|
||||
** This program and all associated documentation is free but **
|
||||
** copyrighted software; see the file COPYING for details. **
|
||||
** Homepage: http://www.neostats.net/ **
|
||||
************************************************************************
|
||||
|
||||
Frequently Asked Questions (FAQ)
|
||||
--------------------------------
|
||||
|
||||
1 General questions
|
||||
1.1 What is NeoStats?
|
||||
1.2 Will there ever be a Windows Version of NeoStats?
|
||||
1.3 What IRCD does the team recommend?
|
||||
1.4 What Services package does the team recommend?
|
||||
1.5 What Operating System does NeoStats Run on?
|
||||
1.6 How do I uncompress the NeoStats-x.x.x.tar.gz file?
|
||||
2 Compiling, configuring and installation questions
|
||||
2.1 When I type compile nothing happens, whats wrong?
|
||||
2.2 Typing stats says no file/directory, how do I load it?
|
||||
2.3 Typing neostats says no file/directory, how do I load it?
|
||||
2.4 When NeoStats tries to connect it says "No N Line!" How do I
|
||||
add one?
|
||||
3 Module questions
|
||||
3.1 I upgraded NeoStats and now it crashes when it loads modules
|
||||
like OPSB.
|
||||
3.2 When I started NeoStats for the first time it flooded me with
|
||||
new records. Why does it do this?
|
||||
3.3 How do I install modules I downloaded from your website?
|
||||
3.4 How do I load modules I downloaded and installed from your
|
||||
website?
|
||||
3.5 When I compile modules I get a Pointer Type Error HELP!
|
||||
3.6 What is 'sumyungguy'
|
||||
3.7 When I try to LOAD or UNLOAD modules I get an ACCEDD DENIED
|
||||
msg! why?
|
||||
3.8 Will the modules with NeoStats 2.5.0 work on older versions?
|
||||
4 Coding questions
|
||||
4.1 Does NeoStats API support multiple Nicks?
|
||||
5 Bugs, suggestions, contributions
|
||||
5.1 I have a really good idea for a module, will you make it?
|
||||
5.2 Can I send you guys some money for this?
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
1. General Questions
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.1 What is NeoStats?
|
||||
|
||||
NeoStats is based on GeoStats by Johnathan George net@lite.net.
|
||||
NeoStats is a set of IRC Services that can perform many many
|
||||
different functions. Additionally, NeoStats can be easily
|
||||
expanded with "modules" that can provide new functionality.
|
||||
This means that you can configure neostats to only load what
|
||||
you need.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.2 Will there ever be a Windows Version of NeoStats?
|
||||
|
||||
The NeoStats team has considered porting a windows platform of
|
||||
NeoStats on many occasions. At this stage the code needs a number
|
||||
of changes so although we one day hope to provide a Windows version,
|
||||
don't be surprised if this is some time away. Once we have the
|
||||
remaining bugs ironed out, a Windows version has a 50% chance of
|
||||
happening. Don't ask us when, we don't know.
|
||||
|
||||
The main NeoStats core will now compile and run on Windows using
|
||||
cygwin but modules currently do not work.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.3 What IRCD does the team recommend?
|
||||
|
||||
The NeoStats Team recommend that you use a supported IRCd package.
|
||||
NeoStats currently supports Unreal, Ultimate 2.x.x, Ultimate 3.x.x,
|
||||
Hybrid7, Bahamut, Mystic, Quantum and our own NeoIRCd.
|
||||
|
||||
Check ./configure --help and the README for more information.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.4 What Services package does the team recommend?
|
||||
|
||||
NeoStats has been tested with most major Services packages, such as
|
||||
Epona, Anope, Daylight II, Magik, IRC Services.
|
||||
Other Services packages may also work with NeoStats.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.5 What Operating System does NeoStats run on?
|
||||
|
||||
NeoStats runs under any Linux/Unix based environment and BSD.
|
||||
The main NeoStats core will compile and run on Windows using cygwin
|
||||
but modules currently do not work. See 1.2 for more information on
|
||||
Windows.
|
||||
NeoStats DOES NOT RUN ON MACINTOSH!!!
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
1.6 How do I uncompress the NeoStats-x.x.x.tar.gz file?
|
||||
|
||||
In your shell type:
|
||||
|
||||
tar xvfz NeoStats-x.x.x.tar.gz
|
||||
|
||||
The filename will vary depending on the version you run of NeoStats.
|
||||
Change the x.x.x to match your filename e.g. NeoStats2.5.3.tar.gz.
|
||||
|
||||
On systems that run an old version of tar you should use:
|
||||
|
||||
gzip -d NeoStats-x.x.x.tar.gz
|
||||
tar xvf NeoStats-x.x.x.tar.gz
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
2. Compiling, configuring and installation questions
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2.1 When I type compile nothing happens, whats wrong?
|
||||
|
||||
You have to type "make" without the quotes.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2.2 Typing stats says no file/directory, how do I load it?
|
||||
|
||||
stats is the way you used to load older versions of NeoStats. Current
|
||||
versions use neostats.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2.3 Typing neostats says no file/directory, how do I load it?
|
||||
|
||||
On some systems you can't just type "neostats" you need to start it
|
||||
with "./neostats" without the quotes.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
2.4 When NeoStats tries to connect it says "No N Line!" How do I add one?
|
||||
|
||||
Edit your ircd.conf file and and add C/N lines for StatServ, also
|
||||
add U: lines for it while your there. If you can't figure out how
|
||||
to add them refer to the documentation that came with your IRCd.
|
||||
We cannot help you to set up your IRCd.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
3. Module questions
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.1 I upgraded NeoStats and it crashes when it loads modules like OPSB.
|
||||
|
||||
You should rebuild and reinstall modules when you upgrade NeoStats.
|
||||
See the README file for more information on upgrading and
|
||||
installing.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.2 When I started NeoStats for the first time it flooded me with new
|
||||
records. Why does it do this?
|
||||
|
||||
When you first install it, there are no Statistics so it creates
|
||||
them when it is first run. That is what you are experiencing. Once
|
||||
StatServ has generated statistics for the network, these messages
|
||||
will stop and you will only see them when new records are made.
|
||||
if your network is forever growing, you can disable these "Record"
|
||||
wallops by typing "/msg statserv set msgthrottle off"
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.3 How do I install modules I downloaded from your website?
|
||||
|
||||
Refer to the instructions that come with the module to configure,
|
||||
build and install the module.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.4 How do I load modules I downloaded and installed from your website?
|
||||
|
||||
To load the module, from an IRC client type '/msg NeoStats load
|
||||
modulename' where 'modulename' is the name of the new module or
|
||||
add 'LOAD_MODULE modulename' in the Module section of the
|
||||
neostats.cfg file then restart NeoStats.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.5 When I compile modules I get a Pointer Type Error HELP!
|
||||
|
||||
The solution to this problem is to simply ignore the message
|
||||
the message does not affect the running of the module or NeoStats.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.6 What is 'sumyungguy'
|
||||
|
||||
sumyungguy is the spam module. It no longer changes its name and
|
||||
just it sits and waits for a user to spam it before it echos
|
||||
the spammer's message, nick & hostname information. If you really
|
||||
want to catch spammers, SecureServ is much more effective.
|
||||
SecureServ can be downloaded as a seperate module from the
|
||||
NeoStats website.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.7 Why do I get ACCESS denied when I try to LOAD or UNLOAD modules?
|
||||
|
||||
To operate NeoStats you must have the correct access privileges.
|
||||
You should check your oline flags before you try the command.
|
||||
|
||||
NeoStats works on a Level System, for LOAD/UNLOAD, you need at
|
||||
least level 185. /msg neostats level tells you what your current
|
||||
level is.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
3.8 Will the modules with NeoStats 2.5.0 work on older versions?
|
||||
|
||||
NO! Modules on the website are for this version ONLY. They will
|
||||
NOT function with older versions of NeoStats. Make sure you are
|
||||
using ONLY the most current modules from our Website. We also
|
||||
recommend you upgrade to the latest version of NeoStats.
|
||||
|
||||
The team decided to make a large number of changes to NeoStats,
|
||||
causing the development version NeoStats-2.1 to be incremented
|
||||
to NeoStats-2.5. In doing this, code used for the modules was
|
||||
slightly modified and therefore the older modules will not work
|
||||
on the new version of NeoStats. And vice versa.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
4. Coding questions
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
4.1 Does NeoStats API support multiple Nicks?
|
||||
|
||||
The short answer to this question is 'yes'. Some time back
|
||||
development started on the NeoStats Channel Services to replace
|
||||
the Epona services currently used and be fully intergrated with
|
||||
NeoStats. During this design a module with multiple nick's was
|
||||
designed and so was a patch to the API which enabled this feature.
|
||||
At this stage there are no plans to release the multiple nicks API,
|
||||
but rather integrate it into the NeoStats-2.5 release.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
5. Bugs, suggestions, contributions
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
5.1 I have a really good idea for a module, will you make it?
|
||||
|
||||
It really depends on what the module is for... but we will take
|
||||
suggestions and comments and probably end up doing them :P A good
|
||||
example of this is the HTML stats output in StatServ and the design
|
||||
of HostServ.
|
||||
|
||||
To make suggestions visit http://www.neostats.net/boards. Please
|
||||
search the board first to see if your suggestion has already been
|
||||
made.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
5.2 Can I send you guys some money for this?
|
||||
|
||||
Yes, in small unmarked bills. ;)
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
************************************************************************
|
||||
** This document was last updated on February 9th, 2004 by M and is **
|
||||
** based on documents originally created by Shmad and Fish. **
|
||||
************************************************************************
|
162
doc/old/FAQ.pt
162
doc/old/FAQ.pt
|
@ -1,162 +0,0 @@
|
|||
NeoStats - Perguntas Mais Frequentes (FAQ)
|
||||
-------------------------------------------
|
||||
http://www.neostats.net
|
||||
|
||||
|
||||
**********************************************************************
|
||||
* O NeoStats é baseado no GeoStats por Johnathan George net@lite.net *
|
||||
* O NeoStats é um conjunto de serviços estatísticos de IRC que *
|
||||
* monitorizam os recordes de utilizadores, netsplit de servidores *
|
||||
* o número de utilizadores/operadores online e muito mais *
|
||||
**********************************************************************
|
||||
|
||||
|
||||
|
||||
P: Não consigo descobrir como descomprimir o ficheiro NeoStats-x.x.x.tar.gz, como é que eu faço?
|
||||
|
||||
R: Na sua shell escreva: tar xvfz NeoStats-x.x.x.tar.gz
|
||||
|
||||
|
||||
Q: Escrevo compile no directório mas não está a funcionar, qual é o problema?
|
||||
|
||||
A: Tem que escrever "make" (sem as aspas).
|
||||
|
||||
|
||||
Q: Escrevo stats mas ele diz "no such file or directory", como é que eu o inicio?
|
||||
|
||||
A: Em alguns sistemas não pode escrever só "stats", tem que ser "./stats" (sem as aspas).
|
||||
|
||||
|
||||
Q: Ok, iniciei-o, mas quando ele se tenta ligar ao meu servidor, aparece uma mensagem a dizer
|
||||
"No N Line!". Como é que eu adiciono uma?
|
||||
|
||||
A: Edite o ficheiro ircd.conf e adicione as C/N-Lines para o StatServ. Adicione também U-Lines
|
||||
Se não conseguir descobrir como as adicionar, por favor veja a documentação que veio com o seu IRCd.
|
||||
|
||||
|
||||
Q: Quando iniciei o NeoStats pela primeira vez, ele "inundou-me" de novos recordes. Porque é que ele faz isto?
|
||||
|
||||
A: Quando o instala pela primeira vez não existem estatísticas, por isso ele cria-as quando é iniciado pela primeira vez.
|
||||
|
||||
|
||||
Q: Como é que eu instalo os módulos os quais fiz o download do vosso site?
|
||||
|
||||
A: ** NOTE: De momento os módulos listados no WEBSITE NÃO funcionarão com o
|
||||
NeoStats 2.5.0 Beta.
|
||||
Faça o upload do módulo no directório \2module\2
|
||||
Escreva:
|
||||
a) "tar xvfz Module-x.x.tar.gz"
|
||||
OU
|
||||
b) "gzip -d Module-x.x.tar.gz" seguido de "tar xvf Module-x.x.tar"
|
||||
Uma vez feito, entre no directório onde os ficheiros foram descomprimidos
|
||||
escreva "make" (Ignore quaisquer erros que apareçam)
|
||||
Numa janela de IRC escreva "/msg NeoStats load modulename" onde "modulename"
|
||||
é o nome do directório para o qual o módulo foi descomprimido.
|
||||
|
||||
Nota: Uma vez que o módulo tenha sido "feito", pode fazer com que o módulo carregue automáticamente
|
||||
quando o NeoStats é carregado, editando o ficheiro stats.cfg. Adicionando "LOAD_MODULE modulename"
|
||||
na secção dos módulos irá assegurar que isto aconteça, da próxima vez que o NeoStats for carregado.
|
||||
|
||||
|
||||
Q: Quando faço a compilação de módulos, aparece um erro "Pointer Type Error". AJUDA!
|
||||
|
||||
A: A solução para este problema é simplesmente ignorar a mensagem,
|
||||
ela não afecta o bom funcionamento do módulo ou do NeoStats.
|
||||
|
||||
|
||||
Q: O que é o "sumyungguy"
|
||||
|
||||
A: O "sumyungguy" é o módulo de spam. Já não muda o seu nome...
|
||||
Em vez disso, ele espera que um utilizador lhe envie spam,
|
||||
e reproduz a mensagem do spammer, informação de nickname e hostname.
|
||||
|
||||
|
||||
Q: Que IRCd e serviços é que a equipa NeoStats recomenta ?
|
||||
|
||||
A: A equipa NeoStats recomenda o Unreal IRCd e o Ultimate IRCd,
|
||||
pois estes são os únicos IRCd's suportados. Veja
|
||||
./configure --help para mais informação.
|
||||
Também recomendamos os serviços epona, apesar do NeoStats também funcionar
|
||||
com outros serviços, como é o caso dos serviços Daylight II.
|
||||
Posterior suporte para IRCd's inclui Hybrid, Bahamut e IRCu.
|
||||
|
||||
|
||||
Q: Em que sistemas operativos corre o NeoStats?
|
||||
|
||||
A: O NeoStats corre melhor em qualquer ambiente Linux/Unix.
|
||||
O NeoStats corre agora correctamente em sistemas BSD.
|
||||
O NeoStats NÃO CORRE EM MACINTOSH OU WINDOWS!!!
|
||||
|
||||
|
||||
Q: O API do NeoStats suporta múltiplos nicks?
|
||||
|
||||
A: A resposta curta para esta pergunta é "sim". Há algum tempo atrás
|
||||
o desenvolvimento iniciou-se no Serviço de canais do NeoStats
|
||||
para substituir os serviços epona, de momento utilizado e totalmente
|
||||
suportado pelo NeoStats. Durante este design, um módulo com múltiplos
|
||||
nicks foi desenhado assim como uma patch para o API, que activava esta
|
||||
função. Nesta altura não existem planos para criar um API para múltiplos
|
||||
nick, mas sim integrá-la no NeoStats-2.5.
|
||||
|
||||
|
||||
Q: Tenho uma ideia excelente para um módulo, irão fazê-lo?
|
||||
|
||||
A: Isso depende realmente na função do módulo... mas aceitamos
|
||||
sugestões e comentário, e provavelmente acabaremos por fazê-los :P
|
||||
Um bom exemplo disto é o output das estatísticas no StatServ para
|
||||
um ficheiro HTML, e o design do HostServ.
|
||||
PARA FAZER SUGESTÕES: http://www.neostats.net/boards
|
||||
|
||||
|
||||
Q: Quando tento fazer o LOAD ou o UNLOAD de módulos, recebo uma mensagem a dizer "ACCEDD DENIED"! Porquê?
|
||||
|
||||
A: Para controlar o NeoStats você tem de ter previlégios de Tech-Admin ou Net-Admin
|
||||
Pode querer verificar essas flags antes de usar o comando.
|
||||
|
||||
Os antigos standards para o NeoStats era "Tech Admin" ou superior...
|
||||
Esta flag está a desaparecer e nas novas versões do NeoStats,
|
||||
o novo standard é "Net Admin" ou superior.
|
||||
|
||||
|
||||
Q: Irá haver uma versão Windows do NeoStats?
|
||||
|
||||
A: A equipa NeoStats tem considerado portar o NeoStats para
|
||||
a plataforma Windows por diversas vezes. Nesta altura
|
||||
achamos que vamos criar uma versão Windows da versão que
|
||||
sairá em breve (NeoStats-2.5). Estamos, de momento, no
|
||||
processo de sintonia fina e debugging do novo e antigo
|
||||
código do NeoStats. De qualquer maneira, não se surpreenda
|
||||
se não houver uma versão Windows disponível até alguns
|
||||
releases posteriores. Uma vez tendo os bugs restantes
|
||||
irradicados, uma versão para Windows tem 50% de hipóteses
|
||||
de existir.
|
||||
|
||||
|
||||
Q: Os módulos que vêm com o NeoStats 2.5.0 funcionam em versões anteriores?
|
||||
|
||||
A: NÃO! Estes módulos são EXCLUSIVAMENTE para esta versão. Eles NÃO irão
|
||||
funcionar com versões anteriores do NeoStats. Certifique-se que está a
|
||||
user APENAS os módulos mais actuais do nosso website.
|
||||
** NOTA: Utilizadores da versão Beta NÃO FAÇAM O DOWNLOAD DOS MÓDULOS
|
||||
DO NOSSO SITE, ELES SÃO PARA O NEOSTATS 2.0.13 E NÃO IRÃO
|
||||
FUNCIONAR COM O NEOSTATS 2.5.0
|
||||
|
||||
A equipa decidiu fazer um grande número de mudanças no NeoStats,
|
||||
provocando o desenvolvimento da versão NeoStats-2.1 ser incrementado
|
||||
para o NeoStats-2.5. Fazendo isto, o código usado para os módulos
|
||||
foi ligeiramente modificado e por isso os módulos antigos não irão
|
||||
funcionar na nova versão do NeoStats. E vice-versa.
|
||||
|
||||
|
||||
Q: Posso enviar-lhes algum dinheiro por isto?
|
||||
|
||||
A: Sim, em pequenas notas não marcadas. ;)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NeoStats FAQ - Última actualização - Março 28, 2002 7:32 AM PST - Autor: Shmad
|
||||
Traduzido por ErroR|51
|
||||
(c) 1999-2002 Codeworks. All Rights Reserved.
|
||||
http://www.neostats.net
|
|
@ -1,148 +0,0 @@
|
|||
Manual de Configuração do NeoStats 2.x
|
||||
--------------------------------------
|
||||
Este documento explica como INSTALAR e CONFIGURAR o NeoStats.
|
||||
Se tiver algum problema NÃO presente em um destes documentos de ajuda,
|
||||
por favor dirija-se ao nosso canal de iRC em irc.neostats.net e nós
|
||||
teremos todo o prazer em o ajudar.
|
||||
|
||||
-Shmad
|
||||
http://www.neostats.net
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* O NeoStats é um serviço de estatísticas de IRC que monitorizam recordes *
|
||||
* de utilizadores, netsplits, o número de utilizadores/operadores online *
|
||||
* e muito mais. *
|
||||
* As versões 2.x permitem que os módulos sejam programmed e adicionados *
|
||||
* ao NeoStats para melhorar a funcionalidade e costumizar o aspecto da *
|
||||
* sua rede e cópia do NeoStats. *
|
||||
* NeoStats to increase functionability and to customize the look and *
|
||||
* feel of your network and your copy of NeoStats. *
|
||||
***************************************************************************
|
||||
|
||||
Parabéns por ter feito o download do NeoStats, um dos mais poderosos e
|
||||
robustos programas estatísticos de IRC do mercado. Este manual de configuração
|
||||
irá iniciá-lo no uso do NeoStats. Se tiver algumas questões que eu não
|
||||
referi neste manual, por favor visite-nos em irc.neostats.com e entre no canal
|
||||
#NeoStats e faça a sua pergunta. Se ninguém estiver disponível, pode enviar um
|
||||
memo para Shmad com a(s) sua(s) pergunta(s) e o seu endereço de email e nós
|
||||
contactar-lo-emos assim que possível.
|
||||
|
||||
|
||||
[1] Iniciando.
|
||||
|
||||
Primeiro, vai querer descomprimir o NeoStats. Para tal escreva o segunte:
|
||||
|
||||
tar xvfz NeoStats2.0.tar.gz (isto pode variar dependentemente da versão do NeoStats,
|
||||
modifique "NeoStats2.0.tar.gz" de modo a condizer com o
|
||||
ficheiro que possui)
|
||||
|
||||
** Nota: Para alguns sistemas quen não estejam a correr uma versão actualizada do tar,
|
||||
poderá ser necessário fazer o seguinte:
|
||||
gzip -d NeoStats2.0.tar.gz
|
||||
tar xvf NeoStats2.0.tar
|
||||
|
||||
|
||||
|
||||
[2] Correndo o configure
|
||||
|
||||
Wow, funcionou! Deverá ter agora uma directoria chamada NeoStats-2.0.11
|
||||
Agora escreva:
|
||||
|
||||
cd NeoStats2.0.11
|
||||
|
||||
A linha de comando deverá ser algo parecido a:
|
||||
[shmad@coderz NeoStats2.0.11]$
|
||||
|
||||
Agora escreva:
|
||||
./configure (isto é "CASE sensitive", lembre-se disso - tudo é)
|
||||
|
||||
NOTA ADICIONAL: Se usar UnrealIRCd use --enable-unreal
|
||||
Ultimate use --enable-ultimate
|
||||
Ultimate3 use --enable-ultimate3
|
||||
|
||||
|
||||
Agora o script irá verificar se todos os programas necessários para correr
|
||||
o NeoStats estão instalados no seu sistema. Uma pequena nota, para aqueles
|
||||
que me enviaram emails "paranóicos", o NeoStats NÃO vê o balanço da sua
|
||||
conta bancária, nem pode.
|
||||
|
||||
|
||||
|
||||
[3] Compilando o NeoStats
|
||||
|
||||
Ok, agora deverá estar de volta à linha de comando, agora escreva:
|
||||
|
||||
make
|
||||
|
||||
ele irá pelo código fonte e compilá-lo num ficheiro binário executável.
|
||||
Se vir alguns warnings, por favor ignore-os - estamos a tratar deles.
|
||||
|
||||
|
||||
[4] Configurando o ficheiro neostats.cfg
|
||||
|
||||
Escreva:
|
||||
|
||||
./makeconf
|
||||
|
||||
Isto irá levá-lo através do "criador" do neostats.cfg. É recomendado após
|
||||
correr o makeconf, verificar o ficheiro neostats.cfg manualmente.
|
||||
Isto pode ser feiro escrevendo:
|
||||
|
||||
pico neostats.cfg
|
||||
|
||||
O ficheiro neostats.cfg é bastante compreensível, se tiver alguma questão,
|
||||
esteja à vontade para me perguntar.. Uma vez terminada a edição do ficheiro
|
||||
carreguem em Ctrl-X e depois em Y e finalmente em enter para salvar o ficheiro.
|
||||
|
||||
|
||||
[5] Compilando os módulos
|
||||
|
||||
Escreva:
|
||||
|
||||
cd dl
|
||||
make
|
||||
|
||||
Isto irá compilar TODOS os módulos que o NeoStats pode usar.
|
||||
|
||||
|
||||
[6] Editando o ficheiro niconfig.db (APENAS SE DESEJAR UTILIZAR O NetInfo)
|
||||
|
||||
Ok estamos quase a acabar este trabalho árduo :)
|
||||
|
||||
Escreva:
|
||||
|
||||
cd ~/NeoStats-2.0.11/data
|
||||
pico niconfig.db (uma vez mais, é "CASE SenSiTiVe")
|
||||
|
||||
Este ficheiro é também bastante compreensível. Uma vez terminada a edição deste
|
||||
ficheiro, carregue em Ctrl-X e depois em Y e finalmente em enter para salvar o
|
||||
ficheiro.
|
||||
|
||||
[7] Correndo o NeoStats
|
||||
|
||||
Ok, se tudo correu bem, está agora preparado para correr o NeoStats. Para correr
|
||||
o NeoStats a partir da shell, terá que escrever:
|
||||
|
||||
cd ~/NeoStats-2.0.11
|
||||
./neostats
|
||||
|
||||
|
||||
Ele deverá "linkar-se" e sincronizar-se com o seu servidor, numa questão de segundos.
|
||||
|
||||
** Nota: Certifique-se que o(s) seu(s) servidor(es) têm U: Lines para o servidor
|
||||
** do NeoStats.
|
||||
Por favor, por favor, por favor! Certifique-se que adicionou as C: e N: Lines
|
||||
correctamente no seu servidor!
|
||||
|
||||
|
||||
** NOTA FINAL ** ** NOTA FINAL ** ** NOTA FINAL ** ** NOTA FINAL **
|
||||
EU NÃO O IREI AJUDAR A ADICIONAR AS C: N: E U: LINES AO SEU SERVIDOR,
|
||||
VOCÊ DEVERÁ LER A DOCUMENTAÇÃO DO IRCd SE NÃO O SABE FAZER!!!
|
||||
|
||||
|
||||
|
||||
Manual de Configuração do NeoStats - Última actualização - 08 de Fevereiro de 2001 02:20 AM PST - Autor Shmad
|
||||
Traduzido por ErroR|51
|
||||
(c) 1999-2001 Codeworks. Todos os direitos reservados.
|
||||
http://www.neostats.net
|
|
@ -1,865 +0,0 @@
|
|||
******************************************************************************
|
||||
** NeoStats - ** Statistique De Services d'IRC **
|
||||
** Groupe 1999-2004 De Copyright De ** (c) NeoStats. Tous droits réservés. **
|
||||
** le ce programme et toute la documentation associée est libre mais **
|
||||
** logiciel garanti les droits d'auteur par; voyez le fichier COPIER pour **
|
||||
** des détails. **
|
||||
** homepage de HTTP://www.neostats.net **
|
||||
******************************************************************************
|
||||
|
||||
Merci de télécharger NeoStats.
|
||||
|
||||
NeoStats est un ensemble puissant et extensible de *des services* pour l'IRC.
|
||||
Par Services, nous ne voulons pas dire NickServ/Chanserv etc.. mais services
|
||||
supplémentaires. Ces services supplémentaires incluent des choses comme
|
||||
StatServ qui vous donne statistiques sur le nombre d'users/operators/
|
||||
channels/servers, et MoraleServ, ce qui est a * amusement * module, pour
|
||||
envoyer les messages drôles aux utilisateurs, et modules de service. Quelques
|
||||
modules ont une fonction utile sur le votre réseau, d'autres modules sont
|
||||
développés pour l'amusement, et pour faire votre IRC réseau plus attrayant
|
||||
aux utilisateurs (qu'est à dire ce qui il tout au sujet de la droite ?,
|
||||
Utilisateurs d'IRC ?)
|
||||
|
||||
Avec la version de 2.5 séries de NeoStats, plusieurs changements ont pris
|
||||
l'endroit a comparé à la vieille version de NeoStats 2.0 séries (ne me
|
||||
demandez pas ce qui est arrivé aux versions 2.1. 2.2. 2.3 ou 2.4. Je ne
|
||||
sais pas !)
|
||||
|
||||
Une liste détaillée de changements peut être trouvée dans le fichier de
|
||||
ChangeLog, mais a le bref sommaire est :
|
||||
- support de ServiceRoots
|
||||
- fichiers externes de MOTD
|
||||
- protection de segfault de module
|
||||
- support de la croix IRCD. Soutien de plus d'IRCDs que juste irréel
|
||||
- supports de StatServ vidant des statistiques à un fichier de HTML
|
||||
pour la sortie (la sortie du fichier de HTML est basée sur un
|
||||
descripteur)
|
||||
- changements au module api qui le rendent plus gentil
|
||||
- Support De la Manche !
|
||||
- StatServ supporte des statistiques de la Manche maintenant !
|
||||
- beaucoup difficultés et changements d'anomalie au noyau interne
|
||||
de NeoStats
|
||||
- beaucoup de mises à jour aux divers modules
|
||||
|
||||
HTTP de visite ://www.neostats.com pour les dernières nouvelles et mises
|
||||
à jour de NeoStats.
|
||||
|
||||
Veuillez lire toute la documentation incluse avec NeoStats soigneusement.
|
||||
les documents contiennent toute l'information que vous devez obtenir le
|
||||
fonctionnement de NeoStats sur votre réseau. Ces documents incluent README,
|
||||
et tous les documents dans le répertoire de Doc..
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Toute la documentation s'applique à la version 2.5.6 et plus haut. Pour
|
||||
plus vieux les versions consultent la documentation avec cette version
|
||||
ou la considèrent évolution. Les nouvelles versions de NeoStats ont
|
||||
beaucoup de nouveaux dispositifs et anomalie difficultés. Nous ne pouvons
|
||||
pas fournir le support pour des versions plus anciennes de NeoStats.
|
||||
|
||||
Suivret un guide rapide de la documentation principale de NeoStats :
|
||||
|
||||
README - Ce fichier. Comment installer et configurer NeoStats
|
||||
et l'information de support.
|
||||
DOCS/USERMAN - Manuel pour l'exécution d'exécution de NeoStats. Vous
|
||||
devriez lisez ceci quand vous avez NeoStats fonctionner
|
||||
pour information sur la façon dont utiliser NeoStats.
|
||||
DOCS/FAQ - Questions fréquemment posées au sujet de NeoStats.
|
||||
RELNOTES - Libérez les notes au sujet de la version en cours. C'est
|
||||
affiché pendant le procédé mais vous d'installation
|
||||
devriez référez-vous à elle si vous avez des problèmes.
|
||||
ChangeLog - informations sur ce qui a changé entre les versions.
|
||||
Consultez ce document pour des informations détaillées
|
||||
sur changements. Supplémentaire, quelques modules
|
||||
contiennent ChangeLogs dans leurs répertoires
|
||||
(e.g., dl/statserv) ainsi vous devriez consultez ces
|
||||
documents aussi bien.
|
||||
README.kptool - description et instructions pour mettre à jour
|
||||
Base de données interne de NeoStats et configuration
|
||||
dynamique. POUR LES UTILISATEURS AVANÇÉS SEULEMENT!
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table des matières
|
||||
|
||||
|
||||
1. NeoStats d'installation et de configuration
|
||||
1.notes de 1 général
|
||||
1.2 Obtenant Commencé.
|
||||
1.3 en exécutant configurez
|
||||
1.4 NeoStats De Compilation
|
||||
1.5 NeoStats D'Installation
|
||||
1.6 installant les neostats.cfg
|
||||
1.7 modules supplémentaires de compilation
|
||||
1.8 NeoStats Fonctionnant
|
||||
1.9 notes pour des upgraders
|
||||
2. L'Information De Support
|
||||
2.1 avant d'entrer en contact avec le support
|
||||
2.2 où obtenir le support
|
||||
2.3 ce qui pour fournir quand demandant le support.
|
||||
3. Contributions
|
||||
|
||||
|
||||
1. NeoStats d'installation et de configuration
|
||||
---------------------------
|
||||
|
||||
Cette section explique comment installer et configurer NeoStats. Nous
|
||||
recommandez que vous avez lu cette section dedans complètement avant
|
||||
l'essai d'installer NeoStats.
|
||||
|
||||
Si vous faites ne pas adresser n'importe quels problèmes en cela ou
|
||||
d'autres documents, veuillez voir la section de support pour la façon
|
||||
nous contacter pour l'aide.
|
||||
|
||||
|
||||
1.notes de 1 général
|
||||
---------------------------
|
||||
|
||||
Tous les commandes et noms de fichier sont cas sensible. Ceci signifie
|
||||
cela NeoStats, les neostats et les NEOSTATS sont tous différentes
|
||||
choses. Quand des commandes tapantes vous devriez utiliser le même cas
|
||||
de la manière prévue en cela le fichier ou les choses ne fonctionnera
|
||||
pas correctement.
|
||||
|
||||
|
||||
1.2 Obtenant Commencé
|
||||
---------------------------
|
||||
|
||||
D'abord, vous avez besoin d'uncompress NeoStats. Pour faire ce type ce
|
||||
qui suit :
|
||||
|
||||
xvfz NeoStats2 de goudron.5.X.goudron.gz
|
||||
|
||||
Ceci vous changera selon la version passage de NeoStats. Changez
|
||||
X dans NeoStats2.5.X.goudron.gz pour apparier votre nom de fichier e.g.
|
||||
|
||||
NeoStats2.5.6.goudron.gz
|
||||
|
||||
Pour les systèmes qui n'exécutent pas une nouvelle version de goudron
|
||||
vous devez faire ceci :
|
||||
|
||||
gzip - d NeoStats2.5.X.tar.gz
|
||||
tar xvf NeoStats2.5.X.tar.gz.
|
||||
|
||||
|
||||
1.3 en exécutant configurez
|
||||
---------------------------
|
||||
|
||||
Nous avons deux méthodes pour configurer NeoStats. Notre séquence type
|
||||
de config est la voie la plus rapide et la plus facile de configurer
|
||||
NeoStats.
|
||||
|
||||
Pour exécuter des config, vous devez d'abord changer en le répertoire
|
||||
où vous NeoStats non comprimé. e.g.
|
||||
|
||||
Cd ~/NeoStats2.5.5
|
||||
|
||||
Votre demande devrait sembler quelque chose comme :
|
||||
|
||||
[ user@host NeoStats2.5.5]
|
||||
|
||||
Maintenant type :
|
||||
|
||||
./Config
|
||||
|
||||
Répondez aux questions et laissez la séquence type configurer tout
|
||||
pour vous. Si vous choisissez d'utiliser des config, vous pouvez
|
||||
maintenant sauter à la section 1.4 compilant NeoStats. Si vous avez
|
||||
besoin de plus de contrôle de la configuration, vous devriez
|
||||
exécutez configurent directement comme détaillé ci-dessous.
|
||||
|
||||
La séquence type de configuration a été changée a comparé à des
|
||||
versions et à vous plus âgés la nécessité s'assurent maintenant
|
||||
que vous fournissez les bons arguments pour configurer.
|
||||
|
||||
Pour exécuter configurez ceci, vous devez d'abord changer en le
|
||||
répertoire où vous NeoStats non comprimé. e.g.
|
||||
|
||||
Cd ~/NeoStats2.5.5
|
||||
|
||||
Votre demande devrait sembler quelque chose comme :
|
||||
|
||||
[ user@host NeoStats2.5.5]
|
||||
|
||||
Maintenant type :
|
||||
|
||||
./configure [ options ]
|
||||
|
||||
Vous devriez lire ci-dessous pour les options que vous devez
|
||||
passer pour configurer.
|
||||
|
||||
Configurations requises :
|
||||
|
||||
|
||||
Support d'IRCD :
|
||||
Pour indiquer l'IRCD que vous compilez pour. e.g. :
|
||||
|
||||
--enable-unreal - permettez le support irréel d'IRCD
|
||||
|
||||
--enable-ultimate2 - permettez 2 finals.X.X support d'IRCD
|
||||
|
||||
--enable-ultimate3 - permettez 3 finals.X.X support d'IRCD
|
||||
|
||||
--enable-hybrid7 - permettez le support de Hybrid7 IRCD
|
||||
|
||||
--enable-neoircd - permettez le support de NeoIRCd IRCD
|
||||
|
||||
--enable-bahamut - permettez le support de Bahamut IRCD
|
||||
|
||||
--enable-mystique - permettez le support de la mystique IRCD
|
||||
|
||||
--enable-tranche de temps - permettez le support de Quantum IRCD
|
||||
|
||||
Note : au moment de la version de cette version de NeoStats finale
|
||||
3.X.X était toujours dans l'alpha, il est possible que la
|
||||
compatibilité Ultimate3 pourrait se casser dans de futures
|
||||
versions de final pendant qu'il mûrit.
|
||||
|
||||
|
||||
Configurations facultatives :
|
||||
--------------------------------------
|
||||
|
||||
Système De Privilège :
|
||||
|
||||
Initialement, NeoStats a été basé sur des indicateurs d'opérateur sur
|
||||
un réseau. Si vous a eu TechAdmin sur irréel, on vous a fondamentalement
|
||||
permis la pleine commande de Neostats. Maintenant cependant, vous pouvez
|
||||
permettre ce qui s'appelle External Authentification. Ceci permet
|
||||
différentes voies du privilège de NeoStats système. Les options
|
||||
actuellement disponibles sont :
|
||||
|
||||
-- permettez-auth=sr
|
||||
|
||||
Ceci permet une option de ServiceRoots, quel un utilisateur doit être
|
||||
identifié à les services (avec l'indicateur de +r) et eux auront plein
|
||||
accès à NeoStats.
|
||||
|
||||
Si vous n'indiquez pas --enable-auth alors NeoStats retourne de
|
||||
nouveau au vieux système de privilège de NeoStats, là où
|
||||
l'authentification est basée sur les indicateurs de l'utilisateur
|
||||
(+oOANs etc..).
|
||||
|
||||
Support De Modules :
|
||||
|
||||
NeoStats a un ensemble d'extension de modules. Quelques modules ont
|
||||
leurs propres --enable les options, tandis que d'autres modules pas.
|
||||
Par défaut, aucun module n'est compilé. Pour permettre un module à
|
||||
compilez l'utilisation de temps (ou modules multiples) l'option
|
||||
suivante :
|
||||
|
||||
--enabvle-modules="module les noms"
|
||||
|
||||
Bateaux de NeoStats avec les modules suivants :
|
||||
|
||||
ConnectServ -- enable-modules="cs"
|
||||
HostServ -- enable-modules="hostserv"
|
||||
LoveServ -- enable-modules="loveserv"
|
||||
MoraleServ -- enable-modules="ms"
|
||||
Spam -- enable-modules="spam"
|
||||
StatServ -- enable-modules="statserv"
|
||||
|
||||
Pour compiler les modules multiples combinez les options de
|
||||
permettre-modules ensemble comme suit :
|
||||
|
||||
-- permettez-modules="statserv le Spam"
|
||||
(ceci permettrait le statserv et des modules de Spam).
|
||||
|
||||
Si vous avez téléchargé les modules supplémentaires du site Web
|
||||
de NeoStats, Ne les indiquez pas dans l'option de permettre-modules.
|
||||
Chaque module a le son propres configurent la séquence type, et doit
|
||||
être configuré et installé ensuite NeoStats est installé. (voyez la
|
||||
section 6 et la documentation avec module).
|
||||
|
||||
Mise au point :
|
||||
|
||||
La plupart des utilisateurs ne regarderont jamais cette option. Il
|
||||
compile NeoStats la mise au point étant allumé. Je suggérerais
|
||||
seulement en utilisant ceci si vous ayez les problèmes et soyez
|
||||
sur le point de compléter une forme d'anomalie.
|
||||
|
||||
--enable-debug au point permet la mise au point
|
||||
|
||||
Outil De Configuration De XWindows :
|
||||
|
||||
Pour permettre le bâtiment du programme de configtool
|
||||
(fenêtres des besoins X)
|
||||
|
||||
--enable-configtool
|
||||
|
||||
Permettre la commande CRUE :
|
||||
|
||||
Nous recommandons vivement contre l'utilisation de cette
|
||||
option. Utilisation de CRU les commandes peuvent causer le
|
||||
desync sur votre réseau et commandes mal formatées peut tomber
|
||||
en panne votre réseau. Si vous permettez cette option, nous pas
|
||||
fournissez n'importe quel support pour votre usage de cette
|
||||
commande. S'il vous plaît n'entrez pas en contact nous pour le
|
||||
support de la commande CRUE.
|
||||
|
||||
--enable-raw
|
||||
|
||||
La séquence type de configuration contrôlera alors pour voir si
|
||||
tous les programmes nécessaires à le passage NeoStats sont
|
||||
installés sur votre système. Une petite note ici, pour ceux de
|
||||
vous qui ont emailed me paranoïde, NeoStats ne contrôle pas
|
||||
réellement votre équilibre arrière de compte, ni peut il.
|
||||
|
||||
|
||||
1.4 NeoStats De Compilation
|
||||
---------------------------
|
||||
|
||||
Ok, vous devriez maintenant être en arrière à une demande
|
||||
d'interpréteur de commandes interactif, type :
|
||||
|
||||
faites
|
||||
|
||||
il passera par la source et la compilera dans un exécutable
|
||||
fichier binaire. Si vous obtenez quelques avertissements,
|
||||
veuillez les ignorer -- nous sommes travailler aux avertissements.
|
||||
|
||||
|
||||
1.5 NeoStats D'Installation
|
||||
---------------------------
|
||||
|
||||
Si vous améliorez une version fonctionnante de NeoStats. Veuillez
|
||||
lire la section 1.9 notes pour Upgraders maintenant.
|
||||
|
||||
Avec la version 2.5.0 et plus haut, NeoStats doit "être installé"
|
||||
sur son propre répertoire. Par défaut NeoStats installera sur
|
||||
~/NeoStats/ i.e. dans votre répertoire local e.g.
|
||||
|
||||
/home/fish/NeoStats/
|
||||
|
||||
Si vous souhaitez changer l'emplacement d'installation, s'il vous
|
||||
plaît type
|
||||
|
||||
./configure -- aide
|
||||
|
||||
et suivez les instructions sur l'écran.
|
||||
|
||||
Pour installer le type de NeoStats :
|
||||
|
||||
faites pour installer
|
||||
|
||||
Ceci créera les fichiers nécessaires, et copiez-les au répertoire
|
||||
d'installation.
|
||||
|
||||
|
||||
1.6 installant les neostats.fichier de cfg
|
||||
---------------------------------------------
|
||||
|
||||
Maintenant vous devriez changer en le répertoire d'installation
|
||||
(~/NeoStats /, ou celui que vous ayez indiqué dedans./configure)
|
||||
e.g.
|
||||
|
||||
Cd ~/NeoStats
|
||||
|
||||
Votre demande devrait sembler quelque chose comme :
|
||||
|
||||
[ user@host NeoStats ]
|
||||
|
||||
Une fois dans ce répertoire, vous devez créer un fichier de
|
||||
configuration. Vous si maintenant exécutent la séquence type de
|
||||
makeconf et répondent aux questions :
|
||||
|
||||
./makeconf
|
||||
|
||||
Vous devez éditer des neostats.cfg pour vérifier que tout est
|
||||
placé la voie vous voulez-l'avant que NeoStats fonctionne. Vous
|
||||
pouvez faire ceci avec :
|
||||
|
||||
neostats de pico.cfg
|
||||
|
||||
Toutes les options sont décrites ci-dessous et dans les
|
||||
neostats.cfg. Une fois que vous êtes fait éditant le fichier
|
||||
économiser lui.
|
||||
|
||||
Si en utilisant le pico comme dans l'exemple précédent, appuyez
|
||||
Ctrl-X puis pour frapper Y et entrez pour sauvegarder le fichier.
|
||||
|
||||
NOTE : quelques modules supplémentaires ont des options
|
||||
supplémentaires de configuration cela doit être indiqué
|
||||
dans les neostats.fichier de cfg. Veuillez voir la
|
||||
documentation pour les différents modules pour toutes options
|
||||
de configuration.
|
||||
|
||||
Les options disponibles pour la distribution de NeoStats de force
|
||||
sont décrites au-dessous de.
|
||||
|
||||
Chacune des options a un indicateur comme suit :
|
||||
[ REQUIS ] - doit être placé ou NeoStats ne fonctionnera pas
|
||||
[ RECOMMANDÉ ] - facultatif mais peut poser des problèmes
|
||||
si non réglé
|
||||
[ FACULTATIF ] - facultatif et le dispositif soyez handicapé
|
||||
si non réglé
|
||||
[ DÉCOURAGÉ ] - peut causer des effets secondaires indésirables
|
||||
si permis
|
||||
|
||||
IRCD Joignant Des Options De Configuration
|
||||
|
||||
|
||||
SERVER_NAME < hostname > [ REQUIS ]
|
||||
Indique le nom du serveur de NeoStats car il apparaîtra en
|
||||
fonction le réseau. e.g.
|
||||
|
||||
SERVER_NAME stats.neostats.com
|
||||
|
||||
Quand NeoStats joint, il apparaîtra comme stat.neostats.com.
|
||||
|
||||
SERVER_PORT < nombre gauche > [ REQUIS ]
|
||||
Indique le port pour se relier à sur le serveur e d'IRC.g.
|
||||
|
||||
SERVER_PORT 6667
|
||||
|
||||
En se reliant, NeoStats se reliera au port 6667
|
||||
|
||||
CONNECT_TO < IP address > [ REQUIS ]
|
||||
Indique le IP address pour se relier à. e.g.
|
||||
|
||||
CONNECT_TO 127.0.0.1
|
||||
|
||||
Ceci forcera la stat pour se relier à 127.0.0.1
|
||||
|
||||
CONNECT_PASS < mot de passe de lien > [ REQUIS ]
|
||||
Indique le mot de passe employé pour se relier. Ceci doit
|
||||
apparier votre C/N lignes dans votre configuration e d'IRCD.
|
||||
|
||||
Linkpass de CONNECT_PASS
|
||||
|
||||
Envoyez les "linkpass" comme mot de passe pour se relier
|
||||
|
||||
SERVER_INFOLINE < ligne d'information > [ REQUISE ]
|
||||
Indiquez la description du serveur cela
|
||||
apparaît quand vous faites /links e.g.
|
||||
|
||||
Services D'Auxiliaire De Réseau de SERVER_INFOLINE
|
||||
|
||||
SERVER_NUMERIC < numérique > [ RECOMMANDÉ ]
|
||||
Indiquez le numérique du serveur pour envoyer en fonction
|
||||
se relient. Ceci doit être une valeur entre 1 et 254, et ne
|
||||
doit pas être en service près tout autre serveur d'IRC sur
|
||||
le réseau. Actuel seulement IRCd irréel utilise cette option.
|
||||
|
||||
SERVER_NUMERIC 1
|
||||
|
||||
STATSERV_NETNAME < nom de réseau > [ REQUIS ]
|
||||
Votre nom de réseau, si l'inconnu se rapportent à votre
|
||||
fichier de réseau. Pas appliquez-vous à tout l'iRCDs e.g.
|
||||
|
||||
STATSERV_NETNAME NeoStats
|
||||
|
||||
Pour l'IRC.neostats.net
|
||||
|
||||
Options de configuration de NeoStats
|
||||
|
||||
|
||||
NEOSTAT_HOST < centre serveur > [ REQUIS ]
|
||||
Indique le hostname que NeoStats vient de certaines
|
||||
certains aiment à faites-lui les mêmes que les services
|
||||
accueillent (e.g., services.neostats.net) ou un juste pour
|
||||
NeoStats (e.g., stat.neostats.net) e.g.
|
||||
|
||||
NEOSTATS_HOST stats.neostats.net
|
||||
|
||||
Le BOT apparaîtra comme NeoStats !user@stats.neostats.net
|
||||
|
||||
NEOSTAT_USER < utilisateur > [ REQUIS ]
|
||||
Indique l'User/ident du BOT de NeoStats (la partie avant
|
||||
@host) e.g.
|
||||
|
||||
NEOSTATS_USER néo-
|
||||
|
||||
La volonté de BOT apear comme NeoStats !neo@Host
|
||||
|
||||
SERVICES_CHAN # < nom de canal > [ REQUIS ]
|
||||
Indiquez le canal ce tous les bots sur NeoStats
|
||||
la volonté se joignent automatiquement, et écho hors de quels
|
||||
l'information importante e.g.
|
||||
|
||||
SERVICES_CHAN # services
|
||||
|
||||
Marques NeoStats, et tous les autres bots se joignent #canal
|
||||
de services en fonction start-up/load.
|
||||
|
||||
NO_LOAD [ VOUS DEVEZ RETIRER CECI ]
|
||||
Si c'est dans les neostats.cfg que votre NeoStats NE COMMENCERA
|
||||
PAS VERS LE HAUT. À invalidez ceci simplement commentaire cette
|
||||
ligne dehors. e.g.
|
||||
|
||||
NO_LOAD < - NeoStats ne chargera pas.
|
||||
|
||||
#NO_LOAD < - NeoStats chargera.
|
||||
|
||||
WANT_PRIVMSG [ NON RECOMMANDÉ ]
|
||||
Indiquez si les bots envoient tous les messages comme privmsgs
|
||||
ou As notices (la plupart des services utilisent la notification)
|
||||
e.g.
|
||||
|
||||
WANT_PRIVMSG
|
||||
|
||||
Si présent, enverra tous les messages comme privmsgs (si commenté
|
||||
dehors, il enverra comme notices) * NOTE :* Cette option viole le
|
||||
RFC d'IRC, et peut poser des problèmes de flooding sur votre réseau.
|
||||
Son non recommandé.
|
||||
|
||||
RECONNECT_TIME < seconde > [ RECOMMANDÉ ]
|
||||
Si le serveur de NeoStats obtient le fractionnement du réseau,
|
||||
combien de temps attendre avant d'essayer de rebrancher au réseau.
|
||||
Une valeur de 0 volontés causez NeoStats à l'arrêt et pas essayez
|
||||
de rebrancher. e.g.
|
||||
|
||||
RECONNECT_TIME 10
|
||||
|
||||
Indique l'attente 10 secondes avant l'essai de rebrancher
|
||||
|
||||
RECONNECT_TIME 0
|
||||
|
||||
Dit NeoStats de ne jamais rebrancher au réseau
|
||||
|
||||
Si non indiqué, NeoStats se transférera sur 10 secondes.
|
||||
|
||||
ONLY_OPERS [ FACULTATIF ]
|
||||
Limitez NeoStats et StatServ à l'utilisation d'opers seulement.
|
||||
Si non indiqué, les utilisateurs auront de l'accès à NeoStats
|
||||
et commandes de StatServ. e.g.
|
||||
|
||||
ONLY_OPERS
|
||||
|
||||
Seulement les opers peuvent utiliser NeoStats et StatServ.
|
||||
|
||||
BINDTO [ FACULTATIF ]
|
||||
Faites le grippage de NeoStats à un IP address particulier. Si pas
|
||||
NeoStats indiqué essayera de trouver cette adresse
|
||||
soi-même. e.g.
|
||||
|
||||
BINDTO 203.203.123.12
|
||||
|
||||
Toutes les connexions sortantes de NeoStats proviendront de ceci
|
||||
IP address.
|
||||
|
||||
LOGFILENAMEFORMAT < format > [ FACULTATIF ]
|
||||
Définit le format pour les fichiers de logarithme naturel datés.
|
||||
Ceci vous permet de choisir quel format de date est utilisé pour
|
||||
des noms de fichier de logarithme naturel quand ils sont tournés à
|
||||
minuit. L'option utilise les paramètres passés au strftime ainsi
|
||||
vous peut utiliser toutes les options valides pour cette fonction.
|
||||
Le terrain communal ceux sont :
|
||||
nom de jour de la semaine abrégé par %a
|
||||
plein nom de jour de la semaine de %A
|
||||
nom de mois abrégé par %b
|
||||
plein nom de mois de %B
|
||||
jour de %d de mois en tant que nombre décimal (01 - 31)
|
||||
mois de %m en tant que nombre décimal (01 - 12)
|
||||
année de %y sans siècle, en tant que nombre décimal (00 - 99)
|
||||
année de %Y avec le siècle, en tant que nombre décimal
|
||||
|
||||
Exemples en utilisant 30 septembre 2004 comme date :
|
||||
Pour NeoStats0930.logarithme naturel :
|
||||
|
||||
LOGFILENAMEFORMAT %m%d
|
||||
|
||||
Pour NeoStats20040930.logarithme naturel :
|
||||
|
||||
LOGFILENAMEFORMAT %Y%m%d
|
||||
|
||||
Si non défini, le défaut est "- %m-%d" I.e. NeoStats-09-30.log
|
||||
|
||||
|
||||
Options De Configuration De Module
|
||||
----------------------------------
|
||||
|
||||
LOAD_MODULE < nom de module > [ FACULTATIF ]
|
||||
quel module à charger à la mise en train. e.g.
|
||||
|
||||
LOAD_MODULE statserv
|
||||
|
||||
Chargera vers le haut de StatServ à la botte
|
||||
|
||||
Des exemples multiples de LOAD_MODULE peuvent être indiqués
|
||||
|
||||
Options De Configuration D'ExtAuth
|
||||
|
||||
|
||||
Si vous avez permis le module d'authentification de
|
||||
ServiceRoots, puis ceux-ci les options supplémentaires de
|
||||
configuration sont disponibles :
|
||||
|
||||
SERVICE_ROOTS < entaille!user@host > [ FACULTATIF ]
|
||||
Qui devrait obtenir l'accès à NeoStats indépendamment de leur
|
||||
ligne indicateurs de O. Vous pouvez indiquer cette option
|
||||
jusqu'à 10 fois d'indiquer différent entailles qui seront
|
||||
permises ce privilège. e.g.
|
||||
|
||||
Poissons de SERVICE_ROOTS fish!?Fish@*.neostats.net
|
||||
|
||||
Donnera l'accès de "poissons" aux commandes privilégiées de
|
||||
NeoStats si le poisson a Umode +r et vient du hostname et de
|
||||
l'identification indiqués.
|
||||
|
||||
|
||||
1.7 modules supplémentaires de compilation
|
||||
------------------------------------------
|
||||
|
||||
Si vous avez téléchargé d'autres modules e de NeoStats.g. OPSB,
|
||||
vous devriez maintenant installez-les. Si vous améliorez NeoStats,
|
||||
vous devez reconstruire tout l'autre modules séparés à travailler
|
||||
avec la nouvelle version de NeoStats. Voyez documentation avec ces
|
||||
modules pour des instructions sur le bâtiment et installation d'elles.
|
||||
|
||||
1.8 NeoStats Fonctionnant
|
||||
|
||||
|
||||
NeoStats est maintenant configuré et installé.
|
||||
|
||||
Avant qu'exécutant NeoStats vous devez vous assurer que votre server(s)
|
||||
ont C: N: et U: lignes pour votre serveur de NeoStats. Je NE VOUS
|
||||
AIDERAI PAS AVEC AJOUTER C : N : ET U : LIGNES À VOTRE SERVEUR, VOUS
|
||||
DEVRIEZ LIRE LA DOCUMENTATION D'IRCD SI VOUS NE SAVEZ PAS À IL!!!
|
||||
N'ENTREZ PAS EN CONTACT AVEC Les USA AU SUJET De C: N: et U: Lignes.
|
||||
|
||||
Une fois que vos lignes de C/N/U sont installées, vous devez commencer
|
||||
NeoStats. Vous devriez changez en le répertoire où NeoStats dans e
|
||||
installé.g.
|
||||
|
||||
Cd ~/NeoStats
|
||||
|
||||
Exécuter alors le type de NeoStats :
|
||||
|
||||
./neostats
|
||||
|
||||
Il devrait joindre et synchro avec votre serveur dans une question
|
||||
des secondes.
|
||||
|
||||
Veuillez lire maintenant USERMAN pour des détails sur la façon dont
|
||||
actionner NeoStats à partir de l' Client d'IRC.
|
||||
|
||||
Si quelque chose tourne mal, là * pourrait * être un message d'erreur
|
||||
dans le logarithme naturel fichiers. Allez voir dans
|
||||
~/NeoStats/logs/NeoStats.log naturel il pourrait vous donner a indice
|
||||
à ce qui est erroné ! NeoStats pourrait également envoyer des wallops
|
||||
au réseau au sujet de ce qui a mal tourné. Contrôlez la fenêtre de mode
|
||||
de votre client d'IRC.
|
||||
|
||||
Il y a une certaine ligne de commande options pour NeoStats que vous
|
||||
pouvez trouver utile :
|
||||
|
||||
- h affichera un écran d'aide montrant ces options.
|
||||
- v affichera le nombre de version
|
||||
- r permettent le recv.logarithme naturel
|
||||
- d 1-10 permettent la sortie 1 de mise au point =
|
||||
le plus bas, 10 = le plus haut
|
||||
- n ne chargent aucun module sur la mise en route
|
||||
- début de quiet de q - pour des séquences type de cron
|
||||
- f ne bifurquent pas dans le fond (pour mettre au point)
|
||||
|
||||
Pour utiliser ces options, ajoutez les options que vous avez besoin de
|
||||
quand vous exécutez NeoStats, e.g. :
|
||||
|
||||
./neostats - h
|
||||
|
||||
Note : bien que vous puissiez combiner la plupart de ces options,
|
||||
- v (version) et - h (aide) renverra l'information vous et à
|
||||
NeoStats pas traitez toutes les autres options que vous passez.
|
||||
|
||||
|
||||
1.9 notes pour des upgraders
|
||||
----------------------------
|
||||
|
||||
Si vous améliorez d'une version plus ancienne nous recommandons
|
||||
que vous de sauvegarde la version en cours d'abord.
|
||||
|
||||
Si vous exécutez le crontab pour NeoStats, nous recommandons
|
||||
que vous invalidez ceci avant de faire la mise à niveau de sorte
|
||||
que le cron ne commence pas vers le haut un plus vieux versopn
|
||||
tandis que vous travaillez sur la mise à niveau.
|
||||
|
||||
Assurez-vous que NeoStats ne fonctionne pas. Dans un client d'IRC
|
||||
relié à votre type de réseau :
|
||||
|
||||
/msg NeoStats SHUTDOWN Upgrade
|
||||
|
||||
NeoStats sauvegardera l'information importante ainsi l'attente
|
||||
ceci pour terminer.
|
||||
|
||||
Pour faire la sauvegarde aller à votre répertoire local et taper :
|
||||
|
||||
CP NeoStats NeoStatsBackup - r
|
||||
|
||||
Si vous n'exécutez pas cette sauvegarde et la mise à niveau vous
|
||||
pose des problèmes, vous pourriez détruire toute l'information de
|
||||
NeoStats.
|
||||
|
||||
Nous recommandons également de reconstruire tous les modules
|
||||
supplémentaires après évolution NeoStats. Vous ne pouvez pas devoir
|
||||
améliorer le module supplémentaire, juste reconstruisez-et
|
||||
réinstallez-l'après que la marque installent dans l'étape 1.4
|
||||
ci-dessus.
|
||||
|
||||
Si après évolution, NeoStats tombe en panne en chargeant un de vos
|
||||
modules e.g. OPSB, ceci signifie habituellement que vous n'avez pas
|
||||
reconstruit le module pour la dernière version de NeoStats.
|
||||
|
||||
Si vous exécutez dans des problèmes améliorant et devez restaurer
|
||||
votre sauvegarde, vous pouvez faire ainsi en allant à votre
|
||||
répertoire local et en tapant :
|
||||
|
||||
CP NeoStatsBackup NeoStats - r
|
||||
|
||||
Vos vieux modules seront également restaurés avec la vieille
|
||||
version de NeoStats tellement là n'est aucun besoin de les
|
||||
reconstruire pour une restauration.
|
||||
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
L'Information De 2 Supports
|
||||
---------------------------
|
||||
|
||||
2.1 avant d'entrer en contact avec le support
|
||||
---------------------------------------------
|
||||
|
||||
** IMPORTANT - S'IL VOUS PLAÎT LU AVANT D'ENTRER EN CONTACT AVEC LE
|
||||
DES USA **
|
||||
|
||||
Pour que nous puissions consacrer le temps à développer NeoStats
|
||||
et bidon issues de support d'adresse rapidement, il y a quelques
|
||||
voies que vous pouvez aider à ramenez les appels inutiles de
|
||||
support à l'équipe de NeoStats.
|
||||
|
||||
D'abord, contrôle vous utilisez la dernière version de version de
|
||||
NeoStats As trouvé à la page de téléchargement de NeoStats. Il
|
||||
pourrait être que votre problème est fixe ou votre suggestion
|
||||
mise en application dans la dernière version. Nous ne sommes pas
|
||||
capable fournir le support pour des versions plus anciennes de
|
||||
NeoStats que le courant version.
|
||||
|
||||
Nous ne fournissons aucun support pour des instantanés de CVS si
|
||||
libéré sur le site Web ou pas. Si vous avez téléchargé un
|
||||
instantané de CVS et avez des problèmes, vous devriez retourner
|
||||
de nouveau à votre version fonctionnante précédente ou si c'est
|
||||
votre première installation, la construction de version en cours
|
||||
comme indiqué sur site Web. Veuillez ne pas nous contacter au
|
||||
sujet des problèmes avec des versions de CVS. Nous informera des
|
||||
utilisateurs de temps en temps essayer un instantané de CVS pour
|
||||
fixer un problème, mais car nous ne mettons pas nos versions de
|
||||
CVS par le test étendu, là pourraient être les nouveaux anomalies
|
||||
ou problèmes.
|
||||
|
||||
Avant de nous contacter avec un problème ou une anomalie, veuillez
|
||||
s'assurer vous avoir lisez toute la documentation fournie. Vous
|
||||
devriez alors contrôler le site Web introduisez des erreurs pour
|
||||
tests la liste et recherchez les forum pour voir si votre problème
|
||||
a déjà été enregistré et si une solution a été signalée.
|
||||
|
||||
Avant de nous envoyer une suggestion, vous devriez contrôler les
|
||||
forum soigneusement à voyez si votre suggestion a été déjà faite
|
||||
et si l'équipe de NeoStats ont décidé de le mettre en application
|
||||
ou pas. L'utilisation du dispositif d'"recherche" en fonction les
|
||||
forum est une grande voie d'obtenir rapidement des réponses à votre
|
||||
problème si d'autres utilisateurs ont déjà rencontré l'issue.
|
||||
|
||||
Vous ne devez pas lire tous les messages pour découvrir si votre
|
||||
issue a déjà discuté. Le panneau de message a une fonction de
|
||||
recherche ainsi vous pouvez rapidement contrôler pour voir s'il
|
||||
y a une discussion sur votre problème.
|
||||
|
||||
Le groupe de NeoStats peuvent seulement aider avec des issues
|
||||
affectant NeoStats. Nous ne pouvons pas aider à installer votre
|
||||
serveur ou services d'IRC sur le votre réseau (installation y
|
||||
compris de C: N: et U: les lignes) satisfont ainsi pas demandez-nous.
|
||||
Si vous avez une question au sujet de votre serveur ou de services
|
||||
d'IRC module, veuillez contrôler la documentation qui est venue
|
||||
avec eux et le contact leur équipe si vous avez besoin toujours
|
||||
d'aide.
|
||||
|
||||
La commande CRUE est une commande non soutenue. Si vous avez besoin
|
||||
d'aide en utilisant la, vous ne devriez pas l'utiliser probablement.
|
||||
Veuillez ne pas nous demander l'aide sur la commande CRUE.
|
||||
|
||||
Merci.
|
||||
|
||||
|
||||
2.1 où obtenir le support
|
||||
-------------------------
|
||||
|
||||
Vous pouvez obtenir le soutien de NeoStats d'un certain nombre de
|
||||
différentes voies ainsi choisissez celui qui vous convient mieux.
|
||||
|
||||
* Anomalie enregistrant le système
|
||||
Une nouvelle section d'enregistrement d'anomalie a été présentée
|
||||
et vous pouvez contrôler ceci pour voir s'il y a des anomalies
|
||||
connues dans NeoStats et découvrir quand ils soyez fixe. Bientôt
|
||||
vous pourrez enregistrer des anomalies en utilisant ce système.
|
||||
Pour le système de piste d'anomalie, visite :
|
||||
|
||||
HTTP ://bugs.neostats.net/index.php
|
||||
|
||||
* Panneaux de message disponibles à :
|
||||
|
||||
HTTP ://www.neostats.net/boards/
|
||||
|
||||
* Le canal de support d'IRC de NeoStats à :
|
||||
|
||||
serveur : irc.irc-chat.net
|
||||
canal : #neostats
|
||||
|
||||
Soyez averti que nous ne sommes pas toujours disponibles sur
|
||||
le canal pour vous aider. Il y a un neoserv là appelé de BOT
|
||||
qui contient les dernières anomalies et l'information de
|
||||
support (reproduite du panneau de NeoStats).
|
||||
|
||||
|
||||
2.2 ce qui pour fournir quand demandant le support
|
||||
--------------------------------------------------
|
||||
|
||||
Il aide toujours à fournir autant informations comme possible
|
||||
au sujet du votre environnement en demandant l'aide. Veuillez
|
||||
s'assurer vous inclure au moins l'information suivante :
|
||||
|
||||
Version de système d'exploitation (i.e., Redhat 7.0. Mandrake 9.1 etc..)
|
||||
version de GCC (trouvée par l'intermédiaire de GCC - v)
|
||||
Version de NeoStats que vous utilisez et si le problème est avec a
|
||||
module, la version du module (trouvé par l'intermédiaire du modlist de neostats de /msg)
|
||||
Le type d'IRCD que vous essayez de vous relier à (et version
|
||||
nombre)
|
||||
|
||||
Nous pouvons demander que vous permettez la mise au point et nous soumettez les résultats de
|
||||
mise au point. Pour permettre la mise au point, utilisez la commande suivante de commencer
|
||||
NeoStats :
|
||||
|
||||
./neostats - d 9 - r
|
||||
|
||||
Quand il tombe en panne, ou l'anomalie a été reproduite, envoyez-nous :
|
||||
|
||||
logs/NeoStats.logarithme naturel
|
||||
logs/recv.logarithme naturel (s'il existe, Vous pouvez souhaiter éditer les premiers
|
||||
lignes du fichier pour retirer le mot de passe de lien)
|
||||
|
||||
Ceci nous aidera à pouvoir reproduire l'anomalie et créer une difficulté pour il.
|
||||
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
3. Contributions
|
||||
---------------------
|
||||
|
||||
Voulez nous aider ?
|
||||
|
||||
Nous recherchons toujours l'aide.
|
||||
|
||||
Actuellement, ce que nous vraiment recherchons est les gens
|
||||
pour nous dépanner avec traduction de notre documentation et
|
||||
naturellement, d'autres qui peuvent coder en C pour nous aider
|
||||
avec le développement.
|
||||
|
||||
Nous espérons fournir sous peu un guide de programmeurs de module
|
||||
pour aider ceux les gens dehors là tirent profit de NeoStats et
|
||||
écrivent leurs propres prolongements (ou modules) pour NeoStats.
|
||||
|
||||
Si vous voudriez aider dehors, Voir l'information de soutien
|
||||
ci-dessus pour des détails sur la façon dont nous contacter.
|
||||
|
||||
-----------------------------------<>-----------------------------------
|
||||
|
||||
**************************************************************
|
||||
** Ce document a été pour la dernière fois mis à jour le **
|
||||
** 7 décembre, 2004 par Shmad et est basé sur des documents **
|
||||
** à l'origine créés par Shmad, Fish et M. **
|
||||
**************************************************************
|
|
@ -1,534 +0,0 @@
|
|||
NeoStats 2.5.0
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
-----------------------------------------
|
||||
POR FAVOR LEIA O FICHEIRO 'BETA' PRIMEIRO
|
||||
-----------------------------------------
|
||||
|
||||
Obrigado por ter feito o download do NeoStats. O NeoStats é um poderoso e extensível
|
||||
conjunto de serviços para o IRC. Com 'serviços' não queremos dizer NickServ/ChanServ/etc
|
||||
(apesar destes estarem a ser desenvolvidos), mas serviços adicionais. Serviços como o
|
||||
StatServ, os quais lhe dão informação do número de utilizadores/operadores/canais/servidores...
|
||||
basicamente estatísticas de IRC, ou o MoraleServ, que é um serviço de lazer, para enviar
|
||||
mensagens engraçadas para utilizadores, para módulos utilitários. Alguns módulos têm uma função
|
||||
útil na sua rede, outros módulos foram desenvolvidos para lazer, e para tornar a sua rede de IRC
|
||||
mais atractiva para os utilizadores (é disso que tudo isto se trata certo? utilizadores de IRC?)
|
||||
Com a série 2.5 do NeoStats, várias mudanças ocorreram, comparativamente à versão antiga da série
|
||||
NeoStats 2.0 (não me pergunte o que aconteceu às versões 2.1, 2.2, 2.3 ou 2.4, porque eu não sei!)
|
||||
Uma lista detalhada de mudanças pode ser encontrada no ficheiro ChangeLog, mas um breve sumário é:
|
||||
-Suporte para ServiceRoots
|
||||
-Ficheiros MOTD externos
|
||||
-Protecção contra Segfault de módulos
|
||||
-Suporte para CrossIRCD. Agora suportamos outros IRCD's para além do Unreal.
|
||||
-O StatServ suporta a exportação das estatísticas para um ficheiro HTML (a exportação do
|
||||
ficheiro HTML é baseado num molde)
|
||||
-Mudanças no ModuleAPI que o tornam mais eficiente
|
||||
-Suporte para canais!
|
||||
-O StatServ suporta agora estatísticas de canais!
|
||||
-Muitos bugfixes e mudanças no núcleo interno do NeoStats
|
||||
-Muitas actualizações nos diversos módulos
|
||||
|
||||
Bem, chega de detalhes, é hora de proseguir....
|
||||
|
||||
Tabela de Conteúdos:
|
||||
|
||||
[1] Instalação
|
||||
[1.1] Iniciando.
|
||||
[1.2] Correndo o configure
|
||||
[1.3] Compilando o NeoStats
|
||||
[1.4] Instalando o NeoStats
|
||||
[1.5] Configurando o ficheiro neostats.cfg
|
||||
[1.6] Fim!
|
||||
[2] Ajuda ao Bot NeoStats
|
||||
[2.1] Opções do neostats.cfg
|
||||
[2.2] Comandos disponíveis
|
||||
[2.3] INFO
|
||||
[2.4] VERSION
|
||||
[2.5] LEVEL
|
||||
[2.6] SHUTDOWN
|
||||
[2.7] RELOAD
|
||||
[2.8] LOGS
|
||||
[2.9] LOAD
|
||||
[2.10] UNLOAD
|
||||
[2.11] MODLIST
|
||||
[2.12] JUPE
|
||||
[2.13] RAW
|
||||
[3] Ajuda ao Bot StatServ
|
||||
[2.1] Opções do neostats.cfg
|
||||
[2.2] Comandos disponíveis
|
||||
[2.3] SERVER
|
||||
[2.4] MAP
|
||||
[2.5] NETSTATS
|
||||
[2.6] DAILY
|
||||
[2.7] TLD
|
||||
[2.8] TLDMAP
|
||||
[2.9] OPERLIST
|
||||
[2.10] BOTLIST
|
||||
[2.11] VERSION
|
||||
[2.12] FORCEHTML
|
||||
[2.13] RESET
|
||||
[2.14] STATS
|
||||
[2.15] A sintaxe HTML
|
||||
[4] Informação de suporte
|
||||
[4.1] Como conseguir suporte
|
||||
[4.2] Que informação deverá ter disponível para receber suporte
|
||||
|
||||
[1] Instalação:
|
||||
-------------
|
||||
[1.1] Iniciando.
|
||||
|
||||
Primeiro, vai querer descomprimir o NeoStats, para o fazer, escreva o seguinte:
|
||||
|
||||
tar xvfz NeoStats2.0.tar.gz (is pode variar conforme a versão do NeoStats que vai correr
|
||||
mude NeoStats2.0.tar.gz para o nome do ficheiro em questão)
|
||||
|
||||
** Nota: Em alguns sistemas que não tenham a nova versão do 'tar' a correr poderá necessitar de fazer o seguinte:
|
||||
gzip -d NeoStats2.0.tar.gz
|
||||
tar xvf NeoStats2.0.tar
|
||||
|
||||
|
||||
[1.2] Correndo o configure
|
||||
O script de configuração foi alterado comparativamente ao antigo 2.0.x
|
||||
e terá que se cerificar que apresenta os argumentos correctos para configurar.
|
||||
|
||||
O que é necessário:
|
||||
-----------------
|
||||
Supporte para IRCD:
|
||||
Para especificar o IRCD para o qual está a compilar. Por exemplo:
|
||||
--enable-unreal para UnrealIRCD
|
||||
--enable-ultimate2 para as séries UltimateIRCD 2.x.x
|
||||
--enable-ultimate3 para as séries UltimateIRCD 3.x.x (Nota: na data de lançamento desta versão do NeoStats, o Ultimate 3.x.x estava ainda em versão alpha, é possível que a compatibilidade com o Ultimate3 possa ser quebrada em futuros lançamentos do Ultimate aquando do seu desenvolvimento)
|
||||
|
||||
O que é opcional:
|
||||
-----------------
|
||||
Sistema de previlégios:
|
||||
Originalmente, o NeoStats era baseado em flags de Operador numa rede.
|
||||
Se fosse TechAdmin no Unreal, era-lhe dado praticamente controlo total do
|
||||
Neostats. Mas agora você pode activar a chamada autenticação externa.
|
||||
Isto permite diferentes modos do sistema de previlégio do NeoStats.
|
||||
As opções de momento disponíveis são:
|
||||
--enable-auth=sr Isto activa a opção ServiceRoots, na qual o utilizador necessita de estar identificado aos serviços (com a flag +r) e terá controlo total do NeoStats.
|
||||
se não especificar --enable-auth então ele usará as flags do IRCD para aceder ao NeoStats.
|
||||
A predefinição é IRCD Isto regride ao antigo sistema de previlégio do antigo NeoStats, onde a autenticação é baseada nas flags do utilizador (+oOANs etc etc)
|
||||
|
||||
Suporte de módulos:
|
||||
O NeoStats tem um expansível conjunto de módulos. Alguns módulos têm as suas próprias opções --enable enquanto que outros módulos não.
|
||||
Para activar um módulo na compilação (ou múltiplos módulos) use a seguinte opção:
|
||||
--enable-modules="statserv spam" isto iria activar os módulos StatServ e Spam.
|
||||
|
||||
A predefinição é sem módulos. O NeoStats vem com os módulos StatServ e Spam (assim como a versão module, a qual é de facto um módulo inútil. É um exemplo do API para os programadores de módulos usarem).
|
||||
|
||||
Se fez o download de módulos adicionais do website do NeoStats, NÃO os especifique na opção enable-modules. Cada módulo tem o seu próprio script de configuração, e tem que ser configurado e instalado após o NeoStats estar instalado.
|
||||
|
||||
Modo debugging:
|
||||
A maior parte dos utilizadores nunca irão necessitar desta opção. Ela compila o NeoStats
|
||||
com o modo debugging activado. Eu apenas sugeriria utilizar isto se tiver problemas e estiver
|
||||
disposto a preencher um formulário de erros.
|
||||
--enable-debug Activa modo debugging.
|
||||
|
||||
[1.3] Compilando o NeoStats
|
||||
|
||||
Ok, agora deverá estar de volta à prompt da shell. Agora escreva:
|
||||
|
||||
make
|
||||
|
||||
ele irá através do código fonte e compilá-lo num ficheiro binário executável.
|
||||
Se obtiver avisos (warnings), ignore-os -- nós estamos a tratar deles.
|
||||
|
||||
[1.4] Instalando o NeoStats
|
||||
|
||||
Com a versão 2.5.0 e superior, o NeoStats precisa agora de ser "instalado" no seu próprio directório se desejar usar módulos adicionais.
|
||||
O NeoStats irá instalar como predefinição, dentro de ~/NeoStats/ (no seu directório principal, ex: /home/fish/NeoStats/)
|
||||
Se desejar mudar o directório de instalação, por favor veja a secção 2.
|
||||
Para instalar o NeoStats escreva:
|
||||
|
||||
make install
|
||||
|
||||
Isto irá criar os ficheiros necessários, e copiá-los-á para o directório de instalação.
|
||||
|
||||
|
||||
|
||||
[1.5] Configurando o ficheiro neostats.cfg
|
||||
|
||||
Agora deverá mudar para o directório de instalação (~/NeoStats/ ou o que especificou no ./configure)
|
||||
|
||||
Uma vez neste directório, necessitará de editar o ficheiro de configuração. Um molde é fornecido,
|
||||
neostats.cfg.dist mude o nome deste ficheiro para neostats.cfg e edite-o. Todas as opções estão
|
||||
explicadas de forma suficientemente clara. Se tiver alguma pergunta, esteja à vontade para ma
|
||||
perguntar.. Uma vez terminada a edição do ficheiro, pressionel CTRL + X
|
||||
NOTA: alguns módulos adicionais, como o StatServ ou o ScriptServ têm opções de configuração adicionais
|
||||
que têm que ser especificadas no ficheiro stats.cfg. Por favor veja a documentação para cada um dos
|
||||
módulos individuais relativamente a opções de configuração.
|
||||
|
||||
As opções disponíveis são:
|
||||
SERVER_NAME - Especifica o nome do servidor do NeoStats como aparecerá na rede.
|
||||
eg: SERVER_NAME stats.neostats.net - Quando o servidor se ligar, ele irá aparecer como stats.neostats.net.
|
||||
SERVER_PORT - Especifica a porta a ligar no servidor IRC.
|
||||
eg: SERVER_PORT 6667 - Aquando da ligação, o NeoStats irá-se ligar à porta 6667.
|
||||
CONNECT_TO - Especifica o endereço IP a ligar.
|
||||
eg: CONNECT_TO 127.0.0.1 - Isto irá forçar o NeoStats a ligar-se ao IP 127.0.0.1
|
||||
CONNECT_PASS - Especifica a password para a ligação. Isto terá que estar de acordo com as C/N-lines na configuração do seu IRCD.
|
||||
eg: CONNECT_PASS linkpass - Usará "linkpass" como password de ligação.
|
||||
SERVER_INFOLINE - Especifica a descrição do servidor quando um utilizador faz uso do comando /links
|
||||
eg: SERVER_INFOLINE Serviços Auxiliares de Rede
|
||||
SERVICES_CHAN - Especifica o canal ao qual os bots do NeoStats irão entrar automaticamente, e fornecer qualquer informação importante.
|
||||
eg: SERVICES_CHAN #services - Força o NeoStats e todos os outros bots a entrarem no canal #services aquando do seu arranque
|
||||
WANT_PRIVMSG - Especifica o modo de envio de mensagens dos bots: mensagens privadas ou notices (a maioria dos serviços usam notices)
|
||||
eg: WANT_PRIVMSG - Se presente, irá enviar todas as mensagens como mensagens privadas (se comentado, irá enviar notices)
|
||||
RECONNECT_TIME - Se o servidor do NeoStats sofrer um netsplit da rede, qual o tempo de espera para ele se tentar reconectar
|
||||
eg RECONNECT_TIME 10 - O NeoStats esperará 10 segundos antes de se tentar reconectar
|
||||
LOAD_MODULE - Qual o módulo a carregar no arranque. Múltiplas linhas de LOAD_MODULE podem ser especificadas
|
||||
eg LOAD_MODULE statserv - Irá carregar StatServ no arranque.
|
||||
|
||||
Se activou o módulo de autenticação ServiceRoots, as seguintes opções adicionais de configuração estão disponíveis:
|
||||
SERVICE_ROOTS - Quem deverá ter acesso ao NeoStats independentemente das flags da sua o-line (excepto ter o user mode +r, que significa que eles estão identificados ao NickServ). Poderá repetir esta opção até 10 vezes, para especificar nicks diferentes.
|
||||
eg SERVICE_ROOTS fish - Irá dar acesso ao utilizador "fish" aos comandos previlegiados do NeoStats, se o utilizador tiver o user mode +r
|
||||
SERVICE_ROOTS_AUTH - Deverá ser dado acesso aos comandos previlegiados do NeoStats aos nicks listados na opção SERVICE_ROOTS e ignorar as flags da o-line ?
|
||||
eg: SERVICE_ROOTS_AUTH 1 -Activar e permitir o acesso do utilizador "fish" ao NeoStats, independentemente das flags da sua o-line
|
||||
|
||||
|
||||
[1.6] Fim!
|
||||
|
||||
Ok, está feito.
|
||||
** Nota: Verifique se o(s) seu(s) servidor(es) têm u-lines para o servidor de estatísticas.
|
||||
** Por favor, por favor, por favor! Lembre-se de adicionar as C/N-lines correctas no
|
||||
seu servidor!
|
||||
|
||||
Uma vez as C/N e u-lines configuradas, necessitará de iniciar o NeoStats. Tão simples quanto escrever
|
||||
./neostats
|
||||
|
||||
Se algo correr mal, *talvez* haja uma mensagem de erro nos ficheiros de log. Dê uma vista de olhos em ~/NeoStats/logs/stats.log este ficheiro poderá dar-lhe uma pista do que possa estar errado!
|
||||
|
||||
|
||||
** ORBSERVAÇÃO FINAL ** ** OBSERVAÇÃO FINAL ** ** OBSERVAÇÃO FINAL **
|
||||
EU NÃO O IREI AJUDAR A ADICIONAR AS C/N E U-LINES AO SEU SERVIDOR,
|
||||
VOCÊ DEVERÁ LER A DOCUMENTAÇÃO DO SEU IRCD SE NÃO SABE COMO O FAZER!!!
|
||||
|
||||
[2] Ajuda ao Bot NeoStats
|
||||
[2.1] Opções do neostats.cfg
|
||||
As opções seguintes estão disponíveis para o bot NeoStats no neostats.cfg:
|
||||
NEOSTATS_HOST - Especifica a hostname que o NeoStats aparenta ter
|
||||
eg: NEOSTATS_HOST stats.neostats.net - Significa que o bot irá ter a host: NeoStats!user@stats.neostats.net
|
||||
NEOSTATS_USER - Especifica a identd do bot NeoStats
|
||||
eg: NEOSTATS_USER neo - Significa que o bot irá ter a host: NeoStats!neo@stats.neostats.net
|
||||
|
||||
[2.2] Comandos Disponíveis
|
||||
Disponíveis para todos, independentemente dos níveis de acesso.
|
||||
INFO -Mostra informações básicas acerca do NeoStats e o seu uptime
|
||||
VERSION -Mostra a versão do NeoStats
|
||||
LEVEL -Mostra o seu nível de permissão relativamente ao NeoStats. 0 é o mínimo, 200 é o máximo.
|
||||
|
||||
Disponível para ServiceRoots (nível 180 ou superior)
|
||||
SHUTDOWN -Permite terminar o NeoStats
|
||||
RELOAD -Reinicia o NeoStats. Termina todos os módulos, disconecta-se e reconecta-se
|
||||
LOGS -Mostra o ficheiro de log do NeoStats (~/NeoStats/logs/stats.log)
|
||||
LOAD -Carrega um módulo
|
||||
UNLOAD -Termina um módulo
|
||||
MODLIST -Lista os módulos carregados
|
||||
JUPE -Faz 'Jupiter' a um servidor
|
||||
RAW -Envia comandos 'raw' a partir do NeoStats
|
||||
|
||||
Outros comandos estão disponíveis, mas são úteis apenas para debugging, use o código fonte, para os encontrar!
|
||||
[2.3] O comando INFO
|
||||
/msg neostats info
|
||||
Devolve:
|
||||
=NeoStats= Statistics Information:
|
||||
=NeoStats= Statistics up 1 minute, 48 seconds
|
||||
=NeoStats= Sent 49 Messages Totaling 2526 Bytes
|
||||
=NeoStats= Recieved 69 Messages, Totaling 1887 Bytes
|
||||
=NeoStats= Reconnect Time: 10
|
||||
=NeoStats= Statistic Requests: 4
|
||||
=NeoStats= Use SMO for Debug?: Disabled
|
||||
=NeoStats= Debugging Mode is Disabled!
|
||||
=NeoStats= End of Information.
|
||||
[2.4] O comando VERSION
|
||||
/msg neostats version
|
||||
Devolve:
|
||||
=NeoStats= NeoStats Version Information
|
||||
=NeoStats= NeoStats Version: NeoStats-2.5_Beta1
|
||||
=NeoStats= http://www.neostats.net
|
||||
[2.5] O comando LEVEL
|
||||
/msg neostats level
|
||||
Devolve:
|
||||
=NeoStats= Your Level is 185
|
||||
[2.6] O comando SHUTDOWN
|
||||
/msg neostats shutdown para upgrade
|
||||
Devolve:
|
||||
=Server.IRC.net= *** Global -- from stats.dynam.ac: StatServ Module Unloaded
|
||||
=Server.IRC.net= *** Global -- from NeoStats: Fish requested SHUTDOWN for for upgrade
|
||||
=Server.IRC.net= *** LocOps -- Received SQUIT stats.dynam.ac from stats.dynam.ac[127.0.0.1] (stats.dynam.ac)
|
||||
[2.7] O comando RELOAD
|
||||
/msg neostats reload estás com lag
|
||||
Devolve:
|
||||
=Server.IRC.net= *** Global -- from NeoStats: Fish requested RELOAD for your lagged out
|
||||
=Server.IRC.net= *** Global -- from stats.dynam.ac: StatServ Module Unloaded
|
||||
=Server.IRC.net= *** LocOps -- Received SQUIT stats.dynam.ac from stats.dynam.ac[127.0.0.1] (stats.dynam.ac)
|
||||
=Server.IRC.net= *** Notice -- (link) Link Server.IRC.net -> stats.dynam.ac[@127.0.0.1.54872] established
|
||||
=Server.IRC.net= *** Notice -- Link stats.dynam.ac -> Server.IRC.net is now synced [secs: 0 recv: 0.1015 sent: 1.431]
|
||||
=Server.IRC.net= *** Global -- from stats.dynam.ac: Link with Network Complete!
|
||||
[2.8] O comando LOG
|
||||
/msg neostats logs
|
||||
Devolve:
|
||||
=NeoStats= (11:02[03/21/2002]) RemoveLock() called: We must be segging!
|
||||
=NeoStats= (11:02[03/21/2002]) Statistics Started (NeoStats-2.5_Alpha6).
|
||||
=NeoStats= (11:02[03/21/2002]) New Server: stats.dynam.ac
|
||||
=NeoStats= (11:02[03/21/2002]) Connecting to 127.0.0.1:6001
|
||||
=NeoStats= (11:02[03/21/2002]) Sendings pings...
|
||||
(etc)
|
||||
[2.9] O comando LOAD
|
||||
/msg neostats load <módulo>
|
||||
Devolve:
|
||||
*** StatServ (Neo@NeoStats.net) has joined #services
|
||||
*** Mode change [+oa StatServ StatServ] on #services by stats.dynam.ac
|
||||
=NeoStats= Module statserv Loaded, Description: Statistical Bot For NeoStats
|
||||
<NeoStats> Fish Loaded Module statserv
|
||||
|
||||
[2.10] O comando UNLOAD
|
||||
/msg neostats unload <módulo>
|
||||
Devolve:
|
||||
<NeoStats> Unloading Module statserv
|
||||
<NeoStats> Module statserv has timer DelOldStatServChans Registered. Deleting..
|
||||
<NeoStats> Module statserv has timer Save_Stats_DB Registered. Deleting..
|
||||
<NeoStats> Module statserv has timer Daily_Stats_Reset Registered. Deleting..
|
||||
<NeoStats> Module statserv has timer TimerWeb Registered. Deleting..
|
||||
<NeoStats> Module statserv had bot StatServ Registered. Deleting..
|
||||
*** StatServ (Neo@NeoStats.net) has left IRC [Module Unloaded]
|
||||
<NeoStats> Fish Unloaded Module statserv
|
||||
[2.11] O comando MODLIST
|
||||
/msg neostats modlist
|
||||
Devolve:
|
||||
=NeoStats= Module: statserv (3.1)
|
||||
=NeoStats= Module Description: Statistical Bot For NeoStats
|
||||
=NeoStats= End of Module List
|
||||
[2.12] O comando JUPE
|
||||
/msg neostats jupe blah.com
|
||||
Devolve:
|
||||
<NeoStats> Fish Wants to JUPE this Server blah.com
|
||||
|
||||
[2.13] O comando RAW
|
||||
/msg neostats raw <comando raw>
|
||||
Returns:
|
||||
<NeoStats> RAW COMMAND Fish Issued a Raw Command!(:neostats invite fish #blah)
|
||||
*** NeoStats (Neo@NeoStats.net) invites you to #blah
|
||||
[3] Ajuda ao Bot StatServ
|
||||
[3.1] Opções do neostats.cfg
|
||||
STATSERV_NICK -Define o nickname do bot StarServ. Se não for especificado, o default é StatServ.
|
||||
eg: STATSERV_NICK stats -Define o nickname do bot StatServ como 'stats'
|
||||
STATSERV_USER -Define a identd do bot StatServ
|
||||
eg: STATSERV_USER stats -Define a identd to bot StatServ para stats
|
||||
STATSERV_HOST -Define a hostname do bot StatServ
|
||||
eg: STATSERV_HOST stats.microsoft.com -Define a hostname do bot StatServ para stats.microsoft.com
|
||||
LAG_NOTICE -Especifica o tempo em segundos em que se um servidor não responder a um ping, para difundir uma mensagem.
|
||||
eg: LAG_NOTICE 60 -Para qualquer servidor que não responda a ping dentro de 60 segundos, uma mensagem é difundida.
|
||||
HTML_STATS -Activa a exportação das estatísticas para HTML
|
||||
eg HTML_STATS -Se definido, activa esta opção
|
||||
HTML_PATH -Para onde exportar o ficheiro HTML. Inclua o caminho e o nome do ficheiro. Verifique que tem as permissões necessárias para gravar ficheiros neste caminho/ficheiro.
|
||||
eg: HTML_PATH /var/www/html/stats/index.html -Exportar as estatísticas para esta localização.
|
||||
[3.2] Comandos Disponíveis
|
||||
SERVER -Mostra a lista de todos os servidores presentes na rede, ou informação individual de cada servidor
|
||||
MAP -Mostra um mapa de todos os servidores ligados à rede
|
||||
NETSTATS -Mostra estatísticas acerca da rede
|
||||
DAILY -Mostra estatísticas acerca da rede no corrente dia
|
||||
TLD -Descubra que país uma TLD representa
|
||||
TLDMAP -Mostra uma contabilização dos utilizadores e de que países estes são provenientes
|
||||
OPERLIST -Mostra uma lista de operadores
|
||||
BOTLIST -Mostra uma lista dos bots online (apenas se o seu IRCD suportar uma flag de bot)
|
||||
VERSION -Mostra a versão do bot StatServ em uso
|
||||
|
||||
Comandos disponíveis para Administradores:
|
||||
FORCEHTML -Força uma actualização do ficheiro HTML
|
||||
RESET -Apaga todas as estatísticas e recomeça do ponto zero
|
||||
STATS -Apaga/copia informação de servidores
|
||||
[3.3] O commando SERVER
|
||||
/msg statserv server
|
||||
Devolve:
|
||||
=StatServ= Error, the Syntax is Incorrect. Please Specify a Server
|
||||
=StatServ= Server Listing:
|
||||
=StatServ= Server: stats.dynam.ac (*)
|
||||
=StatServ= Server: services.dynam.ac (*)
|
||||
=StatServ= Server: Server.IRC.net (*)
|
||||
=StatServ= Server: blha.com (*)
|
||||
=StatServ= Server: Server2.IRC.net (*)
|
||||
=StatServ= ***** End of List (* indicates Server is online at the moment) *****
|
||||
/msg statserv server <servername>
|
||||
Devolve:
|
||||
=StatServ= Statistics for services.dynam.ac since [Mar (Thu 21) 2002 08:47 [PM/SGT]]
|
||||
=StatServ= Current Users: 7 (70%)
|
||||
=StatServ= Maximum Users: 7 at [Mar (Thu 21) 2002 08:47 [PM/SGT]]
|
||||
=StatServ= Current Opers: 5
|
||||
=StatServ= Maximum Opers: 5 at [Mar (Thu 21) 2002 08:47 [PM/SGT]]
|
||||
=StatServ= IRCop Kills: 0
|
||||
=StatServ= Server Kills: 0
|
||||
=StatServ= Lowest Ping: 0 at [Jan (Thu 01) 1970 07:30 [AM/SGT]]
|
||||
=StatServ= Higest Ping: 0 at [Jan (Thu 01) 1970 07:30 [AM/SGT]]
|
||||
=StatServ= Current Ping: 0
|
||||
=StatServ= services.dynam.ac has never split from the Network.
|
||||
=StatServ= ***** End of Statistics *****
|
||||
[3.4] O comando MAP
|
||||
/msg statserv map
|
||||
Devolve:
|
||||
=StatServ= [NAME] [USERS/MAX] [OPERS/MAX] [LAG/MAX]
|
||||
=StatServ= stats.dynam.ac [ 2/2 ] [ 0/0 ] [ 0/0 ]
|
||||
=StatServ= \_Server.IRC.net [ 1/1 ] [ 0/1 ] [ 0/0 ]
|
||||
=StatServ= | \_services.dynam.ac [ 7/7 ] [ 5/5 ] [ 0/0 ]
|
||||
=StatServ= | | \_blha.com [ 0/0 ] [ 0/0 ] [ 0/1 ]
|
||||
=StatServ= | \_Server2.IRC.net [ 0/0 ] [ 0/0 ] [ 0/1 ]
|
||||
=StatServ= --- End of Listing ---
|
||||
[3.5] O comando NETSTATS
|
||||
/msg statserv netstats
|
||||
Devolve:
|
||||
=StatServ= Network Statistics:-----
|
||||
=StatServ= Current Users: 10
|
||||
=StatServ= Maximum Users: 10 [[Mar (Thu 21) 2002 08:47 [PM/SGT]]]
|
||||
=StatServ= Current Channels 0
|
||||
=StatServ= Maximum Channels 2 [[Mar (Fri 22) 2002 09:46 [PM/SGT]]]
|
||||
=StatServ= Current Opers: 5
|
||||
=StatServ= Maximum Opers: 6 [[Mar (Thu 21) 2002 08:47 [PM/SGT]]]
|
||||
=StatServ= Users Set Away: 0
|
||||
=StatServ= Current Servers: 5
|
||||
=StatServ= Maximum Servers: 5 [[Mar (Thu 21) 2002 08:47 [PM/SGT]]]
|
||||
=StatServ= --- End of List ---
|
||||
[3.6] O comando DAILY
|
||||
/msg statserv daily
|
||||
Devolve:
|
||||
=StatServ= Daily Network Statistics:
|
||||
=StatServ= Maximum Servers: 5 [Mar (Wed 27) 2002 12:31 [PM/SGT]]
|
||||
=StatServ= Maximum Users: 10 [Mar (Wed 27) 2002 12:31 [PM/SGT]]
|
||||
=StatServ= Maximum Chans: 0 [Jan (Thu 01) 1970 07:30 [AM/SGT]]
|
||||
=StatServ= Maximum Opers: 5 [Mar (Wed 27) 2002 12:31 [PM/SGT]]
|
||||
=StatServ= All Daily Statistics are reset at Midnight
|
||||
=StatServ= End of Information.
|
||||
[3.7] O comando TLD
|
||||
/msg statserv tld <domain>
|
||||
Devolve:
|
||||
-> *statserv* tld sg
|
||||
=StatServ= Singapore (sg)
|
||||
[3.8] O comando TLDMAP
|
||||
/msg statserv tldmap
|
||||
Devolve:
|
||||
=StatServ= Top Level Domain Statistics:
|
||||
=StatServ= net 9 (90%) -> Generic Top Level Domain (net) ---> Daily Total: 33
|
||||
=StatServ= num 1 (10%) -> UnResolved (num) ---> Daily Total: 25
|
||||
=StatServ= End of List
|
||||
[3.9] O comando OPERLIST
|
||||
/msg statserv operlist
|
||||
Devolve:
|
||||
=StatServ= For Help: /msg StatServ HELP OPERLIST
|
||||
=StatServ= On-Line IRCops:
|
||||
=StatServ= [ 1] OperServ +ioSqd services.dynam.ac 200
|
||||
=StatServ= [ 2] SS +iSqd services.dynam.ac 200
|
||||
=StatServ= [ 3] ChanServ +oSqd services.dynam.ac 200
|
||||
=StatServ= [ 4] StatServ +d stats.dynam.ac 200
|
||||
=StatServ= [ 5] HelpServ +Sqd services.dynam.ac 200
|
||||
=StatServ= [ 6] MemoServ +oSqd services.dynam.ac 200
|
||||
=StatServ= [ 7] NeoStats +d stats.dynam.ac 200
|
||||
=StatServ= [ 8] Global +ioSqd services.dynam.ac 200
|
||||
=StatServ= [ 9] NickServ +oSqd services.dynam.ac 200
|
||||
=StatServ= [10] Fish -a Server.IRC.net 185
|
||||
=StatServ= End of Listing.
|
||||
/msg statserv operlist noaway
|
||||
Devolve:
|
||||
=StatServ= On-Line IRCops (Not Away):
|
||||
=StatServ= [ 1] OperServ +ioSqd services.dynam.ac 200
|
||||
=StatServ= [ 2] SS +iSqd services.dynam.ac 200
|
||||
=StatServ= [ 3] ChanServ +oSqd services.dynam.ac 200
|
||||
=StatServ= [ 4] StatServ +d stats.dynam.ac 200
|
||||
=StatServ= [ 5] HelpServ +Sqd services.dynam.ac 200
|
||||
=StatServ= [ 6] MemoServ +oSqd services.dynam.ac 200
|
||||
=StatServ= [ 7] NeoStats +d stats.dynam.ac 200
|
||||
=StatServ= [ 8] Global +ioSqd services.dynam.ac 200
|
||||
=StatServ= [ 9] NickServ +oSqd services.dynam.ac 200
|
||||
=StatServ= End of Listing.
|
||||
/msg statserv operlist <server>
|
||||
Devolve:
|
||||
=StatServ= On-Line IRCops on Server server.irc.net
|
||||
=StatServ= [ 1] Fish -a Server.IRC.net 185
|
||||
=StatServ= End of Listing.
|
||||
|
||||
[3.10] O comando BOTLIST
|
||||
/msg statserv botlist
|
||||
Devolve:
|
||||
=StatServ= On-Line Bots:
|
||||
=StatServ= End of Listing.
|
||||
|
||||
[3.11] O comando VERSION
|
||||
/msg statserv version
|
||||
Devolve:
|
||||
=StatServ= StatServ Version Information
|
||||
=StatServ= -------------------------------------
|
||||
=StatServ= StatServ Version: 3.1 Compiled Mar 27 2002 at 12:22:27
|
||||
=StatServ= http://www.neostats.net
|
||||
=StatServ= -------------------------------------
|
||||
=StatServ= HTML Stats is: /var/www/html/stats/index.html
|
||||
[3.12] O comando FORCEHTML
|
||||
/msg statserv forcehtml
|
||||
Devolve:
|
||||
<StatServ> Fish Forced the NeoStats Statistics HTML file to be updated with the most current statistics
|
||||
[3.13] O comando RESET
|
||||
/msg statserv reset
|
||||
Devolve:
|
||||
<StatServ> Fish Wants me to RESET the databases.. here goes..
|
||||
[3.14] O comando STATS
|
||||
/msg statserv stats list
|
||||
Devolve:
|
||||
=StatServ= Statistics Database:
|
||||
=StatServ= [1 ] stats.dynam.ac
|
||||
=StatServ= [2 ] services.dynam.ac
|
||||
=StatServ= [3 ] Server.IRC.net
|
||||
=StatServ= [4 ] blha.com
|
||||
=StatServ= [5 ] Server2.IRC.net
|
||||
=StatServ= End of List.
|
||||
/msg statserv stats del <servername>
|
||||
Devolve:
|
||||
=StatServ= Removed blha.com from the database.
|
||||
/msg statserv stats copy <name> <newname>
|
||||
=StatServ= Copied Server data from <name> to <newname>
|
||||
[3.15] A sintaxe HTML
|
||||
Por predefinição, o StatServ usa um ficheiro chamado index.tpl na directoria data como o molde para a exportação.
|
||||
De momento, o sistema de moldes é muito básico, e exportará tabelas contendo a informação pedida.
|
||||
Todas as variáveis do molde estão incluidas em "!"
|
||||
As variáveis de molde disponíveis são:
|
||||
!MAP! -Exporta um mapa da rece similar a /msg statserv map num formato de tabela
|
||||
!SRVLIST! -Exporta uma lista completa de todos os servidores que o StatServ 'viu', acompanhados de informação detalhada, fornecida pela variável !SRVLISTDET!
|
||||
!NETSTATS! -Exporta estatísticas da rede similares a /msg statserv netstats
|
||||
!DAILYSTATS! -Exporta estatísticas diárias similares a /msg statserv daily
|
||||
!DAILYTOPCHAN! -Exporta os 10 canais mais usados, baseado no número de utilizadores
|
||||
!TOP10CHAN! -Exporta os 10 canais onde se verificou maior número de 'entradas' (joins)
|
||||
!TOP10KICKS! -Exporta os 10 canais onde se verifiou maior número de kicks
|
||||
!TOP10TOPICS! -Exporta os 10 canais onde se verificou maior alteração de tópico
|
||||
!VERSION! -Exporta a versão do StatServ/NeoStats em uso
|
||||
|
||||
O StatServ também exporta alguma informação acerca de quando a página foi criada, e qual o software que a criou, como predefinição no fim da página HTML. Esta opção não pode ser desactivada. (Desculpe, mas é a nossa pequena publicidade por todo o trabalho árduo que tivemos para criar o NeoStats para você o usar!)
|
||||
Um molde exemplar é-lhe fornecido para não necessitar de perder tempo a fazer o seu próprio molde. Se desejar criar o seu próprio molde, substitua o ficheiro index.tpl no directório data pela sua versão.
|
||||
|
||||
[4] Informação de suporte
|
||||
[4.1] Como conseguir suporte
|
||||
Poderá conseguir suporte para o NeoStats de diversas formas. A primeira maneira é através dos nossos forums, disponíveis em:
|
||||
http://www.neostats.net/boards/
|
||||
Também pode tentar o nosso canal no IRC, irc://irc.irc-chat.net/neostats mas note que nem sempre estamos disponíveis no canal para o ajudar.
|
||||
Lá existe um bot, o NeoServ, que contém informação acerca dos últimos bugs/suporte (duplicado dos forums NeoStats)
|
||||
Por fim, poderá enviar um email para support@neostats.net
|
||||
[4.2] Que informação deverá ter disponível para receber suporte
|
||||
É sempre benéfico fornecer o maior número de informação quando procurar por ajuda. Certifique-se que inclui a seguinte informação:
|
||||
Versão do sistema operativo (ex: Redhat, Mandrake, etc)
|
||||
Versão do gcc (através do comando gcc -v)
|
||||
Versão do NeoStats que está a usar e se o problema é com um módulo, a versão do módulo (através do comando /msg neostats modlist)
|
||||
O tipo de IRCD que está a usar com o NeoStats (e a versão do mesmo)
|
||||
Poderemos pedir que active a opção debugging e nos fornecer os resultados. Se é este o caso, você precisará de reconfigurar o NeoStats com a seguinte opção:
|
||||
./configure --enable-debug (e quaisquer outras opções que possa necessitar, como o tipo de IRCD e lista de módulos)
|
||||
"make"
|
||||
./neostats
|
||||
Quando o NeoStats crashar, ou o problema se reproduzir, por favor envie-nos os ficheiros:
|
||||
logs/stats.log
|
||||
logs/recv.log
|
||||
|
||||
e isso ajudar-nos-á a reproduzir o problema
|
||||
|
||||
De qualquer forma, é este o manual, obrigado por ter tido tempo para o ler (levou-me algumas horas a fazê-lo!) e divirta-se com o NeoStats. Se desejar submeter um pedido para nova funcionalidade, por favor visite os nossos fórums em http://www.neostats.net/boards/
|
||||
|
||||
A equipa NeoStats é composta por:
|
||||
Shmad (Shmad@neostats.net)
|
||||
^Enigma^ (enigma@neostats.net)
|
||||
Fish (fish@neostats.net)
|
||||
|
||||
Traduzido por ErroR|51
|
1293
doc/old/USERMAN
1293
doc/old/USERMAN
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
3179
doc/old/USERMAN.xml
3179
doc/old/USERMAN.xml
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
cat FAQ |more
|
|
@ -1,2 +0,0 @@
|
|||
cat USERMAN |more
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
sub pkg_load {
|
||||
print "hello world\n";
|
||||
}
|
||||
|
||||
|
||||
NeoStats::register( "Test Script 1", "1.0",
|
||||
"Test Script 1 description" );
|
|
@ -1,8 +0,0 @@
|
|||
sub pkg_load {
|
||||
print "hello world\n";
|
||||
print "this is my stupid message\n";
|
||||
NeoStats::print("and this is a neostats message\n");
|
||||
}
|
||||
NeoStats::register( "Test Script 2", "2.0",
|
||||
"Test Script 2 Description" );
|
||||
pkg_load();
|
|
@ -1,40 +0,0 @@
|
|||
/* NeoStats - IRC Statistical Services
|
||||
** Copyright (c) 1999-2008 Adam Rutter, Justin Hammond, Mark Hetherington
|
||||
** http://www.neostats.net/
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation; either version 2 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id$
|
||||
*/
|
||||
|
||||
#ifndef _RTASERV_H_
|
||||
#define _RTASERV_H_
|
||||
|
||||
#include "rta.h"
|
||||
|
||||
extern TBLDEF neo_bans;
|
||||
extern TBLDEF neo_chans;
|
||||
extern TBLDEF neo_users;
|
||||
extern TBLDEF neo_modules;
|
||||
extern TBLDEF neo_servers;
|
||||
|
||||
void rta_hook_1( fd_set *read_fd_set, fd_set *write_fd_set );
|
||||
void rta_hook_2( fd_set *read_fd_set, fd_set *write_fd_set );
|
||||
void rtaserv_init( void );
|
||||
void rtaserv_fini( void );
|
||||
|
||||
#endif /* _RTASERV_H_ */
|
|
@ -1,6 +0,0 @@
|
|||
noinst_LIBRARIES = librtadb.a
|
||||
noinst_HEADERS = do_sql.h parse.tab.h rta.h
|
||||
librtadb_a_SOURCES = parse.y token.l api.c do_sql.c rtatables.c
|
||||
AM_CFLAGS = -I../pcre -I../adns -I../curl
|
||||
CLEANFILES = parse.c token.c
|
||||
include $(top_srcdir)/autotools/rules.mk
|
|
@ -1,603 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
SOURCES = $(librtadb_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/autotools/rules.mk parse.c \
|
||||
token.c
|
||||
subdir = lib/rta
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \
|
||||
$(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_curl.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_pcre.m4 \
|
||||
$(top_srcdir)/autotools/ccdv.m4 \
|
||||
$(top_srcdir)/autotools/libevent.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h \
|
||||
$(top_builddir)/lib/gdbm/autoconf.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
librtadb_a_AR = $(AR) $(ARFLAGS)
|
||||
librtadb_a_LIBADD =
|
||||
am_librtadb_a_OBJECTS = parse.$(OBJEXT) token.$(OBJEXT) api.$(OBJEXT) \
|
||||
do_sql.$(OBJEXT) rtatables.$(OBJEXT)
|
||||
librtadb_a_OBJECTS = $(am_librtadb_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/lib/gdbm
|
||||
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
|
||||
LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
|
||||
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
|
||||
LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
|
||||
$(AM_YFLAGS)
|
||||
SOURCES = $(librtadb_a_SOURCES)
|
||||
DIST_SOURCES = $(librtadb_a_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkglibdir = $(prefix)/modules
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_CURL_FALSE = @BUILD_CURL_FALSE@
|
||||
BUILD_CURL_TRUE = @BUILD_CURL_TRUE@
|
||||
BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@
|
||||
BUILD_PCRE_TRUE = @BUILD_PCRE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CCDV = @CCDV@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CFLAGS = @CURL_CFLAGS@
|
||||
CURL_LIBS = @CURL_LIBS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EVNTLIBOBJS = @EVNTLIBOBJS@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBDB = @LIBDB@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MODULES = @MODULES@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PCRE_CFLAGS = @PCRE_CFLAGS@
|
||||
PCRE_LIBS = @PCRE_LIBS@
|
||||
POW_LIB = @POW_LIB@
|
||||
PROTOCOL = @PROTOCOL@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USECCDV = @USECCDV@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = $(prefix)/data
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
wi_PWD = @wi_PWD@
|
||||
noinst_LIBRARIES = librtadb.a
|
||||
noinst_HEADERS = do_sql.h parse.tab.h rta.h
|
||||
librtadb_a_SOURCES = parse.y token.l api.c do_sql.c rtatables.c
|
||||
AM_CFLAGS = -I../pcre -I../adns -I../curl
|
||||
CLEANFILES = parse.c token.c
|
||||
LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .l .lo .o .obj .y
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/autotools/rules.mk $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rta/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/rta/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
librtadb.a: $(librtadb_a_OBJECTS) $(librtadb_a_DEPENDENCIES)
|
||||
-rm -f librtadb.a
|
||||
$(librtadb_a_AR) librtadb.a $(librtadb_a_OBJECTS) $(librtadb_a_LIBADD)
|
||||
$(RANLIB) librtadb.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/do_sql.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtatables.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/token.Po@am__quote@
|
||||
|
||||
.l.c:
|
||||
$(LEXCOMPILE) $<
|
||||
sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
|
||||
rm -f $(LEX_OUTPUT_ROOT).c
|
||||
|
||||
.y.c:
|
||||
$(YACCCOMPILE) $<
|
||||
if test -f y.tab.h; then \
|
||||
to=`echo "$*_H" | sed \
|
||||
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
|
||||
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
|
||||
sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \
|
||||
y.tab.h >$*.ht; \
|
||||
rm -f y.tab.h; \
|
||||
if cmp -s $*.ht $*.h; then \
|
||||
rm -f $*.ht ;\
|
||||
else \
|
||||
mv $*.ht $*.h; \
|
||||
fi; \
|
||||
fi
|
||||
if test -f y.output; then \
|
||||
mv y.output $*.output; \
|
||||
fi
|
||||
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
|
||||
rm -f y.tab.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(mkdir_p) $(distdir)/../../autotools
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f parse.c
|
||||
-rm -f token.c
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
|
||||
.c.o:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
|
||||
.c.lo:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
@list='ls .libs/*.so'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_dataDATA: $(dist_data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
$(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,30 +0,0 @@
|
|||
RTA gives you run time access to the data in your program.
|
||||
It is intended for embedded system developers and can
|
||||
greatly simplify user-interface programs by separating the
|
||||
daemon proper from the UI programs.
|
||||
|
||||
It is a specialized memory resident database interface
|
||||
and/or virtual file system interface. It is not a
|
||||
stand-alone server but a library which attaches to your
|
||||
program and offers up your program's internal structures
|
||||
and arrays as data base tables or as files in a file
|
||||
system. It uses a subset of the Postgres protocol and is
|
||||
compatible with the Postgres bindings for "C", PHP, and
|
||||
the Postgres command line tool, psql.
|
||||
|
||||
The most recent release adds the ability to access your
|
||||
internal tables as files in a virtual file system. This
|
||||
ability gives your programs the same power /proc gives
|
||||
the kernel.
|
||||
|
||||
Please see http://www.linuxappliancedesign.com for more
|
||||
information and a working example.
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
|
@ -1,703 +0,0 @@
|
|||
|
||||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* api.c -- routines to provide a PostgreSQL DB API to
|
||||
* embedded systems.
|
||||
**************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* for mkstemp() */
|
||||
#include <libgen.h> /* for dirname() */
|
||||
#include <string.h> /* for strlen() */
|
||||
#include <limits.h> /* for PATH_MAX */
|
||||
#ifdef SYSLOG
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include "neostats.h"
|
||||
#include "rta.h" /* for various constants */
|
||||
#include "do_sql.h" /* for LOC */
|
||||
|
||||
/* Tbl and Col contain pointers to table and column
|
||||
* definitions of all tables and columns in * the system.
|
||||
* Ntbl and Ncol are the number of tables and columns in each
|
||||
* list. These are used often enough that they are globals. */
|
||||
TBLDEF *Tbl[MX_TBL];
|
||||
int Ntbl;
|
||||
COLDEF *Col[MX_COL];
|
||||
int Ncol;
|
||||
|
||||
extern struct EpgDbg rtadbg;
|
||||
|
||||
EpgConn *getconndata(int id);
|
||||
|
||||
EpgConn *
|
||||
getconndata(int id)
|
||||
{
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
|
||||
lnode = list_first(pgconn);
|
||||
while (lnode) {
|
||||
conn = lnode_get(lnode);
|
||||
if (conn->id == id)
|
||||
return conn;
|
||||
lnode = list_next(pgconn, lnode);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_init(): - Initialize all internal system tables.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
**************************************************************/
|
||||
void
|
||||
rta_init(logcb logfunc)
|
||||
{
|
||||
int i; /* loop index */
|
||||
extern TBLDEF pg_userTable;
|
||||
extern TBLDEF rta_tablesTable;
|
||||
extern TBLDEF rta_columnsTable;
|
||||
#ifdef SHWDBGTBL
|
||||
extern TBLDEF rta_dbgTable;
|
||||
#endif
|
||||
extern TBLDEF rta_statTable;
|
||||
extern TBLDEF pg_connTable;
|
||||
#ifdef SYSLOG
|
||||
extern void restart_syslog();
|
||||
#else
|
||||
RTA_Conf.loggingfunc = logfunc;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MX_TBL; i++)
|
||||
{
|
||||
Tbl[i] = (TBLDEF *) 0;
|
||||
}
|
||||
Ntbl = 0;
|
||||
|
||||
/* init the pgconn structure */
|
||||
pgconn = list_create(-1);
|
||||
pg_connTable.address = pgconn;
|
||||
|
||||
/* add system and internal tables here */
|
||||
(void) rta_add_table(&rta_tablesTable);
|
||||
(void) rta_add_table(&rta_columnsTable);
|
||||
(void) rta_add_table(&pg_userTable);
|
||||
(void) rta_add_table(&pg_connTable);
|
||||
#ifdef SHWDBGTBL
|
||||
(void) rta_add_table(&rta_dbgTable);
|
||||
#endif
|
||||
(void) rta_add_table(&rta_statTable);
|
||||
#ifdef SYSLOG
|
||||
restart_syslog((char *) 0, (char *) 0, (char *) 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
rta_exit(void)
|
||||
{
|
||||
list_destroy_auto (pgconn);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_add_table(): - Add one table to the list of
|
||||
* tables in the system. If the table has an associated
|
||||
* "savefile" we try to open the savefile and execute any SQL
|
||||
* commands found there.
|
||||
*
|
||||
* Input: ptbl: pointer to the table to add
|
||||
* Output: RTA_SUCCESS - Add successful
|
||||
* RTA_DUP - Table is already in the list. (Note
|
||||
* that this might not be an error since
|
||||
* we can allow redefinition of a table)
|
||||
* RTA_ERROR - The passed table definition has a
|
||||
* problem which prevents its addition.
|
||||
* A syslog error message describes the
|
||||
* problem
|
||||
**************************************************************/
|
||||
int
|
||||
rta_add_table(TBLDEF *ptbl)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
extern TBLDEF rta_columnsTable;
|
||||
int i, j; /* a loop index */
|
||||
|
||||
/* Error if at Ntbl limit */
|
||||
if (Ntbl == MX_TBL)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Max_Tbls);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify that table name is unique */
|
||||
i = 0;
|
||||
while (i < Ntbl)
|
||||
{
|
||||
if (!strncmp(ptbl->name, Tbl[i]->name, MXTBLNAME))
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Tbl_Dup, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
/* verify lenght of table name */
|
||||
if (strlen(ptbl->name) > MXTBLNAME)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Tname_Big, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify savefile name is a valid pointer */
|
||||
if (ptbl->savefile == (char *) 0)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Type, "savefile");
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Check the upper bound on # columns / table */
|
||||
if (ptbl->ncol > NCMDCOLS)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Cmd_Cols, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify that column names are unique within table */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
for (j = 0; j < i; j++)
|
||||
{
|
||||
if (!strncmp(ptbl->cols[i].name, ptbl->cols[j].name, MXCOLNAME))
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Dup, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* verify column name length, help length, data type, and flag
|
||||
contents */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
if (strlen(ptbl->cols[i].name) > MXCOLNAME)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Cname_Big, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (strlen(ptbl->cols[i].help) > MXHELPSTR)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Hname_Big, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (ptbl->cols[i].type > MXCOLTYPE)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Type, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (ptbl->cols[i].flags > RTA_DISKSAVE + RTA_READONLY)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Flag, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* Verify that we can add the columns */
|
||||
if ((Ncol + ptbl->ncol) >= MX_COL)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Max_Cols);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Everything looks OK. Add table and columns */
|
||||
Tbl[Ntbl++] = ptbl;
|
||||
Tbl[0]->nrows = Ntbl;
|
||||
|
||||
/* Add columns to list of column pointers */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
Col[Ncol++] = &(ptbl->cols[i]);
|
||||
}
|
||||
rta_columnsTable.nrows += ptbl->ncol;
|
||||
|
||||
/* Execute commands in the save file to restore */
|
||||
if (ptbl->savefile && strlen(ptbl->savefile) > 0)
|
||||
(void) rta_load(ptbl, ptbl->savefile);
|
||||
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* Postgres "packets" are identified by their first few bytes.
|
||||
* The newer protocol used a single ASCII byte to identify the
|
||||
* packet type, while the older protocol has a 32 bit length
|
||||
* field at the start of the packet. Note that multi-byte data
|
||||
* is sent with the most significant byte first. Please see the
|
||||
* full documentation in "PostgreSQL 7.2.1 Developer's Guide"
|
||||
* at http://www.postgresql.org/idocs/
|
||||
*
|
||||
* The Postgres protocol from client to server has about six
|
||||
* request types. We use three of the request types in our
|
||||
* basic implementation. The six packet types.....
|
||||
* BYTE0 BYTE1 BYTE2 BYTE3
|
||||
* 0 0 0x1 0x18 Startup packet to open connection
|
||||
* 0 ? ? ? Encrypted password packet
|
||||
* 0 0 0 0x10 Cancel pending request
|
||||
* 'F' Function call
|
||||
* 'Q' Query
|
||||
* 'X' Terminate connection
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* dbcommand(): - Depacketize and execute any Postgres
|
||||
* commands in the input buffer.
|
||||
*
|
||||
* Input: buf - the buffer with the Postgres packet
|
||||
* nin - on entry, the number of bytes in 'buf',
|
||||
* on exit, the number of bytes remaining in buf
|
||||
* out - the buffer to hold responses back to client
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return: RTA_SUCCESS - executed one command
|
||||
* RTA_NOCMD - input did not have a full cmd
|
||||
* RTA_ERROR - some kind of error
|
||||
* RTA_CLOSE - client requests a orderly close
|
||||
**************************************************************/
|
||||
int
|
||||
dbcommand(char *buf, int *nin, char *out, int *nout, int connid)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
int length; /* lenght of the packet if old protocol */
|
||||
int i; /* a temp integer */
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
char line[MX_LN_SZ]; /* input line from file */
|
||||
char reply[MX_LN_SZ]; /* response from SQL process */
|
||||
int nreply; /* number of free bytes in reply */
|
||||
|
||||
|
||||
/* old style packet if first byte is zero */
|
||||
if ((int) buf[0] == 0)
|
||||
{
|
||||
/* get length. Enough bytes for a length? if not, consume no
|
||||
input, write no output */
|
||||
if (*nin < 4)
|
||||
{
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
length = (int) (buf[3] + (buf[2] << 8) + (buf[1] << 16));
|
||||
|
||||
/* Is the whole packet here? If not, consume no input, write no
|
||||
output */
|
||||
if (*nin < length)
|
||||
{
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
if (length == 296) /* a startup request */
|
||||
{
|
||||
/* we key on a non-null user name to send AuthOK. The protocol
|
||||
packet has an int32 for the length, an int32 for the protocol
|
||||
version, a 64 char string for the DB name and at byte 72 the
|
||||
start of a 32 char user name. */
|
||||
if (buf[72] == (char) 0)
|
||||
{
|
||||
*nin -= length;
|
||||
out[0] = 'N'; /* "Notice" response */
|
||||
*nout -= 1;
|
||||
rtastat.nauth++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* first thing we do is find the hash for this struct? */
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
{
|
||||
snprintf(conn->cmd, 1000, "Re-Authenticating");
|
||||
snprintf((char *) conn->username, 32, "%s", &buf[72]);
|
||||
conn->rsp[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
conn = ns_calloc (sizeof(EpgConn));
|
||||
snprintf(conn->cmd, 1000, "Authenticating");
|
||||
snprintf((char *) conn->username, 32, "%s", &buf[72]);
|
||||
conn->id = connid;
|
||||
conn->ctm = time(NULL);
|
||||
lnode = lnode_create(conn);
|
||||
list_append(pgconn, lnode);
|
||||
}
|
||||
*nin -= length;
|
||||
out[0] = 'R';
|
||||
out[1] = 0;
|
||||
out[2] = 0;
|
||||
out[3] = 0;
|
||||
out[4] = 3;
|
||||
// out[5] = 'Z';
|
||||
// *out++ = 'R';
|
||||
// ad_int4 (&buf, 0);
|
||||
// *out++ = 'Z';
|
||||
*nout -= 5;
|
||||
}
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else if (length == 16) /* a cancel request */
|
||||
{
|
||||
/* ignore the request for now */
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
{
|
||||
snprintf((char *) conn->cmd, 1000, "Cancel Call");
|
||||
conn->rsp[0] = '\0';
|
||||
}
|
||||
*nin -= length;
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else /* should be a password */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (!conn)
|
||||
{
|
||||
/* pass before username (and thus conn?) Bah */
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
snprintf((char *) conn->password, 32, "%s", &buf[4]);
|
||||
nreply = MX_LN_SZ;
|
||||
snprintf(line, MX_LN_SZ,
|
||||
"select * from pg_user where usename=\"%s\" and passwd = \"%s\"",
|
||||
conn->username, conn->password);
|
||||
SQL_string(line, reply, &nreply);
|
||||
if (nreply != 1279)
|
||||
{
|
||||
/* SQL command failed! Report error */
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_BadPass);
|
||||
*nin -= length;
|
||||
out[0] = 'E';
|
||||
out[1] = 'B';
|
||||
out[2] = 'A';
|
||||
out[3] = 'D';
|
||||
out[4] = ' ';
|
||||
out[5] = 'U';
|
||||
out[6] = 'S';
|
||||
out[7] = 'E';
|
||||
out[8] = 'R';
|
||||
out[9] = '/';
|
||||
out[10] = 'P';
|
||||
out[11] = 'A';
|
||||
out[12] = 'S';
|
||||
out[13] = 'S';
|
||||
out[14] = 0;
|
||||
*nout -= 15;
|
||||
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
|
||||
/* XXX validate it */
|
||||
*nin -= length;
|
||||
out[0] = 'R';
|
||||
out[1] = 0;
|
||||
out[2] = 0;
|
||||
out[3] = 0;
|
||||
out[4] = 0;
|
||||
out[5] = 'Z';
|
||||
*nout -= 6;
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
}
|
||||
else if (buf[0] == 'Q') /* a query request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
/* check for a complete command */
|
||||
for (i = 0; i < *nin; i++)
|
||||
{
|
||||
if (buf[i] == (char) 0)
|
||||
break;
|
||||
}
|
||||
if (i == *nin)
|
||||
{
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 50000, "Reading Query");
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
/* Got a null terminated command; do it. (buf[1] since the SQL
|
||||
follows the 'Q') */
|
||||
if (!conn)
|
||||
{
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
snprintf((char *) conn->cmd, 1000, "Query: %s", &buf[1]);
|
||||
SQL_string(&buf[1], out, nout);
|
||||
snprintf((char *) conn->rsp, 50000, "%s", out);
|
||||
*nin -= strlen(buf); /* to swallow the cmd */
|
||||
(*nin)--; /* to swallow the null */
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else if (buf[0] == 'X') /* a terminate request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000, "Disconnecting");
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
else if (buf[0] == 'F') /* a function request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000,
|
||||
"Unsupported Function Call. Disconnecting");
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000, "Unsupported Call. Disconnecting");
|
||||
|
||||
/* an unknown request (should be logged?) */
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
|
||||
void
|
||||
deldbconnection(int connid)
|
||||
{
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
|
||||
lnode = list_first(pgconn);
|
||||
while (lnode)
|
||||
{
|
||||
conn = lnode_get(lnode);
|
||||
if (conn->id == connid) {
|
||||
list_delete(pgconn, lnode);
|
||||
lnode_destroy(lnode);
|
||||
free(conn);
|
||||
return;
|
||||
}
|
||||
lnode = list_next(pgconn, lnode);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_save(): - Save a table to file. The save format is a
|
||||
* series of UPDATE commands saved in the file specified. The
|
||||
* file is typically read in later and executed one line at a
|
||||
* time.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be saved
|
||||
* fname - string with name of the save file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table saved
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int
|
||||
rta_save(TBLDEF *ptbl, char *fname)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
int sr; /* the Size of each Row in the table */
|
||||
int rx; /* Row indeX in for() loop */
|
||||
void *pd; /* Pointer to the Data in the table/column */
|
||||
int cx; /* Column index while building Data pkt */
|
||||
char tfile[PATH_MAX];
|
||||
char path[PATH_MAX];
|
||||
int fd; /* file descriptor of temp file */
|
||||
FILE *ftmp; /* FILE handle to the temp file */
|
||||
int did_header; /* == 1 if printed UPDATE part */
|
||||
int did_1_col; /* == 1 if at least one col printed */
|
||||
|
||||
/* Open a temp file in the same directory as the users target file */
|
||||
(void) strncpy(path, fname, PATH_MAX);
|
||||
(void) strncpy(tfile, dirname(path), PATH_MAX);
|
||||
(void) strcat(tfile, "/tmpXXXXXX");
|
||||
fd = mkstemp(tfile);
|
||||
if (fd < 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, tfile);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
ftmp = fdopen(fd, "w");
|
||||
if (ftmp == (FILE *) 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, tfile);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* OK, temp file is open and ready to receive table data */
|
||||
sr = ptbl->rowlen;
|
||||
|
||||
for (rx = 0; rx < ptbl->nrows; rx++)
|
||||
{
|
||||
did_header = 0;
|
||||
did_1_col = 0;
|
||||
for (cx = 0; cx < ptbl->ncol; cx++)
|
||||
{
|
||||
if (!ptbl->cols[cx].flags & RTA_DISKSAVE)
|
||||
continue;
|
||||
if (!did_header)
|
||||
{
|
||||
fprintf(ftmp, "UPDATE %s SET", ptbl->name);
|
||||
did_header = 1;
|
||||
}
|
||||
if (!did_1_col)
|
||||
fprintf(ftmp, " %s ", ptbl->cols[cx].name);
|
||||
else
|
||||
fprintf(ftmp, ", %s ", ptbl->cols[cx].name);
|
||||
|
||||
/* compute pointer to actual data */
|
||||
pd = ptbl->address + (rx * sr) + ptbl->cols[cx].offset;
|
||||
switch ((ptbl->cols[cx]).type)
|
||||
{
|
||||
case RTA_STR:
|
||||
if (memchr((char *) pd, '"', ptbl->cols[cx].length))
|
||||
fprintf(ftmp, "= \'%s\'", (char *) pd);
|
||||
else
|
||||
fprintf(ftmp, "= \"%s\"", (char *) pd);
|
||||
break;
|
||||
case RTA_PSTR:
|
||||
if (memchr((char *) pd, '"', ptbl->cols[cx].length))
|
||||
fprintf(ftmp, "= \'%s\'", *(char **) pd);
|
||||
else
|
||||
fprintf(ftmp, "= \"%s\"", *(char **) pd);
|
||||
break;
|
||||
case RTA_INT:
|
||||
fprintf(ftmp, "= %d", *((int *) pd));
|
||||
break;
|
||||
case RTA_PINT:
|
||||
fprintf(ftmp, "= %d", **((int **) pd));
|
||||
break;
|
||||
case RTA_LONG:
|
||||
fprintf(ftmp, "= %lld", *((long long *) pd));
|
||||
break;
|
||||
case RTA_PLONG:
|
||||
fprintf(ftmp, "= %lld", **((long long **) pd));
|
||||
break;
|
||||
case RTA_PTR:
|
||||
|
||||
/* works only if INT and PTR are same size */
|
||||
fprintf(ftmp, "= %d", *((int *) pd));
|
||||
break;
|
||||
case RTA_FLOAT:
|
||||
fprintf(ftmp, "= %20.10f", *((float *) pd));
|
||||
break;
|
||||
case RTA_PFLOAT:
|
||||
fprintf(ftmp, "= %20.10f", **((float **) pd));
|
||||
break;
|
||||
}
|
||||
did_1_col = 1;
|
||||
}
|
||||
if (did_header)
|
||||
fprintf(ftmp, " LIMIT 1 OFFSET %d\n", rx);
|
||||
}
|
||||
|
||||
/* Done saving the data. Close the file and rename it to the
|
||||
location the user requested */
|
||||
|
||||
/* (BTW: we use rename() because it is guaranteed to be atomic.
|
||||
Rename() requires that both files be on the same partition; hence
|
||||
our effort to put the temp file in the same directory as the
|
||||
target file.) */
|
||||
(void) fclose(ftmp);
|
||||
if (rename(tfile, fname) != 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_load(): - Load a table from a file of UPDATE commands.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be loaded
|
||||
* fname - string with name of the load file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table loaded
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int
|
||||
rta_load(TBLDEF *ptbl, char *fname)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
FILE *fp; /* FILE handle to the load file */
|
||||
char *savefilename; /* table's savefile name */
|
||||
char line[MX_LN_SZ]; /* input line from file */
|
||||
char reply[MX_LN_SZ]; /* response from SQL process */
|
||||
int nreply; /* number of free bytes in reply */
|
||||
|
||||
/* We open the load file and read it one line at a time, executing
|
||||
each line that contains "UPDATE" as the first word. (Lines not
|
||||
starting with UPDATE are comments.) Note that any write callbacks
|
||||
associated with the table will be invoked. We hide the table's
|
||||
save file name, if any, in order to prevent the system from trying
|
||||
to save the table before we are done loading it. */
|
||||
fp = fopen(fname, "r");
|
||||
if (fp == (FILE *) 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Load, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Don't let the DB try to save changes right now */
|
||||
savefilename = ptbl->savefile;
|
||||
ptbl->savefile = (char *) 0;
|
||||
|
||||
/* process each line in the file */
|
||||
while (fgets(line, MX_LN_SZ, fp))
|
||||
{
|
||||
/* A comment if first word is not "UPDATE " */
|
||||
if (strncmp(line, "UPDATE ", 7))
|
||||
continue;
|
||||
|
||||
nreply = MX_LN_SZ;
|
||||
SQL_string(line, reply, &nreply);
|
||||
if (!strncmp(line, "UPDATE 1", 8))
|
||||
{
|
||||
/* SQL command failed! Report error */
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Load, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
ptbl->savefile = savefilename;
|
||||
|
||||
return (RTA_SUCCESS);
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,176 +0,0 @@
|
|||
|
||||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* do_sql.h
|
||||
**************************************************************/
|
||||
|
||||
#ifndef DO_SQL_H
|
||||
#define DO_SQL_H 1
|
||||
|
||||
#include "rta.h"
|
||||
|
||||
/* types of SQL statements recognized */
|
||||
#define RTA_SELECT 0
|
||||
#define RTA_UPDATE 1
|
||||
#define RTA_CALL 2
|
||||
#define RTA_BEGIN 3
|
||||
#define RTA_COMMIT 4
|
||||
|
||||
/* types of relations allowed in WHERE */
|
||||
#define RTA_EQ 0
|
||||
#define RTA_NE 1
|
||||
#define RTA_GT 2
|
||||
#define RTA_LT 3
|
||||
#define RTA_GE 4
|
||||
#define RTA_LE 5
|
||||
|
||||
/* SQL errors to the front ends */
|
||||
#define E_NOTABLE "EERROR: Relation '%s' does not exist\n"
|
||||
#define E_NOCOLUMN "EERROR: Attribute '%s' not found\n"
|
||||
#define E_BADPARSE "EERROR: SQL parse error\n",""
|
||||
#define E_BIGSTR "EERROR: String too long for '%s'\n"
|
||||
#define E_NOWRITE "EERROR: Can not update read-only column '%s'\n"
|
||||
#define E_FULLBUF "EERROR: Output buffer full\n",""
|
||||
|
||||
/* Defines for the meta tables. The table of tables must always be
|
||||
table #0, and the table of columns must always be table #1. */
|
||||
#define RTA_TABLES 0
|
||||
#define RTA_COLUMNS 1
|
||||
|
||||
/* Used to remove a few characters from dbg() lines */
|
||||
#define LOC __FILE__,__LINE__
|
||||
|
||||
/* Maximum number of characters in printed data type */
|
||||
#define MX_INT_STRING (12)
|
||||
#define MX_LONG_STRING (24)
|
||||
#define MX_FLOT_STRING (24)
|
||||
|
||||
/* Max # strings in our private stack for yacc */
|
||||
#define MXPARSESTR ((NCMDCOLS *2) + 4)
|
||||
|
||||
/** ************************************************************
|
||||
* This structure contains/encodes the parsed SQL command from
|
||||
* one of the UI or client interfaces.
|
||||
* This structure is filled in by the yacc parser. If the parse
|
||||
* is successful, the completed structure is passed to do_sql()
|
||||
* for execution.
|
||||
*
|
||||
* The 'command' is just the type of SQL command.
|
||||
* The 'cols' field is a list of names from the "SELECT cols"
|
||||
* or from the "UPDATE col=X [,...]".
|
||||
* The 'vals' field is a list of the strings "X" in an UPDATE.
|
||||
* The 'tbl' field has the name of the table in use.
|
||||
* The 'whrcols' and 'whrvals' fields are similar to the cols
|
||||
* and vals fields.
|
||||
* Note that cols, vals, whrcols, and whrvals in the structure
|
||||
* below point to alloc()'ed memory and must be freed when done.
|
||||
**************************************************************/
|
||||
struct Sql_Cmd
|
||||
{
|
||||
char *sqlcmd; /* points to text of SQL command */
|
||||
int command; /* RTA_SELECT, UPDATE, or CALL */
|
||||
char *tbl; /* the table in question */
|
||||
TBLDEF *ptbl; /* pointer to table in TBLDEFS */
|
||||
int itbl; /* Index of table in Tbl */
|
||||
int ncols; /* count of columns to display/update */
|
||||
char *cols[NCMDCOLS]; /* col to display/update */
|
||||
COLDEF *pcol[NCMDCOLS]; /* pointers to cols in COLDEFS */
|
||||
char *updvals[NCMDCOLS]; /* values for column updates */
|
||||
int updints[NCMDCOLS]; /* integer values for updates */
|
||||
long long updlngs[NCMDCOLS]; /* long values for updates */
|
||||
float updflot[NCMDCOLS]; /* float values for updates */
|
||||
int nwhrcols; /* count of columns in where clause */
|
||||
char *whrcols[NCMDCOLS]; /* cols in where */
|
||||
int whrrel[NCMDCOLS]; /* relation (EQ, GT...) in where */
|
||||
COLDEF *pwhr[NCMDCOLS]; /* pointers to Wcols in COLDEFS */
|
||||
char *whrvals[NCMDCOLS]; /* values in the where clause */
|
||||
int whrints[NCMDCOLS]; /* integer values of whrvals[] */
|
||||
long long whrlngs[NCMDCOLS]; /* long values of whrvals[] */
|
||||
float whrflot[NCMDCOLS]; /* float values of whrvals[] */
|
||||
int limit; /* max num rows to output, 0=no_limit */
|
||||
int offset; /* scan past this # rows before output */
|
||||
char *out; /* put command response here */
|
||||
int *nout; /* I/O number free bytes at 'out' */
|
||||
char *errout; /* ==out at start. But for err msgs */
|
||||
int nerrout; /* ==nout at start. But for err msgs */
|
||||
int err; /* set =1 if error in SQL parse */
|
||||
int nlineout; /* #bytes in SELECT row response */
|
||||
};
|
||||
|
||||
/* Define the debug config structure */
|
||||
struct EpgDbg
|
||||
{
|
||||
int syserr; /* !=0 to log system errors */
|
||||
int rtaerr; /* !=0 to log rta errors */
|
||||
int sqlerr; /* !=0 to log SQL errors */
|
||||
int trace; /* !=0 to log SQL commands */
|
||||
int target; /* 0=off, 1=syslog, 2=stderr, 3=both */
|
||||
int priority; /* syslog() priority level */
|
||||
int facility; /* syslog() facility */
|
||||
char ident[MXDBGIDENT]; /* ident string for syslog() */
|
||||
};
|
||||
|
||||
/* Define the stats structure */
|
||||
struct EpgStat
|
||||
{
|
||||
long long nsyserr; /* count of failed OS calls. */
|
||||
long long nrtaerr; /* count of internal rta failures. */
|
||||
long long nsqlerr; /* count of SQL failures. */
|
||||
long long nauth; /* count of DB authorizations. */
|
||||
long long nupdate; /* count of UPDATE requests */
|
||||
long long nselect; /* count of SELECT requests */
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id; /* FD of TCP conn (=-1 if not in use) */
|
||||
char username[33]; /* Index of next location in cmd buffer */
|
||||
char password[33];
|
||||
char cmd[1000]; /* SQL command from UI program */
|
||||
int rspfree; /* Number of free bytes in rsp buffer */
|
||||
char rsp[50000]; /* SQL response to the UI program */
|
||||
int ctm; /* connect time (==time();) */
|
||||
int cdur; /* duration time (== now()-ctm;) */
|
||||
char strid[33];
|
||||
} EpgConn;
|
||||
|
||||
/* the connections list */
|
||||
list_t *pgconn;
|
||||
|
||||
|
||||
/* this is a struct that stores the RTA runtime config */
|
||||
struct RTA_Conf
|
||||
{
|
||||
logcb loggingfunc; /* logging callback */
|
||||
} RTA_Conf;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward references */
|
||||
void do_sql(char *, int *);
|
||||
void send_error(char *, int, char *, char *);
|
||||
void verify_table_name(char *, int *);
|
||||
void verify_select_list(char *, int *);
|
||||
void verify_update_list(char *, int *);
|
||||
void verify_where_list(char *, int *);
|
||||
void sqldo_update(char *, int *);
|
||||
void sqldo_update(char *, int *);
|
||||
int send_row_description(char *, int *);
|
||||
void do_select(char *, int *);
|
||||
void do_call(char *, int *);
|
||||
void do_begin(char *, int *);
|
||||
void do_commit(char *, int *);
|
||||
void ad_str(char **, char *);
|
||||
void ad_int2(char **, int);
|
||||
void ad_int4(char **, int);
|
||||
void rtalog(char *, int, char *, ...);
|
||||
|
||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef YYERRCODE
|
||||
#define YYERRCODE 256
|
||||
#endif
|
||||
|
||||
#define SQLBEGIN 257
|
||||
#define SQLCOMMIT 258
|
||||
#define SELECT 259
|
||||
#define UPDATE 260
|
||||
#define FROM 261
|
||||
#define WHERE 262
|
||||
#define NAME 263
|
||||
#define STRING 264
|
||||
#define INTEGER 265
|
||||
#define REALNUM 266
|
||||
#define LIMIT 267
|
||||
#define OFFSET 268
|
||||
#define SET 269
|
||||
#define EQ 270
|
||||
#define NE 271
|
||||
#define GT 272
|
||||
#define LT 273
|
||||
#define GE 274
|
||||
#define LE 275
|
||||
#define AND 276
|
|
@ -1,310 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* parse.y -- Yacc parser for our subset of SQL.
|
||||
**************************************************************/
|
||||
|
||||
%{
|
||||
#include <stdlib.h>
|
||||
#include "do_sql.h"
|
||||
|
||||
|
||||
#define YYSTYPE int
|
||||
|
||||
|
||||
/* While we parse the SET and WHERE clause we need someplace
|
||||
* to temporarily store the type of relation */
|
||||
static int whrrelat;
|
||||
|
||||
/* We don't want to pass pointers to allocated memory on the */
|
||||
/* yacc stack, since the memory might not be freed when an */
|
||||
/* error is detected. Instead, we allocate the memory and */
|
||||
/* put the pointer into the following table where it is easy */
|
||||
/* free on error. */
|
||||
char *parsestr[MXPARSESTR];
|
||||
|
||||
static int n; /* temp/scratch integer */
|
||||
|
||||
extern struct Sql_Cmd cmd; /* encoded SQL command (a global) */
|
||||
extern char *yytext;
|
||||
extern int yyleng;
|
||||
extern void yyerror(char *);
|
||||
extern int yylex();
|
||||
%}
|
||||
|
||||
%token SQLBEGIN
|
||||
%token SQLCOMMIT
|
||||
%token SELECT
|
||||
%token UPDATE
|
||||
%token FROM
|
||||
%token WHERE
|
||||
%token NAME
|
||||
%token STRING
|
||||
%token INTEGER
|
||||
%token REALNUM
|
||||
%token LIMIT
|
||||
%token OFFSET
|
||||
%token SET
|
||||
/* relations for the where clause */
|
||||
%token EQ
|
||||
%token NE
|
||||
%token GT
|
||||
%token LT
|
||||
%token GE
|
||||
%token LE
|
||||
|
||||
|
||||
%left AND
|
||||
%left ','
|
||||
%left '.'
|
||||
%%
|
||||
|
||||
|
||||
command:
|
||||
{ YYABORT; }
|
||||
| begin_statement
|
||||
| commit_statement
|
||||
| select_statement
|
||||
| update_statement
|
||||
| function_call
|
||||
;
|
||||
|
||||
|
||||
begin_statement:
|
||||
SQLBEGIN ';'
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SQLBEGIN
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
commit_statement:
|
||||
SQLCOMMIT ';'
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SQLCOMMIT
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
select_statement:
|
||||
SELECT column_list FROM table_name where_clause limit_clause ';'
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SELECT column_list FROM table_name where_clause limit_clause
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
column_list:
|
||||
NAME
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
}
|
||||
| column_list "," NAME
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
table_name:
|
||||
NAME
|
||||
{
|
||||
cmd.tbl = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
}
|
||||
| NAME "." NAME
|
||||
{
|
||||
cmd.tbl = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
where_clause:
|
||||
/* empty, optional */
|
||||
| WHERE test_condition
|
||||
;
|
||||
|
||||
|
||||
test_condition:
|
||||
'(' test_condition ')'
|
||||
| test_condition AND test_condition
|
||||
| NAME relation literal
|
||||
{ n = cmd.nwhrcols;
|
||||
cmd.whrcols[n] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.whrrel[n] = whrrelat;
|
||||
cmd.whrvals[n] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.nwhrcols++;
|
||||
if (cmd.nwhrcols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
relation:
|
||||
EQ { whrrelat = RTA_EQ; }
|
||||
| NE { whrrelat = RTA_NE; }
|
||||
| GT { whrrelat = RTA_GT; }
|
||||
| LT { whrrelat = RTA_LT; }
|
||||
| GE { whrrelat = RTA_GE; }
|
||||
| LE { whrrelat = RTA_LE; }
|
||||
;
|
||||
|
||||
|
||||
limit_clause:
|
||||
/* empty, optional */
|
||||
| LIMIT INTEGER
|
||||
{ cmd.limit = atoi(parsestr[(int) $2]);
|
||||
free(parsestr[(int) $2]);
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
| LIMIT INTEGER OFFSET INTEGER
|
||||
{ cmd.limit = atoi(parsestr[(int) $2]);
|
||||
free(parsestr[(int) $2]);
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
cmd.offset = atoi(parsestr[(int) $4]);
|
||||
free(parsestr[(int) $4]);
|
||||
parsestr[(int) $4] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
update_statement:
|
||||
UPDATE NAME SET set_list where_clause limit_clause ';'
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
| UPDATE NAME SET set_list where_clause limit_clause
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
set_list:
|
||||
set_list ',' set_list
|
||||
| NAME EQ literal
|
||||
{ n = cmd.ncols;
|
||||
cmd.cols[n] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.updvals[n] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
literal:
|
||||
NAME
|
||||
| STRING
|
||||
| INTEGER
|
||||
| REALNUM
|
||||
;
|
||||
|
||||
|
||||
function_call:
|
||||
SELECT NAME '(' ')' ';'
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SELECT NAME '(' ')'
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
%%
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* freesql(): - Free allocated memory from previous command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: Frees memory from last command
|
||||
***************************************************************/
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* dosql_init(): - Set up data structures prior to parse of
|
||||
* an SQL command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: structure cmd is initialized
|
||||
***************************************************************/
|
||||
void dosql_init() {
|
||||
int i;
|
||||
|
||||
for (i=0; i<NCMDCOLS; i++) {
|
||||
if (cmd.cols[i])
|
||||
free(cmd.cols[i]);
|
||||
if (cmd.updvals[i])
|
||||
free(cmd.updvals[i]); /* values for column updates */
|
||||
if (cmd.whrcols[i])
|
||||
free(cmd.whrcols[i]); /* cols in where */
|
||||
if (cmd.whrvals[i])
|
||||
free(cmd.whrvals[i]); /* values in where clause */
|
||||
cmd.cols[i] = (char *) 0;
|
||||
cmd.updvals[i] = (char *) 0;
|
||||
cmd.whrcols[i] = (char *) 0;
|
||||
cmd.whrvals[i] = (char *) 0;
|
||||
}
|
||||
if (cmd.tbl);
|
||||
free(cmd.tbl);
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i]) {
|
||||
free(parsestr[i]);
|
||||
parsestr[i] = (char *) NULL;
|
||||
}
|
||||
}
|
||||
|
||||
cmd.tbl = (char *) 0;
|
||||
cmd.ptbl = (TBLDEF *) 0;
|
||||
cmd.ncols = 0;
|
||||
cmd.nwhrcols = 0;
|
||||
cmd.limit = 1<<30; /* no real limit */
|
||||
cmd.offset = 0;
|
||||
cmd.err = 0;
|
||||
}
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
send_error(LOC, E_BADPARSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1,881 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* rta.h -- DB API for your internal structures and tables
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Preamble:
|
||||
* "rta" is a specialized memory resident data base interface.
|
||||
* It is not a stand-alone server but a library which attaches
|
||||
* to a program and offers up the program's internal structures
|
||||
* and arrays as data base tables. It uses a subset of the
|
||||
* Postgres protocol and is compatible with the Postgres bindings
|
||||
* for "C", PHP, and the Postgres command line tool, psql.
|
||||
*
|
||||
* This file contains the defines, structures, and function
|
||||
* prototypes for the 'rta' package.
|
||||
*
|
||||
* INDEX:
|
||||
* - Preamble
|
||||
* - Introduction and Purpose
|
||||
* - Limits
|
||||
* - Data Structures
|
||||
* - Subroutines
|
||||
* - rta UPDATE and SELECT syntax
|
||||
* - Internal DB tables
|
||||
* - List of all error messages
|
||||
* - How to write callback routines
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Introduction and Purpose:
|
||||
* One of the problems facing Linux is the lack of real-time
|
||||
* access to status, statistics, and configuration of a service
|
||||
* once it has started. We assume that to configure an
|
||||
* application we will be able to ssh into the box, vi the /etc
|
||||
* configuration file, and do a 'kill -1' on the process. Real
|
||||
* time status and statistics are things Linux programmers don't
|
||||
* even think to ask for. The problem of run time access is
|
||||
* particularly pronounced for network appliances where ssh is
|
||||
* not available or might not be allowed.
|
||||
* Another problem for appliance designers is that more than
|
||||
* one type of user interface may be required. Sometimes
|
||||
* a customer requires that *no* configuration information be
|
||||
* sent over an Ethernet line which transports unsecured user
|
||||
* data. In such a case the customer may turn off the web
|
||||
* interface and require that configuration, status, and
|
||||
* statistics be sent over an RS-232 serial line. The VGA
|
||||
* console, SNMP MIBs, and LDAP are also popular management
|
||||
* interfaces.
|
||||
* The rta package helps solve these problems by giving
|
||||
* real-time access to the data structures and arrays inside a
|
||||
* running program. With minimal effort, we make a program's
|
||||
* data structures appear as Postgres tables in a Postgres data
|
||||
* base.
|
||||
* For example, say you have a structure for TCP connections
|
||||
* defined as:
|
||||
* struct tcpconn {
|
||||
* int fd; // conn's file descriptor
|
||||
* int lport; // local port number
|
||||
* int dport; // destination port number
|
||||
* long nsbytes; // number of sent bytes
|
||||
* long nrbytes; // number of received bytes
|
||||
* long nread; // number of reads on the socket
|
||||
* long nwrite; // number of writes on the socket
|
||||
* };
|
||||
*
|
||||
* You might then define an array of these structures as:
|
||||
* struct tcpconn Conns[MX_CONN];
|
||||
*
|
||||
* The rta package allows any programming language with a
|
||||
* Postgres binding to query your table of TCP connections....
|
||||
* SELECT lport, dport FROM Conns WHERE fd != -1;
|
||||
* UPDATE Conns SET dport = 0 WHERE fd = -1;
|
||||
*
|
||||
* A data base API for all of your program's configuration,
|
||||
* status, and statistics makes debugging easier since you can
|
||||
* view much more of your program's state with simple Postgres
|
||||
* tools. A data base API makes building user interface programs
|
||||
* easier since there are Postgres bindings for PHP, Tcl/Tk,
|
||||
* Perl, "C", as well as many more.
|
||||
* A data base API can help speed development. Carefully
|
||||
* defining the tables to be used by the UI programs lets the
|
||||
* core application team build the application while the UI
|
||||
* developers work on the web pages, wizards, and MIBs of the
|
||||
* various UI programs.
|
||||
*
|
||||
* Some effort is required. In order to make your arrays
|
||||
* and structures available to the data base API, you need to
|
||||
* tell rta about the tables and columns in the data base.
|
||||
* Table information includes things like the name, start
|
||||
* address, number of rows and the length of each row. Column
|
||||
* information includes things like the associate table name,
|
||||
* the column name, the column's data type, and whether we want
|
||||
* any special functions called when the column is read or
|
||||
* written (callbacks).
|
||||
*
|
||||
* This document describes the API offered by the rta package.
|
||||
**************************************************************/
|
||||
|
||||
#ifndef RTA_H
|
||||
#define RTA_H 1
|
||||
|
||||
/***************************************************************
|
||||
* - Limits:
|
||||
* Here are the defines which describe the internal limits
|
||||
* set in the rta package. You are welcome to change these
|
||||
* limits; just be sure to recompile the rta package using
|
||||
* your new settings.
|
||||
**************************************************************/
|
||||
|
||||
/* Temporary */
|
||||
#define EXPORTFUNC
|
||||
|
||||
#include <limits.h> /* for PATH_MAX */
|
||||
#include "list.h"
|
||||
#include "hash.h"
|
||||
/** Maximum number of tables allowed in the system.
|
||||
* Your data base may not contain more than this number
|
||||
* of tables. */
|
||||
#define MX_TBL (500)
|
||||
|
||||
/** Maximum number of columns allowed in the system.
|
||||
* Your data base may not contain more than this number
|
||||
* of columns. */
|
||||
#define MX_COL (2500)
|
||||
|
||||
/** Maximum number of characters in a column name, table
|
||||
* name, and in help. See TBLDEF and COLDEF below. */
|
||||
#define MXCOLNAME (30)
|
||||
#define MXTBLNAME (30)
|
||||
#define MXHELPSTR (1000)
|
||||
#define MXFILENAME PATH_MAX
|
||||
|
||||
/** Maximum number of characters in the 'ident' field of
|
||||
* the openlog() call. See the rta_dbg table below. */
|
||||
#define MXDBGIDENT (20)
|
||||
|
||||
/** Maximum line size. SQL commands in save files may
|
||||
* contain no more than MX_LN_SZ characters. Lines with
|
||||
* more than MX_LN_SZ characters are silently truncated
|
||||
* to MX_LN_SZ characters. */
|
||||
#define MX_LN_SZ (1500)
|
||||
|
||||
/* Maximum number of columns allowed in a table */
|
||||
#define NCMDCOLS (40)
|
||||
|
||||
/** The column definition (COLDEF) structure describes
|
||||
* one column of a table. A table description has an
|
||||
* array of COLDEFs to describe the columns in the
|
||||
* table. */
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/** The name of the table that has this column. */
|
||||
char *table;
|
||||
|
||||
/** The name of the column. Must be at most MXCOLNAME
|
||||
* characters in length and must be unique within a
|
||||
* table. The same column name may be used in more
|
||||
* than one table. */
|
||||
char *name;
|
||||
|
||||
/** The data type of the column. Must be int, long,
|
||||
* string, pointer to void, pointer to int, pointer
|
||||
* to long, or pointer to string. The DB types are
|
||||
* defined immediately following this structure. */
|
||||
int type;
|
||||
|
||||
/** The number of bytes in the string if the above
|
||||
* type is RTA_STR or RTA_PSTR. */
|
||||
int length;
|
||||
|
||||
/** Number of bytes from the start of the structure to
|
||||
* this column. For example, a structure with an int,
|
||||
* a 20 character string, and a long, would have the
|
||||
* offset of the long set to 24. Use of the function
|
||||
* offsetof() is encouraged. If you have structure
|
||||
* members that do not start on word boundaries and
|
||||
* you do not want to use offsetof(), then consider
|
||||
* using -fpack-struct with gcc. */
|
||||
int offset;
|
||||
|
||||
/** Boolean flags which describe attributes of the
|
||||
* columns. The flags are defined after this
|
||||
* structure and include a "read-only" flag and a
|
||||
* flag to indicate that updates to this column
|
||||
* should cause a table save. (See table savefile
|
||||
* described below.) */
|
||||
int flags;
|
||||
|
||||
/** Read callback. This routine is called before the
|
||||
* column value is used. Input values include the
|
||||
* table name, the column name, the input SQL
|
||||
* command, and the (zero indexed) row number for the
|
||||
* row that is being read.
|
||||
* This routine is called *each* time the column is
|
||||
* read so the following would produce two calls:
|
||||
* SELECT intime FROM inns WHERE intime >= 100; */
|
||||
void *(*readcb) (void *tbl, char *column, char *SQL, void *data);
|
||||
|
||||
/** Write callback. This routine is called after an
|
||||
* UPDATE in which the column is written. Input values
|
||||
* include the table name, the column name, the SQL
|
||||
* command, and the (zero indexed) row number of the
|
||||
* modified row. See the callback section below.
|
||||
* This routine is called only once after all column
|
||||
* updates have occurred. For example, if there were
|
||||
* a write callback attached to the addr column, the
|
||||
* following SQL statement would cause the execution
|
||||
* of the write callback once after both mask and addr
|
||||
* have been written:
|
||||
* UPDATE ethers SET mask="255.255.255.0", addr = \
|
||||
* "192.168.1.10" WHERE name = "eth1";
|
||||
* The callback is called for each row modified. */
|
||||
void (*writecb) (char *tbl, char *column, char *SQL, int row_num);
|
||||
|
||||
/** A brief description of the column. This should
|
||||
* include the meaning of the data in the column, the
|
||||
* limits, if any, and the default values. Include
|
||||
* a brief description of the side effects of changes.
|
||||
* This field is particularly important for tables
|
||||
* which are part of the "boundary" between the UI
|
||||
* developers and the application programmers. */
|
||||
char *help;
|
||||
}
|
||||
COLDEF;
|
||||
|
||||
/***************************************************************
|
||||
* - Data Structures:
|
||||
* Each column and table in the data base must be described
|
||||
* in a data structure. Here are the data structures and
|
||||
* associated defines to describe tables and columns.
|
||||
**************************************************************/
|
||||
|
||||
/** The data types.
|
||||
* String refers to an array of char. The 'length' of
|
||||
* column must contain the number of bytes in the array.
|
||||
*/
|
||||
#define RTA_STR 0
|
||||
|
||||
/** Pointer to void. Use for generic pointers */
|
||||
#define RTA_PTR 1
|
||||
|
||||
/** Integer. This is the compiler/architecture native
|
||||
* integer. On Linux/gcc/Pentium an integer is 32 bits.
|
||||
*/
|
||||
#define RTA_INT 2
|
||||
|
||||
/** Long. This is the compiler/architecture native
|
||||
* long long. On Linux/gcc/Pentium a long long is 64
|
||||
* bits. */
|
||||
#define RTA_LONG 3
|
||||
|
||||
/** Pointer to string. Pointer to an array of char, or
|
||||
* a (**char). Note that the column length should be
|
||||
* the number of bytes in the string, not sizeof(char *).
|
||||
*/
|
||||
#define RTA_PSTR 4
|
||||
|
||||
/** Pointers to int and long. */
|
||||
#define RTA_PINT 5
|
||||
#define RTA_PLONG 6
|
||||
|
||||
/** Float and pointer to float */
|
||||
#define RTA_FLOAT 7
|
||||
#define RTA_PFLOAT 8
|
||||
#define MXCOLTYPE (RTA_PFLOAT)
|
||||
|
||||
/** The boolean flags.
|
||||
* If the disksave bit is set any writes to the column
|
||||
* causes the table to be saved to the "savefile". See
|
||||
* savefile described in the TBLDEF section below. */
|
||||
#define RTA_DISKSAVE (1<<0)
|
||||
|
||||
/** If the readonly flag is set, any writes to the
|
||||
* column will fail and a debug log message will be
|
||||
* sent. (For unit test you may find it very handy to
|
||||
* leave this bit clear to get better test coverage of
|
||||
* the corner cases.) */
|
||||
#define RTA_READONLY (1<<1)
|
||||
|
||||
/** The table definition (TBLDEF) structure describes
|
||||
* a table and is passed into the DB system by the
|
||||
* rta_add_table() subroutine. */
|
||||
typedef enum
|
||||
{
|
||||
TBL_ARRAY = 0,
|
||||
TBL_LIST = 1,
|
||||
TBL_HASH = 2,
|
||||
} RTA_TABLETYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/** The name of the table. Must be less than than
|
||||
* MXTLBNAME characters in length. Must be unique
|
||||
* within the DB. */
|
||||
char *name;
|
||||
|
||||
/** Address of the first element of the first row of
|
||||
* the array of structs that make up the table. */
|
||||
void *address;
|
||||
|
||||
/** The number of bytes in each row of the table.
|
||||
* This is usually a sizeof() of the structure
|
||||
* associated with the table. (The idea is that we
|
||||
* can get to data element E in row R with ...
|
||||
* data = *(address + (R * rowlen) + offset(E)) */
|
||||
int rowlen;
|
||||
|
||||
/** Number of rows in the table. */
|
||||
int nrows;
|
||||
|
||||
/** the type of struct this points to? Hash, List or array */
|
||||
RTA_TABLETYPE tabletype;
|
||||
|
||||
/** An array of COLDEF structures which describe each
|
||||
* column in the table. These must be in statically
|
||||
* allocated memory since the rta system references
|
||||
* them while running. */
|
||||
COLDEF *cols;
|
||||
|
||||
/** The number of columns in the table. That is, the
|
||||
* number of COLDEFs defined by 'cols'. */
|
||||
int ncol;
|
||||
|
||||
/** Save file. Path and name of a file which stores
|
||||
* the non-volatile part of the table. The file has
|
||||
* all of the UPDATE statements needed to rebuild the
|
||||
* table. The file is rewritten in its entirety each
|
||||
* time a 'savetodisk' column is updated. No file
|
||||
* save is attempted if the savefile is blank. */
|
||||
char *savefile;
|
||||
|
||||
/** Help text. A description of the table, how it is
|
||||
* used, and what its intent is. A brief note to
|
||||
* describe how it relate to other parts of the system
|
||||
* and description of important callbacks is nice
|
||||
* thing to include here. */
|
||||
char *help;
|
||||
}
|
||||
TBLDEF;
|
||||
|
||||
/***************************************************************
|
||||
* - Subroutines
|
||||
* Here is a summary of the few routines in the rta API:
|
||||
* rta_init() - initialize internal tables
|
||||
* dbcommand() - I/F to Postgres clients
|
||||
* egp_add_table() - add a table and its columns to the DB
|
||||
* SQL_string() - execute an SQL statement in the DB
|
||||
* rta_save() - save a table to a file
|
||||
* rta_load() - load a table from a file
|
||||
*
|
||||
* The FUSE based virtual filesystem adds the following:
|
||||
* rtafs_init() - mount FS and get file descriptor for it
|
||||
* do_rtafs() - handle all virtual file system IO
|
||||
* The above two routines are in the rtafs library. Their
|
||||
* inclusion in this include file cause no harm if you are
|
||||
* using only the rtadb library. Note that the rtafs library
|
||||
* requires the rtadb library.
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* dbcommand(): - Depacketize and execute Postgres commands.
|
||||
*
|
||||
* The main application accepts TCP connections from Postgres
|
||||
* clients and passes the stream of bytes (encoded SQL requests)
|
||||
* from the client into the rta system via this routine. If the
|
||||
* input buffer contains a complete command, it is executed, nin
|
||||
* is decrement by the number of bytes consumed, and RTA_SUCCESS
|
||||
* is returned. If there is not a complete command, RTA_NOCMD
|
||||
* is returned and no bytes are removed from the input buffer.
|
||||
* If a command is executed, the results are encoded into the
|
||||
* Postgres protocol and placed in the output buffer. When the
|
||||
* routine is called the input variable, nout, has the number of
|
||||
* free bytes available in the output buffer, out. When the
|
||||
* routine returns nout has been decremented by the size of the
|
||||
* response placed in the output buffer. An error message is
|
||||
* generated if the number of available bytes in the output
|
||||
* buffer is too small to hold the response from the SQL command.
|
||||
*
|
||||
* Input: cmd - the buffer with the Postgres packet
|
||||
* nin - on entry, the number of bytes in 'cmd',
|
||||
* on exit, the number of bytes remaining in cmd
|
||||
* out - the buffer to hold responses back to client
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return: RTA_SUCCESS - executed one command
|
||||
* RTA_NOCMD - input did not have a full cmd
|
||||
* RTA_CLOSE - client requests an orderly close
|
||||
**************************************************************/
|
||||
int dbcommand(char *, int *, char *, int *, int );
|
||||
void deldbconnection(int connid);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_add_table(): - Register a table for inclusion in the
|
||||
* DB interface. Adding a table allows external Postgres
|
||||
* clients access to the table's content.
|
||||
* Note that the TBLDEF structure must be statically
|
||||
* allocated. The DB system keeps just the pointer to the table
|
||||
* and does not copy the information. This means that you can
|
||||
* change the contents of the table definition by changing the
|
||||
* contents of the TBLDEF structure. This might be useful if
|
||||
* you need to allocate more memory for the table and change its
|
||||
* row count and address.
|
||||
* An error is returned if another table by the same name
|
||||
* already exists in the DB or if the table is defined without
|
||||
* any columns.
|
||||
* If a 'savefile' is specified, it is loaded. (See the
|
||||
* rta_load() command below for more details.)
|
||||
*
|
||||
* Input: ptbl - pointer to the TBLDEF to add
|
||||
* Return: RTA_SUCCESS - table added
|
||||
* RTA_ERROR - error
|
||||
**************************************************************/
|
||||
int rta_add_table(TBLDEF *);
|
||||
|
||||
/*
|
||||
* Logging function callback
|
||||
*/
|
||||
typedef void (*logcb) (char *logmsg);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_init(): - Initialize all internal variables and tables
|
||||
* This may be called more than once.
|
||||
*
|
||||
* Input: None
|
||||
* Return: None
|
||||
**************************************************************/
|
||||
void rta_init(logcb);
|
||||
|
||||
/* change the uname/password for authentication */
|
||||
void rta_change_auth(char *uname, char *pass);
|
||||
|
||||
/** ************************************************************
|
||||
* SQL_string(): - Execute single SQL command
|
||||
*
|
||||
* Executes the SQL command placed in the null-terminated string,
|
||||
* cmd. The results are encoded into the Postgres protocol and
|
||||
* placed in the output buffer. When the routine is called the
|
||||
* input variable, nout, has the number of free bytes available
|
||||
* in the output buffer, out. When the routine returns nout has
|
||||
* been decremented by the size of the response placed in the
|
||||
* output buffer. An error message is generated if the number
|
||||
* of available bytes in the output buffer is too small to hold
|
||||
* the response from the SQL command.
|
||||
* This routine may be most useful when updating a table
|
||||
* value in order to invoke the write callbacks. (The output
|
||||
* buffer has the results encoded in the Postgres protocol and
|
||||
* might not be too useful directly.)
|
||||
*
|
||||
* Input: cmd - the buffer with the SQL command,
|
||||
* out - the buffer to hold responses back to client,
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return:
|
||||
**************************************************************/
|
||||
void SQL_string(char *, char *, int *);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_save(): - Save table to file. Saves all "savetodisk"
|
||||
* columns to the path/file specified. Only savetodisk columns
|
||||
* are saved. The resultant file is a list of UPDATE commands
|
||||
* containing the desired data. There is one UPDATE command for
|
||||
* each row in the table.
|
||||
* This routine tries to minimize exposure to corrupted
|
||||
* save files by opening a temp file in the same directory as
|
||||
* the target file. The data is saved to the temp file and the
|
||||
* system call rename() is called to atomically move the temp
|
||||
* to the save file. Errors are generated if rta_save can not
|
||||
* open the temp file or is unable to rename() it.
|
||||
* As a general warning, note that any disk I/O can cause
|
||||
* a program to block briefly and so saving and loading tables
|
||||
* might cause your program to block.
|
||||
*
|
||||
* Input: ptbl - pointer to the TBLDEF structure for the
|
||||
* table to save
|
||||
* fname - null terminated string with the path and
|
||||
* file name for the stored data.
|
||||
* Return: RTA_SUCCESS - table saved
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int rta_save(TBLDEF *, char *);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_load(): - Load a table from a file of UPDATE commands.
|
||||
* The file format is a series of UPDATE commands with one
|
||||
* command per line. Any write callbacks are executed as the
|
||||
* update occurs.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be loaded
|
||||
* fname - string with name of the load file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table loaded
|
||||
* RTA_ERROR - could not open the file specified
|
||||
**************************************************************/
|
||||
int rta_load(TBLDEF *, char *);
|
||||
|
||||
/* successfully executed request or command */
|
||||
#define RTA_SUCCESS (0)
|
||||
|
||||
/* input did not have a full command */
|
||||
#define RTA_NOCMD (1)
|
||||
|
||||
/* encountered an internal error */
|
||||
#define RTA_ERROR (2)
|
||||
|
||||
/* DB client requests a session close */
|
||||
#define RTA_CLOSE (3)
|
||||
|
||||
/** ************************************************************
|
||||
* rtafs_init(): - Initialize the virtual file system interface
|
||||
* to RTA. The single input parameter is the mount point for
|
||||
* the VFS. On success, the return value is a file descriptor
|
||||
* to the VFS. On failure, a -1 is returned and errno is set.
|
||||
* This file descriptor should be used in subsequent select() or
|
||||
* poll() calls to notify your program of file system activity.
|
||||
* An important SIDE EFFECT is that the signal handlers for
|
||||
* SIGHUP, SIGINT, and SIGTERM are set. The signal handler
|
||||
* tries to unmount the virtual file system. This routine
|
||||
* is part of the librtafs library.
|
||||
* Note that FUSE requires that the owner and group of the
|
||||
* mount point be the same as the owner and group of the program
|
||||
* that does the mount. For example, if your mount point is
|
||||
* owned by Apache, then your the UID of your program must be
|
||||
* Apache as well.
|
||||
*
|
||||
* Input: char *mountpoint - desired mount point
|
||||
*
|
||||
* Return: int fd - file descriptor on success.
|
||||
**************************************************************/
|
||||
int rtafs_init(char *);
|
||||
|
||||
/** ************************************************************
|
||||
* do_rtafs(): - Handle all actual virtual file system IO.
|
||||
* This routine handles all file system IO for the virtual file
|
||||
* system mounted by the rtafs_init() call. This routine should
|
||||
* be called when there is activity on the file descriptor
|
||||
* returned from rtafs_init(). It has no input or output
|
||||
* parameters. This routine is part of the librtafs library.
|
||||
*
|
||||
* Input: (none)
|
||||
*
|
||||
* Return: (none)
|
||||
**************************************************************/
|
||||
void do_rtafs();
|
||||
|
||||
/** ************************************************************
|
||||
* - rta UPDATE and SELECT syntax
|
||||
* rta IS AN API, *NOT* A DATABASE!
|
||||
* Neither the rta UPDATE nor the rta SELECT adhere to the
|
||||
* Postgres equivalents. Joins are not allowed, and the WHERE
|
||||
* clause supports only the AND relation. There are no locks
|
||||
* or transactions.
|
||||
*
|
||||
* SELECT:
|
||||
* SELECT column_list FROM table [where_clause] [limit_clause]
|
||||
*
|
||||
* SELECT supports multiple columns, '*', LIMIT, and OFFSET.
|
||||
* At most MXCMDCOLS columns can be specified in the select list
|
||||
* or in the WHERE clause. LIMIT restricts the number of rows
|
||||
* returned to the number specified. OFFSET skips the number of
|
||||
* rows specified and begins output with the next row.
|
||||
* 'column_list' is a '*' or 'column_name [, column_name ...]'.
|
||||
* 'where_clause' is 'col_name = value [AND col_name = value ..]'
|
||||
* in which all col=val pairs must match for a row to match.
|
||||
* LIMIT and OFFSET are very useful to prevent a buffer
|
||||
* overflow on the output buffer of dbcommand(). They are also
|
||||
* very useful for web based user interfaces in which viewing
|
||||
* the data a page-at-a-time is desirable.
|
||||
* Column and table names are case sensitive. If a column
|
||||
* or table name is one of the reserved words it must be placed
|
||||
* in quotes when used. The reserved words are: AND, FROM,
|
||||
* LIMIT, OFFSET, SELECT, SET, UPDATE, and WHERE. Reserved
|
||||
* words are *not* case sensitive. You may use lower case
|
||||
* reserved words in your
|
||||
* Comparison operator in the WHERE clause include =, >=,
|
||||
* <=, >, and <.
|
||||
* You can use a reserved word, like OFFSET, as a column name
|
||||
* but you will need to quote it whenever you reference it in an
|
||||
* SQL command (SELECT "offset" FROM tunings ...). Strings
|
||||
* may contain any of the !@#$%^&*()_+-={}[]\|:;<>?,./~`
|
||||
* characters. If a string contains a double quote, use a
|
||||
* single quote to wrap it (eg 'The sign say "Hi mom!"'), and
|
||||
* use double quotes to wrap string with embedded single quotes.
|
||||
*
|
||||
* Examples:
|
||||
* SELECT * FROM rta_tables
|
||||
*
|
||||
* SELECT destIP FROM conns WHERE fd != 0
|
||||
*
|
||||
* SELECT destIP FROM conns WHERE fd != 0 AND lport = 80
|
||||
*
|
||||
* SELECT destIP, destPort FROM conns \
|
||||
* WHERE fd != 0 \
|
||||
* LIMIT 100 OFFSET 0
|
||||
*
|
||||
* SELECT destIP, destPort FROM conns \
|
||||
* WHERE fd != 0 \
|
||||
* LIMIT 100 OFFSET 0
|
||||
*
|
||||
*
|
||||
* UPDATE:
|
||||
* UPDATE table SET update_list [where_clause] [limit_clause]
|
||||
*
|
||||
* UPDATE writes values into a table. The update_list is of
|
||||
* the form 'col_name = val [, col_name = val ...]. The WHERE
|
||||
* and LIMIT clauses are as described above.
|
||||
* An update invokes write callbacks on the affected columns.
|
||||
* All data in the row is written before the callbacks are
|
||||
* called.
|
||||
* The LIMIT clause for updates is not standard Postgres SQL,
|
||||
* but can be really useful for stepping through a table one row
|
||||
* at a time. To change only the n'th row of a table, use a
|
||||
* limit clause like 'LIMIT 1 OFFSET n' (n is zero-indexed).
|
||||
*
|
||||
* Examples:
|
||||
* UPDATE conn SET lport = 0;
|
||||
*
|
||||
* UPDATE ethers SET mask = "255.255.255.0", \
|
||||
* addr = "192.168.1.10" \
|
||||
* WHERE name = "eth0"
|
||||
*
|
||||
* UPDATE conn SET usecount = 0 WHERE fd != 0 AND lport = 21
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Internal DB tables
|
||||
* rta has five tables visible to the application:
|
||||
* rta_tables: - a table of all tables in the DB
|
||||
* rta_columns: - a table of all columns in the DB
|
||||
* pg_user: - spoof of Postgres table needed to log on
|
||||
* rta_logconfig: - controls what gets logged from rta
|
||||
* egp_stats: - simple usage and error statistics
|
||||
*
|
||||
* The rta_tables table gives SQL access to all internal and
|
||||
* registered tables. The data in the table is exactly that of
|
||||
* the TBLDEF structures registered with rta_add_table(). This
|
||||
* table is used for the generic table viewer and table editor
|
||||
* applications used mostly for application debugging. The
|
||||
* columns of rta_tables are:
|
||||
* name - the name of the table
|
||||
* address - the start address of the table in memory
|
||||
* rowlen - number of bytes in each row of the table
|
||||
* nrows - number of rows in the table
|
||||
* cols - pointer to array of column definitions
|
||||
* ncol - number of columns in the table
|
||||
* savefile - the file used to store non-volatile columns
|
||||
* help - a description of the table
|
||||
*
|
||||
* The rta_columns table has the column definitions of all
|
||||
* columns in the DB. The data in the table is exactly that of
|
||||
* the COLDEF structures registered with rta_add_table(). This
|
||||
* table is used for the generic table viewer and table editor
|
||||
* applications used mostly for application debugging. The
|
||||
* columns of rta_columns are:
|
||||
* table - the name of the column's table
|
||||
* name - name of the column
|
||||
* type - column's data type
|
||||
* length - number of bytes columns data type
|
||||
* offset - number of bytes from start of structure
|
||||
* flags - Bit field for 'read-only' and 'savetodisk'
|
||||
* readcb - pointer to subroutine called before reads
|
||||
* writecb - pointer to subroutine called after writes
|
||||
* help - a description of the column
|
||||
*
|
||||
* The pg_user table is provided to complete the connection
|
||||
* protocol between Postgres clients and the rta package. It
|
||||
* authenticates the connecting user. We spoof the protocol by
|
||||
* using a read callback to add the user into the table before
|
||||
* checking if the user is valid. In this way *any* user who
|
||||
* connects is in the table and so is authenticated. (One
|
||||
* future enhancement to rta might be to do real Postgres style
|
||||
* authentication.) The columns of pg_user are:
|
||||
* usename - spoofed to match any requested name
|
||||
* usesysid - 100
|
||||
* usecreatedb - 'f'
|
||||
* usetrace - 'f'
|
||||
* usesuper - 'f'
|
||||
* usecatupd - 'f'
|
||||
* passwd - "******"
|
||||
* valuntil - ""
|
||||
*
|
||||
* The rta_dbgconfig table controls which errors generate
|
||||
* debug log messages. See the logging section below for the
|
||||
* exact mapping. The rta package generates no user level log
|
||||
* messages, only debug messages. All of the fields in this
|
||||
* table are volatile. You will need to set the values in your
|
||||
* main program to make them seem persistent. (Try something
|
||||
* like "SQL_string("UPDATE rta_dbgconfig SET dbg ....").)
|
||||
* The columns of rta_dbgconfig are:
|
||||
* syserr - integer, 0 means no log, 1 means log.
|
||||
* This logs OS call errors like malloc()
|
||||
* failures. Default is 1.
|
||||
* rtaerr - integer, 0 means no log, 1 means log.
|
||||
* Enables logging of errors internal to the
|
||||
* rta package itself. Default is 1.
|
||||
* sqlerr - integer, 0 means no log, 1 means log.
|
||||
* Log any SQL request which generates an
|
||||
* error reply. Error replies occur if an SQL
|
||||
* request is malformed or if it requests a
|
||||
* non-existent table or column. Default is 1.
|
||||
* (SQL errors are usually client programming
|
||||
* errors.)
|
||||
* trace - integer, 0 means no log, 1 means log all
|
||||
* SQL requests. Default is 0.
|
||||
* target - 0: disable all debug logging
|
||||
* 1: log debug messages to syslog()
|
||||
* 2: log debug messages to stderr
|
||||
* 3: log to both syslog() and stderr
|
||||
* The default is 1. Setting the facility
|
||||
* causes a close and an open of syslog().
|
||||
* priority - integer. Syslog() requires a priority as
|
||||
* part of all log messages. This specifies
|
||||
* the priority to use when sending rta debug
|
||||
* messages. Changes to this do not take
|
||||
* effect until dbg_target is updated.
|
||||
* 0: LOG_EMERG
|
||||
* 1: LOG_ALERT
|
||||
* 2: LOG_CRIT
|
||||
* 3: LOG_ERR
|
||||
* 4: LOG_WARNING
|
||||
* 5: LOG_NOTICE
|
||||
* 6: LOG_INFO
|
||||
* 7: DEBUG
|
||||
* Default is 3.
|
||||
* facility - integer. Syslog() requires a facility as
|
||||
* part of all log messages. This specifies
|
||||
* the facility to use when sending rta debug
|
||||
* messages. It is best to use the defines in
|
||||
* .../sys/syslog.h to set this. The default
|
||||
* is LOG_USER. Changes to this do not take
|
||||
* effect until dbg_target is updated.
|
||||
* ident - string. Syslog() requires an 'ident' string as
|
||||
* part of all log messages. This specifies
|
||||
* the ident string to use when sending rta debug
|
||||
* messages. This is normally set to the process
|
||||
* or command name. The default is "rta". Changes
|
||||
* to this do not take effect until dbg_target
|
||||
* is updated. This can be at most MXDBGIDENT
|
||||
* characters in length.
|
||||
*
|
||||
* The rta_stat table contains usage and error statistics
|
||||
* which might be of interest to developers. All fields are
|
||||
* of type long, are read-only, and are set to zero by
|
||||
* rta_init(). The columns of rta_stats are:
|
||||
* nsyserr - count of failed OS calls.
|
||||
* nrtaerr - count of internal rta failures.
|
||||
* nsqlerr - count of SQL failures.
|
||||
* nauth - count of authorizations. (==#connections)
|
||||
* nupdate - count of UPDATE or file write requests
|
||||
* nselect - count of SELECT or file read requests
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - List of all messages
|
||||
* There are two types of error messages available in the
|
||||
* rta package. The first type is the error messages returned
|
||||
* as part of an SQL request. The messages of this type are:
|
||||
*
|
||||
* 1) "ERROR: Relation '%s' does not exist"
|
||||
* This reply indicates that a table requested in a SELECT
|
||||
* UPDATE, or where clause does not exist. The %s is
|
||||
* replaced by the name of the requested table.
|
||||
* 2) "ERROR: Attribute '%s' not found\n"
|
||||
* This reply indicates that a column requested in a SELECT
|
||||
* UPDATE, or where clause does not exist. The %s is
|
||||
* replaced by the name of the requested column.
|
||||
* 3) "ERROR: SQL parse error"
|
||||
* This reply indicates a mal-formed SQL request or a
|
||||
* mis-match in the types of data in a where clause or in
|
||||
* an update list.
|
||||
* 4) "ERROR: Output buffer full"
|
||||
* This reply indicates that the size of the response to
|
||||
* a request exceeds the size of the output buffer. See
|
||||
* dbcommand() and the 'out' and 'nout' parameters. This
|
||||
* error can be avoided with a large enough output buffer
|
||||
* or, preferably, with the use of LIMIT and OFFSET.
|
||||
* 5) "ERROR: String too long for '%s'
|
||||
* This reply indicates that an update to a column of type
|
||||
* string or pointer to string would have exceeded the
|
||||
* width of the column. The %s is replaced by the column
|
||||
* name.
|
||||
* 6) "ERROR: Can not update read-only column '%s'
|
||||
* This reply indicates that an attempt to update a column
|
||||
* marked as read-only. The %s is replaced by the column
|
||||
* name.
|
||||
*
|
||||
* The other type of error messages are internal debug
|
||||
* messages. Debug messages are logged using the standard
|
||||
* syslog() facility available on all Linux systems. The
|
||||
* default syslog "facility" used is LOG_USER but this can be
|
||||
* changed by setting 'facility' in the rta_dbg table.
|
||||
* You are welcome to modify syslogd in order to do post
|
||||
* processing such as generating SNMP traps off these debug
|
||||
* messages. All error messages of this type are send to
|
||||
* syslog() as: "egp[PID]: FILE LINE#: error_message",
|
||||
* where PID, FILE, and LINE# are replaced by the process ID,
|
||||
* the source file name, and the line number where the error
|
||||
* was detected.
|
||||
* Following are the defines used to generate these debug
|
||||
* and error messages. The "%s %d" at the start of each
|
||||
* error string is replaced by the file name and line number
|
||||
* where the error is detected. */
|
||||
|
||||
/** "System" errors */
|
||||
#define Er_No_Mem "%s %d: Can not allocate memory\n"
|
||||
#define Er_No_Save "%s %d: Table save failure. Can not open %s\n"
|
||||
#define Er_No_Load "%s %d: Table load failure. Can not open %s\n"
|
||||
|
||||
/** "RTA" errors */
|
||||
#define Er_Max_Tbls "%s %d: Too many tables in DB\n"
|
||||
#define Er_Max_Cols "%s %d: Too many columns in DB\n"
|
||||
#define Er_Tname_Big "%s %d: Too many characters in table name: %s\n"
|
||||
#define Er_Cname_Big "%s %d: Too many characters in column name: %s\n"
|
||||
#define Er_Hname_Big "%s %d: Too many characters in help text: %s\n"
|
||||
#define Er_Tbl_Dup "%s %d: DB already has table named: %s\n"
|
||||
#define Er_Col_Dup "%s %d: Table already has column named: %s\n"
|
||||
#define Er_Col_Type "%s %d: Column contains an unknown data type: %s\n"
|
||||
#define Er_Col_Flag "%s %d: Column contains unknown flag data: %s\n"
|
||||
#define Er_Cmd_Cols "%s %d: Too many columns in table: %s\n"
|
||||
#define Er_No_Space "%s %d: Not enough buffer space\n"
|
||||
|
||||
/** "SQL" errors */
|
||||
#define Er_Bad_SQL "%s %d: SQL parse error: %s\n"
|
||||
#define Er_Readonly "%s %d: Attempt to update readonly column: %s\n"
|
||||
#define Er_BadPass "%s %d: Bad Username/Password\n"
|
||||
/** "Trace" messages */
|
||||
#define Er_Trace_SQL "%s %d: SQL command: %s (%s)\n"
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - How to write callback routines
|
||||
* As mentioned above, read callbacks are executed before a
|
||||
* column value is used and write callbacks are called after all
|
||||
* columns have been updated. Both read and write callbacks
|
||||
* return nothing (are of type void) and have the same calling
|
||||
* parameters:
|
||||
* - char *tblname: the name of the table referenced
|
||||
* - char *colname: the name of the column referenced
|
||||
* - char *sqlcmd: the text of the SQL command
|
||||
* - int rowid: the zero-indexed row number of the row
|
||||
* being read or written
|
||||
*
|
||||
* Read callbacks are particularly useful to compute things
|
||||
* like sums and averages; things that aren't worth the effort
|
||||
* compute continuously if it's possible to compute it just
|
||||
* when it is used.
|
||||
* Write callbacks can form the real engine driving the
|
||||
* application. These are most applicable when tied to
|
||||
* configuration changes. Write callbacks are also a useful
|
||||
* place to log configuration changes.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* - Future enhancements:
|
||||
* Several enhancements are possible for the rta package:
|
||||
* - printf format string in the column definition
|
||||
* - ability to register more than one trigger per column
|
||||
* - secure login maintaining Postgres compatibility
|
||||
* - IPC and support for shared tables in shared memory
|
||||
* - specify pre or post for the write callback
|
||||
* - table save callback (to save file to flash?)
|
||||
* - execution times for table access, update
|
||||
* - count(*) function
|
||||
* - model output buffer mgmt on zlib to allow output streams
|
||||
* - add a column data type of "table" to allow nested tables
|
||||
* - add internationalization support
|
||||
**************************************************************/
|
||||
|
||||
#endif
|
|
@ -1,875 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* Overview:
|
||||
* The "rta" package provides a Postgres-like API into our
|
||||
* system tables and variables. We need to describe each of our
|
||||
* tables as if it were a data base table. We describe each
|
||||
* table in general in an array of TBLDEF structures with one
|
||||
* structure per table, and each column of each table in an
|
||||
* array of COLDEF strustures with one COLDEF structure per
|
||||
* column.
|
||||
**************************************************************/
|
||||
|
||||
#include <stdio.h> /* for printf prototypes */
|
||||
#include <stddef.h> /* for 'offsetof' */
|
||||
#include <syslog.h> /* for LOG_ERR, LOG_USER */
|
||||
#include <string.h> /* for strncmp prototypes */
|
||||
#include <time.h>
|
||||
#include "rta.h" /* for TBLDEF and COLDEF */
|
||||
#include "do_sql.h" /* for struct Sql_Cmd */
|
||||
|
||||
/* Forward reference for read callbacks */
|
||||
void *spoof_user(void *, char *, char *, void *);
|
||||
void *compute_time(void *, char *col, char *sql, void *);
|
||||
|
||||
/***************************************************************
|
||||
* One of the tables we need to maintain compatibility with the
|
||||
* various Postgres front-ends is 'pg_user'. So here we define
|
||||
* a pg_user data structure, allocate a 1 row table for users,
|
||||
* define the table using COLDEF and TBLDEF, and give a read
|
||||
* callback which makes the first table entry look like whoever
|
||||
* appears in the WHERE clause. So a query like ....
|
||||
* SELECT usesuper FROM pg_user WHERE usename = "Any Name"
|
||||
* will always return 'f' regardless of the usename requested.
|
||||
* This is also a resonable demonstration of a read callback.
|
||||
* (Clearly this defeats the security model of Postgres. If you
|
||||
* _want_ to use a real pg_user table you can remove the read
|
||||
* callback, allocate more rows, and save the data to disk.)
|
||||
**************************************************************/
|
||||
|
||||
#define MX_PGNAMELEN (32)
|
||||
#define FT_LEN (2)
|
||||
|
||||
/* Define the structure */
|
||||
struct Pg_User
|
||||
{
|
||||
char usename[MX_PGNAMELEN]; /* user name */
|
||||
int usesysid; /* user ID */
|
||||
char usecreatedb[FT_LEN]; /* creat DB */
|
||||
char usetrace[FT_LEN]; /* trace execution */
|
||||
char usesuper[FT_LEN]; /* super user */
|
||||
char usecatupd[FT_LEN];
|
||||
char passwd[MX_PGNAMELEN]; /* the password */
|
||||
char valuntil[MX_PGNAMELEN]; /* valid until .... */
|
||||
};
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct Pg_User pg_user[] = {
|
||||
{
|
||||
"master", /* user name */
|
||||
100, /* user ID */
|
||||
"f", /* creat DB */
|
||||
"f", /* trace execution */
|
||||
"f", /* super user */
|
||||
"f",
|
||||
"password", /* the password */
|
||||
"" /* valid until .... */
|
||||
}
|
||||
};
|
||||
|
||||
void rta_change_auth(char *uname, char *pass) {
|
||||
strncpy(pg_user[0].usename, uname, MX_PGNAMELEN);
|
||||
strncpy(pg_user[0].passwd, pass, MX_PGNAMELEN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF pg_userCols[] = {
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usename", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usename), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the Postgres user. We overwrite this column "
|
||||
"with whatever string is in the WHERE clause. In this way "
|
||||
"there is always a match when looking up a user name in the "
|
||||
"DB"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usesysid", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usesysid), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The user ID of the user. Currently fixed at 100."},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usecreatedb", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usecreatedb), /* offset from strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user can "
|
||||
"create new data bases. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usetrace", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usetrace), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user can "
|
||||
"use the trace capability. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usesuper", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usesuper), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user has "
|
||||
"super-user capability. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usecatupd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usecatupd), /* offset from strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f'). Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"passwd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, passwd), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The encrypted password of the user. Not implemented in "
|
||||
"the current system."},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"valuntil", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, valuntil), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The expiration date of the password. Not implemented in "
|
||||
"the current system."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF pg_userTable = {
|
||||
"pg_user", /* table name */
|
||||
(void *) pg_user, /* address of table */
|
||||
sizeof(struct Pg_User), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
pg_userCols, /* Column definitions */
|
||||
sizeof(pg_userCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The table of Postgres users. We spoof this table so that "
|
||||
"any user name in a WHERE clause appears in the table as a "
|
||||
"legitimate user with no super, createDB, trace or catupd "
|
||||
"capability."
|
||||
};
|
||||
|
||||
/* spoof_user(): - Routine to copy user name from WHERE clause
|
||||
* to 'usename' in order to spoof the system into accepting
|
||||
* any user name as a valid user. We normally expect a command
|
||||
* of the form:
|
||||
* SELECT usesuper FROM gp_user WHERE usename = 'XXXXXXX'
|
||||
* What we want to do is to copy XXXXXX into the usename
|
||||
* field so there is always a match. We do some basic checks
|
||||
* to be sure the command is of the above form.
|
||||
*
|
||||
* Input: Name of the table
|
||||
* Name of the column
|
||||
* Text of the SQL command itself
|
||||
* Index of row used (zero indexed)
|
||||
* Output:
|
||||
* Effects: Copies user name to 'usename' field
|
||||
***************************************************************/
|
||||
void *
|
||||
spoof_user(void *tblname, char *colname, char *sqlcmd, void *rowid)
|
||||
{
|
||||
extern struct Sql_Cmd cmd;
|
||||
|
||||
/* Verify that the column of interest is 'usename'. Verify that there
|
||||
is one WHERE clause. Verify that the WHERE relation is equality. */
|
||||
if ((strcmp(colname, "usename")) ||
|
||||
(cmd.nwhrcols != 1) || (cmd.whrrel[0] != RTA_EQ))
|
||||
return NULL;
|
||||
|
||||
/* It seems OK. Copy the WHERE string */
|
||||
// strncpy(pg_user[0].usename, cmd.whrvals[0], MX_PGNAMELEN);
|
||||
strncpy(pg_user[0].usename, "harhar", MX_PGNAMELEN);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* One of the tables we want to present to the UI is the table
|
||||
* of UI connections. It is defined in app.h as ....
|
||||
* typedef struct {
|
||||
int fd; // FD of TCP conn (=-1 if not in use)
|
||||
int cmdindx; // Index of next location in cmd buffer
|
||||
char cmd[MXCMD]; // SQL command from UI program
|
||||
int rspfree; // Number of free bytes in rsp buffer
|
||||
char rsp[MXRSP]; // SQL response to the UI program
|
||||
int o_port; // Other-end TCP port number
|
||||
int o_ip; // Other-end IP address
|
||||
long long nbytin; // number of bytes read in
|
||||
long long nbytout; // number of bytes sent out
|
||||
int ctm; // connect time (==time();)
|
||||
int cdur; // duration time (== now()-ctm;)
|
||||
* } UI;
|
||||
* The following array of COLDEF describes this structure with
|
||||
* one COLDEF for each element in the UI strucure.
|
||||
**************************************************************/
|
||||
COLDEF PG_ConnCols[] = {
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"id", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, id), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"int ID of the connection"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"username", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
33, /* #bytes in col data */
|
||||
offsetof(EpgConn, username), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"the Username"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"cmd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
1000, /* #bytes in col data */
|
||||
offsetof(EpgConn, cmd), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Input command from the user interface program. This"
|
||||
" is an SQL command which is executed against the data"
|
||||
" in the application."},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"rspfree", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, rspfree), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Index of the next free byte in the response string, rsp"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"rsp", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
50, /* first 50 bytes of response field */
|
||||
offsetof(EpgConn, rsp), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Response back to the calling program. This is used to"
|
||||
" store the result so that the write() does not need to"
|
||||
" block"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"ctm", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, ctm), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Connect TiMe. The unix style time() when the connection"
|
||||
" was established. This is used to decide which connection"
|
||||
" to drop when the connection table is full and a new UI"
|
||||
" connection request arrives."},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"cdur", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, cdur), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
compute_time, /* called before read */
|
||||
NULL, /* called after write */
|
||||
"Connect DURation. The number of seconds the connection"
|
||||
" has been open. A read callback computes this each time"
|
||||
" the value is used."},
|
||||
};
|
||||
|
||||
void *
|
||||
compute_time(void *tbl, char *col, char *sql, void *rowid)
|
||||
{
|
||||
EpgConn *data = rowid;
|
||||
|
||||
data->cdur = time(NULL) - data->ctm;
|
||||
return &data->cdur;
|
||||
}
|
||||
|
||||
TBLDEF pg_connTable = {
|
||||
"pg_conn", /* table name */
|
||||
0, /* address of table */
|
||||
0, /* length of each row */
|
||||
0, /* # rows in table */
|
||||
TBL_LIST,
|
||||
PG_ConnCols, /* Column definitions */
|
||||
sizeof(PG_ConnCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Data about connections from frontend programs"
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* We define a table which contains the column definitions of
|
||||
* all columns in the system. This is a pseudo table in that
|
||||
* there is not an array of structures like other tables.
|
||||
* Instead, pointers to each column definition is placed in a
|
||||
* table. This table requires special handling in do_sql.c.
|
||||
* The table definition for "rta_columns" must appear as the
|
||||
* second entry in the array of table definition pointers.
|
||||
**************************************************************/
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_columnsCols[] = {
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"table", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXTBLNAME, /* #bytes in col data */
|
||||
offsetof(COLDEF, table), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the table that this column belongs to."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"name", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXCOLNAME, /* #bytes in col data */
|
||||
offsetof(COLDEF, name), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the column. Must be unique within a table "
|
||||
"definition but may be replicated in other tables. The "
|
||||
"maximum string length of the column name is set by "
|
||||
"MXCOLNAME defined in the rta.h file."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"type", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, type), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The data type of the column. Types include string, "
|
||||
"integer, long, pointer, pointer to string, pointer to "
|
||||
"integer, and pointer to long. See rta.h for more details."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"length", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, length), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The length of the string in bytes if the column data "
|
||||
"type is a string or a pointer to a string."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"offset", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, offset), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of bytes from the start of the structure "
|
||||
"to the member element defined in this entry. Be careful "
|
||||
"in setting the offset with non word-aligned elements like "
|
||||
"single characters. If you do no use offsetof() consider "
|
||||
"using -fpack-struct"},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"flags", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, flags), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Flags associated with the column include flags to indicate "
|
||||
"read-only status and whether or not the data should be "
|
||||
"included in the save file. See rta.h for the associated "
|
||||
"defines and details."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"readcb", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, readcb), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to a function that returns an integer. If "
|
||||
"defined, the function is called before the column is "
|
||||
"read. This function is useful to compute values only "
|
||||
"when needed."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"writecb", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, writecb), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to a function that returns and integer. If "
|
||||
"defined, the function is called after an UPDATE command "
|
||||
"modifies the column. All columns in an UPDATE are "
|
||||
"modified before any write callbacks are executed. This "
|
||||
"function is useful to effect changes requested or implied "
|
||||
"by the column definition."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"help", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXHELPSTR, /* #bytes in col data */
|
||||
offsetof(COLDEF, help), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A brief description of the column. Should include "
|
||||
"limits, default value, and a description of how to set "
|
||||
"it. Can contain at most MXHELPSTR characters."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_columnsTable = {
|
||||
"rta_columns", /* table name */
|
||||
(void *) 0, /* address of table */
|
||||
sizeof(COLDEF), /* length of each row */
|
||||
0, /* incremented as tables are added */
|
||||
TBL_ARRAY,
|
||||
rta_columnsCols, /* Column definitions */
|
||||
sizeof(rta_columnsCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The list of all columns in all tables along with their "
|
||||
"attributes."
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* We define a table which contains the table definition of all
|
||||
* tables in the system. This is a pseudo table in that there
|
||||
* is not an array of structures like other tables. Use of this
|
||||
* table requires special handling in do_sql.
|
||||
**************************************************************/
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_tablesCols[] = {
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"name", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXTBLNAME, /* #bytes in col data */
|
||||
offsetof(TBLDEF, name), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the table. This must be unique in the system. "
|
||||
" Table names can be at most MXTBLNAME characters in length."
|
||||
" See rta.h for details. Note that some table names are "
|
||||
"reserved for internal use."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"address", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(TBLDEF, address), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The start address of the array of structs that makes up "
|
||||
"the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"tabletype", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, tabletype), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The type of table this is"},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"rowlen", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, rowlen), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The length of each struct in the array of structs that "
|
||||
"makes up the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"nrows", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, nrows), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of rows in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"cols", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(TBLDEF, cols), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to an array of COLDEF structures. There is one "
|
||||
"COLDEF for each column in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"ncol", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, ncol), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of columns in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"savefile", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXFILENAME, /* #bytes in col data */
|
||||
offsetof(TBLDEF, savefile), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the file with the non-volatile contents of "
|
||||
"the table. This file is read when the table is "
|
||||
"initialized and is written any time a column with the "
|
||||
"non-volatile flag set is modified."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"help", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXHELPSTR, /* #bytes in col data */
|
||||
offsetof(TBLDEF, help), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A description of the table."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_tablesTable = {
|
||||
"rta_tables", /* table name */
|
||||
(void *) 0, /* address of table */
|
||||
sizeof(TBLDEF), /* length of each row */
|
||||
0, /* It's a pseudo table */
|
||||
TBL_ARRAY,
|
||||
rta_tablesCols, /* Column definitions */
|
||||
sizeof(rta_tablesCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The table of all tables in the system. This is a pseudo "
|
||||
"table and not an array of structures like other tables."
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* The rta_dbg table controls which errors generate
|
||||
* debug log messages, the priority, and the facility of the
|
||||
* syslog() messages sent. The rta package generates no user
|
||||
* level log * messages, only debug messages. All of the fields
|
||||
* in this table are volatile. You will need to set the values
|
||||
* in your main program to make them seem persistent.
|
||||
* (Try something like
|
||||
* "SQL_string("UPDATE rta_dbgconfig SET dbg ....").)
|
||||
* A callback attached to dbg_facility causes a close/reopen of
|
||||
* syslog().
|
||||
**************************************************************/
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct EpgDbg rtadbg = {
|
||||
1, /* log system errors */
|
||||
1, /* log rta errors */
|
||||
1, /* log SQL errors */
|
||||
0, /* no log of SQL cmds */
|
||||
0, /* log to syslog() only */
|
||||
LOG_ERR, /* see sys/syslog.h */
|
||||
LOG_USER, /* see sys/syslog.h */
|
||||
"rta" /* see 'man openlog' */
|
||||
};
|
||||
#ifdef SHWDBGTBL
|
||||
/* Define the table columns */
|
||||
COLDEF rta_dbgCols[] = {
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"syserr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, syserr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all system "
|
||||
"errors such as failed malloc() or save file read failures."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"rtaerr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, rtaerr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all errors "
|
||||
"internal to the rta package."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"sqlerr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, sqlerr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all SQL "
|
||||
"errors. Such errors usually indicate a programming error "
|
||||
"in one of the user interface programs."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"trace", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, trace), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes all SQL commands to be logged. "
|
||||
"If the command is UPDATE, the number of rows affected is "
|
||||
"also logged."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"target", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, target), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
restart_syslog, /* called after write */
|
||||
"Sets destination of log messages. Zero turns off all "
|
||||
"logging of errors. One sends log messages to syslog()."
|
||||
" Two sends log messages to stderr. Three sends error "
|
||||
"messages to both syslog() and to stderr. Default is one."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"priority", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, priority), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() priority. Please see .../sys/syslog.h for "
|
||||
"the possible values. Default is LOG_ERR."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"facility", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, facility), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() facility. Please see .../sys/syslog.h for "
|
||||
"the possible values. Default is LOG_USER."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"ident", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MXDBGIDENT, /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, ident), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() 'ident'. Please see 'man openlog' for "
|
||||
"details. Default is 'rta'. An update of the target "
|
||||
"field is required for this to take effect."},
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* restart_syslog(): - Routine to restart or reconfigure the
|
||||
* logging facility. Syslog is always closed and (if enabled)
|
||||
* reopened with the priority and facility sepcified in the
|
||||
* rtadbg structure.
|
||||
*
|
||||
* Input: Name of the table
|
||||
* Name of the column
|
||||
* Text of the SQL command itself
|
||||
* Index of row used (zero indexed)
|
||||
* Output:
|
||||
* Effects: Copies user name to 'usename' field
|
||||
**************************************************************/
|
||||
void
|
||||
restart_syslog(char *tblname, char *colname, char *sqlcmd, int rowid)
|
||||
{
|
||||
extern struct EpgDbg rtadbg;
|
||||
|
||||
closelog();
|
||||
|
||||
if (rtadbg.target == 1 || rtadbg.target == 3)
|
||||
{
|
||||
openlog(rtadbg.ident, LOG_ODELAY | LOG_PID, rtadbg.facility);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_dbgTable = {
|
||||
"rta_dbg", /* table name */
|
||||
(void *) &rtadbg, /* address of table */
|
||||
sizeof(struct EpgDbg), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
rta_dbgCols, /* Column definitions */
|
||||
sizeof(rta_dbgCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Configure of debug logging. A callback on the 'target' "
|
||||
"field closes and reopens syslog(). None of the values "
|
||||
"in this table are saved to disk. If you want non-default "
|
||||
"values you need to change the rta source or do an "
|
||||
"SQL_string() to set the values when you initialize your "
|
||||
"program."
|
||||
};
|
||||
#endif
|
||||
/***************************************************************
|
||||
* The rta_stats table contains usage and error statistics
|
||||
* which might be of interest to developers. All fields are
|
||||
* of type long, are read-only, and are set to zero by
|
||||
* rta_init().
|
||||
**************************************************************/
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct EpgStat rtastat = {
|
||||
(long long) 0, /* count of failed OS calls. */
|
||||
(long long) 0, /* count of internal rta failures. */
|
||||
(long long) 0, /* count of SQL failures. */
|
||||
(long long) 0, /* count of authorizations. */
|
||||
(long long) 0, /* count of UPDATE requests */
|
||||
(long long) 0, /* count of SELECT requests */
|
||||
};
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_statCols[] = {
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nsyserr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nsyserr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of failed OS calls."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nrtaerr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nrtaerr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of internal rta failures."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nsqlerr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nsqlerr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of SQL failures."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nauth", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nauth), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of DB authorizations. This is a good estimate "
|
||||
"to the total number of connections."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nselect", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nselect), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of SELECT commands."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nupdate", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nupdate), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of UPDATE commands."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_statTable = {
|
||||
"rta_stat", /* table name */
|
||||
(void *) &rtastat, /* address of table */
|
||||
sizeof(struct EpgStat), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
rta_statCols, /* Column definitions */
|
||||
sizeof(rta_statCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Usage and error counts for the rta package."
|
||||
};
|
||||
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* token.l -- Lex tokenizer for SQL commands.
|
||||
**************************************************************/
|
||||
%option noyywrap
|
||||
%option never-interactive
|
||||
|
||||
%{
|
||||
#define __USE_GNU
|
||||
#include <string.h>
|
||||
#include "do_sql.h"
|
||||
#include "parse.tab.h"
|
||||
#include "config.h"
|
||||
#ifndef HAVE_STRNDUP
|
||||
#include "support.h"
|
||||
#endif
|
||||
|
||||
void dosql_init();
|
||||
extern int yylval;
|
||||
extern int yydebug;
|
||||
extern struct Sql_Cmd cmd;
|
||||
extern char *parsestr[];
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
[Aa][Nn][Dd] { return(AND); }
|
||||
[Ff][Rr][Oo][Mm] { return(FROM); }
|
||||
[Ll][Ii][Mm][Ii][Tt] { return(LIMIT); }
|
||||
[Oo][Ff][Ff][Ss][Ee][Tt] { return(OFFSET); }
|
||||
[Ss][Ee][Ll][Ee][Cc][Tt] { return(SELECT); }
|
||||
[Ss][Ee][Tt] { return(SET); }
|
||||
[Uu][Pp][Dd][Aa][Tt][Ee] { return(UPDATE); }
|
||||
[Ww][Hh][Ee][Rr][Ee] { return(WHERE); }
|
||||
[Bb][Ee][Gg][Ii][Nn] { return(SQLBEGIN); }
|
||||
[Cc][Oo][Mm][Mm][Ii][Tt] { return(SQLCOMMIT); }
|
||||
|
||||
\"[A-Za-z][_A-Za-z0-9 \t]*\" |
|
||||
\'[A-Za-z][_A-Za-z0-9 \t]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(NAME);
|
||||
}
|
||||
\* |
|
||||
[A-Za-z][_A-Za-z0-9]* {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(NAME);
|
||||
}
|
||||
|
||||
\"-?[0-9]+\" |
|
||||
\'-?[0-9]+\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(INTEGER);
|
||||
}
|
||||
-?[0-9]+ {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(INTEGER);
|
||||
}
|
||||
\"-?[0-9]+\.[0-9]*\" |
|
||||
\'-?[0-9]+\.[0-9]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(REALNUM);
|
||||
}
|
||||
-?[0-9]+\.[0-9]* {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(REALNUM);
|
||||
}
|
||||
|
||||
= { return(EQ); }
|
||||
\!= { return(NE); }
|
||||
\> { return(GT); }
|
||||
\< { return(LT); }
|
||||
\>= { return(GE); }
|
||||
\<= { return(LE); }
|
||||
|
||||
\, { return((int)','); }
|
||||
\( { return((int)'('); }
|
||||
\) { return((int)')'); }
|
||||
\; { return((int)';'); }
|
||||
\. { return((int)'.'); }
|
||||
|
||||
\"[A-Za-z0-9 \t!@#$%^&*()_+-={}|;:<>?~`\[\]'\\]*\" |
|
||||
\'[A-Za-z0-9 \t!@#$%^&*()_+-={}|;:<>?~`\[\]"\\]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(STRING);
|
||||
}
|
||||
[ \t\n]+ { }
|
||||
|
||||
%%
|
||||
|
||||
|
||||
void SQL_string(char *s, char *out, int *nout)
|
||||
{
|
||||
extern int yyparse();
|
||||
YY_BUFFER_STATE x;
|
||||
|
||||
dosql_init();
|
||||
cmd.out = out;
|
||||
cmd.nout = nout;
|
||||
cmd.sqlcmd = s;
|
||||
|
||||
/* We need to store the start addr of the buffer in case we
|
||||
* we need to send an error message after we've started
|
||||
* sending a reply. */
|
||||
cmd.errout = out;
|
||||
cmd.nerrout = *nout;
|
||||
cmd.nlineout = 0;
|
||||
|
||||
x = yy_scan_string(s);
|
||||
|
||||
while(yyparse() == 0) {
|
||||
/* At this point we have parsed the command. */
|
||||
/* If no errors were detected, we can continue processing */
|
||||
if (!cmd.err) {
|
||||
/* everything is set. do the command */
|
||||
do_sql(&out[cmd.nerrout - *nout], nout);
|
||||
}
|
||||
else {
|
||||
yy_delete_buffer(x);
|
||||
return;
|
||||
}
|
||||
dosql_init(); /* free memory and re-init the cmd structure */
|
||||
}
|
||||
/* We are done processing the command and have assembled response */
|
||||
/* Tell the other end that we are ready for a new command. */
|
||||
out[cmd.nerrout - *nout] = 'Z'; /* Ready */
|
||||
(*nout)--;
|
||||
yy_delete_buffer(x);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef xxxx
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("N-out = %d\n", *cmd.nout);
|
||||
printf("Scanning ---%s---\n", s);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Limit = %d\n", cmd.limit);
|
||||
printf("Offset = %d\n", cmd.offset);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Command = %d\n", cmd.command);
|
||||
for (i=0; i<cmd.ncols; i++)
|
||||
printf(" %s %s\n",cmd.cols[i],cmd.updvals[i]);
|
||||
printf("Table = %s\n", cmd.tbl);
|
||||
for (i=0; i<cmd.nwhrcols; i++)
|
||||
printf(" %s %d %s\n",cmd.whrcols[i],
|
||||
cmd.whrrel[i], cmd.whrvals[i]);
|
||||
printf("Limit = %d\n", cmd.limit);
|
||||
printf("Offset = %d\n", cmd.offset);
|
||||
printf("N-out = %d\n", *cmd.nout);
|
||||
printf("Error = %d\n", cmd.err);
|
||||
#endif
|
||||
#endif
|
|
@ -1,709 +0,0 @@
|
|||
|
||||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* api.c -- routines to provide a PostgreSQL DB API to
|
||||
* embedded systems.
|
||||
**************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* for mkstemp() */
|
||||
#ifdef WIN32
|
||||
#define PATH_MAX 4095
|
||||
#else
|
||||
#include <libgen.h> /* for dirname() */
|
||||
#endif
|
||||
#include <string.h> /* for strlen() */
|
||||
#include <limits.h> /* for PATH_MAX */
|
||||
#ifdef SYSLOG
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include "rta.h" /* for various constants */
|
||||
#include "do_sql.h" /* for LOC */
|
||||
|
||||
/* Tbl and Col contain pointers to table and column
|
||||
* definitions of all tables and columns in * the system.
|
||||
* Ntbl and Ncol are the number of tables and columns in each
|
||||
* list. These are used often enough that they are globals. */
|
||||
TBLDEF *Tbl[MX_TBL];
|
||||
int Ntbl;
|
||||
COLDEF *Col[MX_COL];
|
||||
int Ncol;
|
||||
|
||||
extern struct EpgDbg rtadbg;
|
||||
|
||||
EpgConn *getconndata(int id);
|
||||
|
||||
EpgConn *
|
||||
getconndata(int id)
|
||||
{
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
|
||||
lnode = list_first(pgconn);
|
||||
while (lnode) {
|
||||
conn = lnode_get(lnode);
|
||||
if (conn->id == id)
|
||||
return conn;
|
||||
lnode = list_next(pgconn, lnode);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_init(): - Initialize all internal system tables.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
**************************************************************/
|
||||
void
|
||||
rta_init(logcb logfunc)
|
||||
{
|
||||
int i; /* loop index */
|
||||
extern TBLDEF pg_userTable;
|
||||
extern TBLDEF rta_tablesTable;
|
||||
extern TBLDEF rta_columnsTable;
|
||||
#ifdef SHWDBGTBL
|
||||
extern TBLDEF rta_dbgTable;
|
||||
#endif
|
||||
extern TBLDEF rta_statTable;
|
||||
extern TBLDEF pg_connTable;
|
||||
#ifdef SYSLOG
|
||||
extern void restart_syslog();
|
||||
#else
|
||||
RTA_Conf.loggingfunc = logfunc;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MX_TBL; i++)
|
||||
{
|
||||
Tbl[i] = (TBLDEF *) 0;
|
||||
}
|
||||
Ntbl = 0;
|
||||
|
||||
/* init the pgconn structure */
|
||||
pgconn = list_create(-1);
|
||||
pg_connTable.address = pgconn;
|
||||
|
||||
/* add system and internal tables here */
|
||||
(void) rta_add_table(&rta_tablesTable);
|
||||
(void) rta_add_table(&rta_columnsTable);
|
||||
(void) rta_add_table(&pg_userTable);
|
||||
(void) rta_add_table(&pg_connTable);
|
||||
#ifdef SHWDBGTBL
|
||||
(void) rta_add_table(&rta_dbgTable);
|
||||
#endif
|
||||
(void) rta_add_table(&rta_statTable);
|
||||
#ifdef SYSLOG
|
||||
restart_syslog((char *) 0, (char *) 0, (char *) 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
rta_exit(void)
|
||||
{
|
||||
list_destroy_auto (pgconn);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_add_table(): - Add one table to the list of
|
||||
* tables in the system. If the table has an associated
|
||||
* "savefile" we try to open the savefile and execute any SQL
|
||||
* commands found there.
|
||||
*
|
||||
* Input: ptbl: pointer to the table to add
|
||||
* Output: RTA_SUCCESS - Add successful
|
||||
* RTA_DUP - Table is already in the list. (Note
|
||||
* that this might not be an error since
|
||||
* we can allow redefinition of a table)
|
||||
* RTA_ERROR - The passed table definition has a
|
||||
* problem which prevents its addition.
|
||||
* A syslog error message describes the
|
||||
* problem
|
||||
**************************************************************/
|
||||
int
|
||||
rta_add_table(TBLDEF *ptbl)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
extern TBLDEF rta_columnsTable;
|
||||
int i, j; /* a loop index */
|
||||
|
||||
/* Error if at Ntbl limit */
|
||||
if (Ntbl == MX_TBL)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Max_Tbls);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify that table name is unique */
|
||||
i = 0;
|
||||
while (i < Ntbl)
|
||||
{
|
||||
if (!strncmp(ptbl->name, Tbl[i]->name, MXTBLNAME))
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Tbl_Dup, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
/* verify lenght of table name */
|
||||
if (strlen(ptbl->name) > MXTBLNAME)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Tname_Big, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify savefile name is a valid pointer */
|
||||
if (ptbl->savefile == (char *) 0)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Type, "savefile");
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Check the upper bound on # columns / table */
|
||||
if (ptbl->ncol > NCMDCOLS)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Cmd_Cols, ptbl->name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* verify that column names are unique within table */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
for (j = 0; j < i; j++)
|
||||
{
|
||||
if (!strncmp(ptbl->cols[i].name, ptbl->cols[j].name, MXCOLNAME))
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Dup, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* verify column name length, help length, data type, and flag
|
||||
contents */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
if (strlen(ptbl->cols[i].name) > MXCOLNAME)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Cname_Big, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (strlen(ptbl->cols[i].help) > MXHELPSTR)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Hname_Big, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (ptbl->cols[i].type > MXCOLTYPE)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Type, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
if (ptbl->cols[i].flags > RTA_DISKSAVE + RTA_READONLY)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Col_Flag, ptbl->cols[i].name);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* Verify that we can add the columns */
|
||||
if ((Ncol + ptbl->ncol) >= MX_COL)
|
||||
{
|
||||
rtastat.nrtaerr++;
|
||||
if (rtadbg.rtaerr)
|
||||
rtalog(LOC, Er_Max_Cols);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Everything looks OK. Add table and columns */
|
||||
Tbl[Ntbl++] = ptbl;
|
||||
Tbl[0]->nrows = Ntbl;
|
||||
|
||||
/* Add columns to list of column pointers */
|
||||
for (i = 0; i < ptbl->ncol; i++)
|
||||
{
|
||||
Col[Ncol++] = &(ptbl->cols[i]);
|
||||
}
|
||||
rta_columnsTable.nrows += ptbl->ncol;
|
||||
|
||||
/* Execute commands in the save file to restore */
|
||||
if (ptbl->savefile && strlen(ptbl->savefile) > 0)
|
||||
(void) rta_load(ptbl, ptbl->savefile);
|
||||
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* Postgres "packets" are identified by their first few bytes.
|
||||
* The newer protocol used a single ASCII byte to identify the
|
||||
* packet type, while the older protocol has a 32 bit length
|
||||
* field at the start of the packet. Note that multi-byte data
|
||||
* is sent with the most significant byte first. Please see the
|
||||
* full documentation in "PostgreSQL 7.2.1 Developer's Guide"
|
||||
* at http://www.postgresql.org/idocs/
|
||||
*
|
||||
* The Postgres protocol from client to server has about six
|
||||
* request types. We use three of the request types in our
|
||||
* basic implementation. The six packet types.....
|
||||
* BYTE0 BYTE1 BYTE2 BYTE3
|
||||
* 0 0 0x1 0x18 Startup packet to open connection
|
||||
* 0 ? ? ? Encrypted password packet
|
||||
* 0 0 0 0x10 Cancel pending request
|
||||
* 'F' Function call
|
||||
* 'Q' Query
|
||||
* 'X' Terminate connection
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* dbcommand(): - Depacketize and execute any Postgres
|
||||
* commands in the input buffer.
|
||||
*
|
||||
* Input: buf - the buffer with the Postgres packet
|
||||
* nin - on entry, the number of bytes in 'buf',
|
||||
* on exit, the number of bytes remaining in buf
|
||||
* out - the buffer to hold responses back to client
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return: RTA_SUCCESS - executed one command
|
||||
* RTA_NOCMD - input did not have a full cmd
|
||||
* RTA_ERROR - some kind of error
|
||||
* RTA_CLOSE - client requests a orderly close
|
||||
**************************************************************/
|
||||
int
|
||||
dbcommand(char *buf, int *nin, char *out, int *nout, int connid)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
int length; /* lenght of the packet if old protocol */
|
||||
int i; /* a temp integer */
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
char line[MX_LN_SZ]; /* input line from file */
|
||||
char reply[MX_LN_SZ]; /* response from SQL process */
|
||||
int nreply; /* number of free bytes in reply */
|
||||
|
||||
|
||||
/* old style packet if first byte is zero */
|
||||
if ((int) buf[0] == 0)
|
||||
{
|
||||
/* get length. Enough bytes for a length? if not, consume no
|
||||
input, write no output */
|
||||
if (*nin < 4)
|
||||
{
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
length = (int) (buf[3] + (buf[2] << 8) + (buf[1] << 16));
|
||||
|
||||
/* Is the whole packet here? If not, consume no input, write no
|
||||
output */
|
||||
if (*nin < length)
|
||||
{
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
if (length == 296) /* a startup request */
|
||||
{
|
||||
/* we key on a non-null user name to send AuthOK. The protocol
|
||||
packet has an int32 for the length, an int32 for the protocol
|
||||
version, a 64 char string for the DB name and at byte 72 the
|
||||
start of a 32 char user name. */
|
||||
if (buf[72] == (char) 0)
|
||||
{
|
||||
*nin -= length;
|
||||
out[0] = 'N'; /* "Notice" response */
|
||||
*nout -= 1;
|
||||
rtastat.nauth++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* first thing we do is find the hash for this struct? */
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
{
|
||||
snprintf(conn->cmd, 1000, "Re-Authenticating");
|
||||
snprintf((char *) conn->username, 32, "%s", &buf[72]);
|
||||
conn->rsp[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
conn = ns_calloc(sizeof(EpgConn));
|
||||
snprintf(conn->cmd, 1000, "Authenticating");
|
||||
snprintf((char *) conn->username, 32, "%s", &buf[72]);
|
||||
conn->id = connid;
|
||||
conn->ctm = time(NULL);
|
||||
lnode = lnode_create(conn);
|
||||
list_append(pgconn, lnode);
|
||||
}
|
||||
*nin -= length;
|
||||
out[0] = 'R';
|
||||
out[1] = 0;
|
||||
out[2] = 0;
|
||||
out[3] = 0;
|
||||
out[4] = 3;
|
||||
// out[5] = 'Z';
|
||||
// *out++ = 'R';
|
||||
// ad_int4 (&buf, 0);
|
||||
// *out++ = 'Z';
|
||||
*nout -= 5;
|
||||
}
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else if (length == 16) /* a cancel request */
|
||||
{
|
||||
/* ignore the request for now */
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
{
|
||||
snprintf((char *) conn->cmd, 1000, "Cancel Call");
|
||||
conn->rsp[0] = '\0';
|
||||
}
|
||||
*nin -= length;
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else /* should be a password */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (!conn)
|
||||
{
|
||||
/* pass before username (and thus conn?) Bah */
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
#if 0
|
||||
snprintf((char *) conn->password, 32, "%s", &buf[4]);
|
||||
nreply = MX_LN_SZ;
|
||||
snprintf(line, MX_LN_SZ,
|
||||
"select * from pg_user where usename=\"%s\" and passwd = \"%s\"",
|
||||
conn->username, conn->password);
|
||||
SQL_string(line, reply, &nreply);
|
||||
if (nreply != 1279)
|
||||
{
|
||||
/* SQL command failed! Report error */
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_BadPass);
|
||||
*nin -= length;
|
||||
out[0] = 'E';
|
||||
out[1] = 'B';
|
||||
out[2] = 'A';
|
||||
out[3] = 'D';
|
||||
out[4] = ' ';
|
||||
out[5] = 'U';
|
||||
out[6] = 'S';
|
||||
out[7] = 'E';
|
||||
out[8] = 'R';
|
||||
out[9] = '/';
|
||||
out[10] = 'P';
|
||||
out[11] = 'A';
|
||||
out[12] = 'S';
|
||||
out[13] = 'S';
|
||||
out[14] = 0;
|
||||
*nout -= 15;
|
||||
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
#endif
|
||||
/* XXX validate it */
|
||||
*nin -= length;
|
||||
out[0] = 'R';
|
||||
out[1] = 0;
|
||||
out[2] = 0;
|
||||
out[3] = 0;
|
||||
out[4] = 0;
|
||||
out[5] = 'Z';
|
||||
*nout -= 6;
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
}
|
||||
else if (buf[0] == 'Q') /* a query request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
/* check for a complete command */
|
||||
for (i = 0; i < *nin; i++)
|
||||
{
|
||||
if (buf[i] == (char) 0)
|
||||
break;
|
||||
}
|
||||
if (i == *nin)
|
||||
{
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 50000, "Reading Query");
|
||||
return (RTA_NOCMD);
|
||||
}
|
||||
/* Got a null terminated command; do it. (buf[1] since the SQL
|
||||
follows the 'Q') */
|
||||
if (!conn)
|
||||
{
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
snprintf((char *) conn->cmd, 1000, "Query: %s", &buf[1]);
|
||||
SQL_string(&buf[1], out, nout);
|
||||
snprintf((char *) conn->rsp, 50000, "%s", out);
|
||||
*nin -= strlen(buf); /* to swallow the cmd */
|
||||
(*nin)--; /* to swallow the null */
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
else if (buf[0] == 'X') /* a terminate request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000, "Disconnecting");
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
else if (buf[0] == 'F') /* a function request */
|
||||
{
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000,
|
||||
"Unsupported Function Call. Disconnecting");
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
conn = getconndata(connid);
|
||||
if (conn)
|
||||
snprintf(conn->cmd, 1000, "Unsupported Call. Disconnecting");
|
||||
|
||||
/* an unknown request (should be logged?) */
|
||||
return (RTA_CLOSE);
|
||||
}
|
||||
|
||||
void
|
||||
deldbconnection(int connid)
|
||||
{
|
||||
lnode_t *lnode;
|
||||
EpgConn *conn;
|
||||
|
||||
lnode = list_first(pgconn);
|
||||
while (lnode)
|
||||
{
|
||||
conn = lnode_get(lnode);
|
||||
if (conn->id == connid) {
|
||||
list_delete(pgconn, lnode);
|
||||
lnode_destroy(lnode);
|
||||
ns_free(conn);
|
||||
return;
|
||||
}
|
||||
lnode = list_next(pgconn, lnode);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_save(): - Save a table to file. The save format is a
|
||||
* series of UPDATE commands saved in the file specified. The
|
||||
* file is typically read in later and executed one line at a
|
||||
* time.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be saved
|
||||
* fname - string with name of the save file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table saved
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int
|
||||
rta_save(TBLDEF *ptbl, char *fname)
|
||||
{
|
||||
#ifndef WIN32
|
||||
extern struct EpgStat rtastat;
|
||||
int sr; /* the Size of each Row in the table */
|
||||
int rx; /* Row indeX in for() loop */
|
||||
void *pd; /* Pointer to the Data in the table/column */
|
||||
int cx; /* Column index while building Data pkt */
|
||||
char tfile[PATH_MAX];
|
||||
char path[PATH_MAX];
|
||||
int fd; /* file descriptor of temp file */
|
||||
FILE *ftmp; /* FILE handle to the temp file */
|
||||
int did_header; /* == 1 if printed UPDATE part */
|
||||
int did_1_col; /* == 1 if at least one col printed */
|
||||
|
||||
/* Open a temp file in the same directory as the users target file */
|
||||
(void) strncpy(path, fname, PATH_MAX);
|
||||
(void) strncpy(tfile, dirname(path), PATH_MAX);
|
||||
(void) strcat(tfile, "/tmpXXXXXX");
|
||||
fd = mkstemp(tfile);
|
||||
if (fd < 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, tfile);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
ftmp = fdopen(fd, "w");
|
||||
if (ftmp == (FILE *) 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, tfile);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* OK, temp file is open and ready to receive table data */
|
||||
sr = ptbl->rowlen;
|
||||
|
||||
for (rx = 0; rx < ptbl->nrows; rx++)
|
||||
{
|
||||
did_header = 0;
|
||||
did_1_col = 0;
|
||||
for (cx = 0; cx < ptbl->ncol; cx++)
|
||||
{
|
||||
if (!ptbl->cols[cx].flags & RTA_DISKSAVE)
|
||||
continue;
|
||||
if (!did_header)
|
||||
{
|
||||
fprintf(ftmp, "UPDATE %s SET", ptbl->name);
|
||||
did_header = 1;
|
||||
}
|
||||
if (!did_1_col)
|
||||
fprintf(ftmp, " %s ", ptbl->cols[cx].name);
|
||||
else
|
||||
fprintf(ftmp, ", %s ", ptbl->cols[cx].name);
|
||||
|
||||
/* compute pointer to actual data */
|
||||
pd = (int)ptbl->address + (rx * sr) + ptbl->cols[cx].offset;
|
||||
switch ((ptbl->cols[cx]).type)
|
||||
{
|
||||
case RTA_STR:
|
||||
if (memchr((char *) pd, '"', ptbl->cols[cx].length))
|
||||
fprintf(ftmp, "= \'%s\'", (char *) pd);
|
||||
else
|
||||
fprintf(ftmp, "= \"%s\"", (char *) pd);
|
||||
break;
|
||||
case RTA_PSTR:
|
||||
if (memchr((char *) pd, '"', ptbl->cols[cx].length))
|
||||
fprintf(ftmp, "= \'%s\'", *(char **) pd);
|
||||
else
|
||||
fprintf(ftmp, "= \"%s\"", *(char **) pd);
|
||||
break;
|
||||
case RTA_INT:
|
||||
fprintf(ftmp, "= %d", *((int *) pd));
|
||||
break;
|
||||
case RTA_PINT:
|
||||
fprintf(ftmp, "= %d", **((int **) pd));
|
||||
break;
|
||||
case RTA_LONG:
|
||||
fprintf(ftmp, "= %lld", *((long long *) pd));
|
||||
break;
|
||||
case RTA_PLONG:
|
||||
fprintf(ftmp, "= %lld", **((long long **) pd));
|
||||
break;
|
||||
case RTA_PTR:
|
||||
|
||||
/* works only if INT and PTR are same size */
|
||||
fprintf(ftmp, "= %d", *((int *) pd));
|
||||
break;
|
||||
case RTA_FLOAT:
|
||||
fprintf(ftmp, "= %20.10f", *((float *) pd));
|
||||
break;
|
||||
case RTA_PFLOAT:
|
||||
fprintf(ftmp, "= %20.10f", **((float **) pd));
|
||||
break;
|
||||
}
|
||||
did_1_col = 1;
|
||||
}
|
||||
if (did_header)
|
||||
fprintf(ftmp, " LIMIT 1 OFFSET %d\n", rx);
|
||||
}
|
||||
|
||||
/* Done saving the data. Close the file and rename it to the
|
||||
location the user requested */
|
||||
|
||||
/* (BTW: we use rename() because it is guaranteed to be atomic.
|
||||
Rename() requires that both files be on the same partition; hence
|
||||
our effort to put the temp file in the same directory as the
|
||||
target file.) */
|
||||
(void) fclose(ftmp);
|
||||
if (rename(tfile, fname) != 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Save, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
#endif
|
||||
return (RTA_SUCCESS);
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* rta_load(): - Load a table from a file of UPDATE commands.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be loaded
|
||||
* fname - string with name of the load file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table loaded
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int
|
||||
rta_load(TBLDEF *ptbl, char *fname)
|
||||
{
|
||||
extern struct EpgStat rtastat;
|
||||
FILE *fp; /* FILE handle to the load file */
|
||||
char *savefilename; /* table's savefile name */
|
||||
char line[MX_LN_SZ]; /* input line from file */
|
||||
char reply[MX_LN_SZ]; /* response from SQL process */
|
||||
int nreply; /* number of free bytes in reply */
|
||||
|
||||
/* We open the load file and read it one line at a time, executing
|
||||
each line that contains "UPDATE" as the first word. (Lines not
|
||||
starting with UPDATE are comments.) Note that any write callbacks
|
||||
associated with the table will be invoked. We hide the table's
|
||||
save file name, if any, in order to prevent the system from trying
|
||||
to save the table before we are done loading it. */
|
||||
fp = fopen(fname, "r");
|
||||
if (fp == (FILE *) 0)
|
||||
{
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Load, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
|
||||
/* Don't let the DB try to save changes right now */
|
||||
savefilename = ptbl->savefile;
|
||||
ptbl->savefile = (char *) 0;
|
||||
|
||||
/* process each line in the file */
|
||||
while (fgets(line, MX_LN_SZ, fp))
|
||||
{
|
||||
/* A comment if first word is not "UPDATE " */
|
||||
if (strncmp(line, "UPDATE ", 7))
|
||||
continue;
|
||||
|
||||
nreply = MX_LN_SZ;
|
||||
SQL_string(line, reply, &nreply);
|
||||
if (!strncmp(line, "UPDATE 1", 8))
|
||||
{
|
||||
/* SQL command failed! Report error */
|
||||
rtastat.nsyserr++;
|
||||
if (rtadbg.syserr)
|
||||
rtalog(LOC, Er_No_Load, fname);
|
||||
return (RTA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
ptbl->savefile = savefilename;
|
||||
|
||||
return (RTA_SUCCESS);
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,176 +0,0 @@
|
|||
|
||||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* do_sql.h
|
||||
**************************************************************/
|
||||
|
||||
#ifndef DO_SQL_H
|
||||
#define DO_SQL_H 1
|
||||
|
||||
#include "rta.h"
|
||||
|
||||
/* types of SQL statements recognized */
|
||||
#define RTA_SELECT 0
|
||||
#define RTA_UPDATE 1
|
||||
#define RTA_CALL 2
|
||||
#define RTA_BEGIN 3
|
||||
#define RTA_COMMIT 4
|
||||
|
||||
/* types of relations allowed in WHERE */
|
||||
#define RTA_EQ 0
|
||||
#define RTA_NE 1
|
||||
#define RTA_GT 2
|
||||
#define RTA_LT 3
|
||||
#define RTA_GE 4
|
||||
#define RTA_LE 5
|
||||
|
||||
/* SQL errors to the front ends */
|
||||
#define E_NOTABLE "EERROR: Relation '%s' does not exist\n"
|
||||
#define E_NOCOLUMN "EERROR: Attribute '%s' not found\n"
|
||||
#define E_BADPARSE "EERROR: SQL parse error\n",""
|
||||
#define E_BIGSTR "EERROR: String too long for '%s'\n"
|
||||
#define E_NOWRITE "EERROR: Can not update read-only column '%s'\n"
|
||||
#define E_FULLBUF "EERROR: Output buffer full\n",""
|
||||
|
||||
/* Defines for the meta tables. The table of tables must always be
|
||||
table #0, and the table of columns must always be table #1. */
|
||||
#define RTA_TABLES 0
|
||||
#define RTA_COLUMNS 1
|
||||
|
||||
/* Used to remove a few characters from dbg() lines */
|
||||
#define LOC __FILE__,__LINE__
|
||||
|
||||
/* Maximum number of characters in printed data type */
|
||||
#define MX_INT_STRING (12)
|
||||
#define MX_LONG_STRING (24)
|
||||
#define MX_FLOT_STRING (24)
|
||||
|
||||
/* Max # strings in our private stack for yacc */
|
||||
#define MXPARSESTR ((NCMDCOLS *2) + 4)
|
||||
|
||||
/** ************************************************************
|
||||
* This structure contains/encodes the parsed SQL command from
|
||||
* one of the UI or client interfaces.
|
||||
* This structure is filled in by the yacc parser. If the parse
|
||||
* is successful, the completed structure is passed to do_sql()
|
||||
* for execution.
|
||||
*
|
||||
* The 'command' is just the type of SQL command.
|
||||
* The 'cols' field is a list of names from the "SELECT cols"
|
||||
* or from the "UPDATE col=X [,...]".
|
||||
* The 'vals' field is a list of the strings "X" in an UPDATE.
|
||||
* The 'tbl' field has the name of the table in use.
|
||||
* The 'whrcols' and 'whrvals' fields are similar to the cols
|
||||
* and vals fields.
|
||||
* Note that cols, vals, whrcols, and whrvals in the structure
|
||||
* below point to alloc()'ed memory and must be freed when done.
|
||||
**************************************************************/
|
||||
struct Sql_Cmd
|
||||
{
|
||||
char *sqlcmd; /* points to text of SQL command */
|
||||
int command; /* RTA_SELECT, UPDATE, or CALL */
|
||||
char *tbl; /* the table in question */
|
||||
TBLDEF *ptbl; /* pointer to table in TBLDEFS */
|
||||
int itbl; /* Index of table in Tbl */
|
||||
int ncols; /* count of columns to display/update */
|
||||
char *cols[NCMDCOLS]; /* col to display/update */
|
||||
COLDEF *pcol[NCMDCOLS]; /* pointers to cols in COLDEFS */
|
||||
char *updvals[NCMDCOLS]; /* values for column updates */
|
||||
int updints[NCMDCOLS]; /* integer values for updates */
|
||||
long long updlngs[NCMDCOLS]; /* long values for updates */
|
||||
float updflot[NCMDCOLS]; /* float values for updates */
|
||||
int nwhrcols; /* count of columns in where clause */
|
||||
char *whrcols[NCMDCOLS]; /* cols in where */
|
||||
int whrrel[NCMDCOLS]; /* relation (EQ, GT...) in where */
|
||||
COLDEF *pwhr[NCMDCOLS]; /* pointers to Wcols in COLDEFS */
|
||||
char *whrvals[NCMDCOLS]; /* values in the where clause */
|
||||
int whrints[NCMDCOLS]; /* integer values of whrvals[] */
|
||||
long long whrlngs[NCMDCOLS]; /* long values of whrvals[] */
|
||||
float whrflot[NCMDCOLS]; /* float values of whrvals[] */
|
||||
int limit; /* max num rows to output, 0=no_limit */
|
||||
int offset; /* scan past this # rows before output */
|
||||
char *out; /* put command response here */
|
||||
int *nout; /* I/O number free bytes at 'out' */
|
||||
char *errout; /* ==out at start. But for err msgs */
|
||||
int nerrout; /* ==nout at start. But for err msgs */
|
||||
int err; /* set =1 if error in SQL parse */
|
||||
int nlineout; /* #bytes in SELECT row response */
|
||||
};
|
||||
|
||||
/* Define the debug config structure */
|
||||
struct EpgDbg
|
||||
{
|
||||
int syserr; /* !=0 to log system errors */
|
||||
int rtaerr; /* !=0 to log rta errors */
|
||||
int sqlerr; /* !=0 to log SQL errors */
|
||||
int trace; /* !=0 to log SQL commands */
|
||||
int target; /* 0=off, 1=syslog, 2=stderr, 3=both */
|
||||
int priority; /* syslog() priority level */
|
||||
int facility; /* syslog() facility */
|
||||
char ident[MXDBGIDENT]; /* ident string for syslog() */
|
||||
};
|
||||
|
||||
/* Define the stats structure */
|
||||
struct EpgStat
|
||||
{
|
||||
long long nsyserr; /* count of failed OS calls. */
|
||||
long long nrtaerr; /* count of internal rta failures. */
|
||||
long long nsqlerr; /* count of SQL failures. */
|
||||
long long nauth; /* count of DB authorizations. */
|
||||
long long nupdate; /* count of UPDATE requests */
|
||||
long long nselect; /* count of SELECT requests */
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id; /* FD of TCP conn (=-1 if not in use) */
|
||||
char username[33]; /* Index of next location in cmd buffer */
|
||||
char password[33];
|
||||
char cmd[1000]; /* SQL command from UI program */
|
||||
int rspfree; /* Number of free bytes in rsp buffer */
|
||||
char rsp[50000]; /* SQL response to the UI program */
|
||||
int ctm; /* connect time (==time();) */
|
||||
int cdur; /* duration time (== now()-ctm;) */
|
||||
char strid[33];
|
||||
} EpgConn;
|
||||
|
||||
/* the connections list */
|
||||
list_t *pgconn;
|
||||
|
||||
|
||||
/* this is a struct that stores the RTA runtime config */
|
||||
struct RTA_Conf
|
||||
{
|
||||
logcb loggingfunc; /* logging callback */
|
||||
} RTA_Conf;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward references */
|
||||
void do_sql(char *, int *);
|
||||
void send_error(char *, int, char *, char *);
|
||||
void verify_table_name(char *, int *);
|
||||
void verify_select_list(char *, int *);
|
||||
void verify_update_list(char *, int *);
|
||||
void verify_where_list(char *, int *);
|
||||
void sqldo_update(char *, int *);
|
||||
void sqldo_update(char *, int *);
|
||||
int send_row_description(char *, int *);
|
||||
void do_select(char *, int *);
|
||||
void do_call(char *, int *);
|
||||
void do_begin(char *, int *);
|
||||
void do_commit(char *, int *);
|
||||
void ad_str(char **, char *);
|
||||
void ad_int2(char **, int);
|
||||
void ad_int4(char **, int);
|
||||
void rtalog(char *, int, char *, ...);
|
||||
|
||||
#endif
|
|
@ -1,746 +0,0 @@
|
|||
#ifndef lint
|
||||
static char const
|
||||
yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#define YYBYACC 1
|
||||
#define YYMAJOR 1
|
||||
#define YYMINOR 9
|
||||
#define YYLEX yylex()
|
||||
#define YYEMPTY -1
|
||||
#define yyclearin (yychar=(YYEMPTY))
|
||||
#define yyerrok (yyerrflag=0)
|
||||
#define YYRECOVERING() (yyerrflag!=0)
|
||||
static int yygrowstack();
|
||||
#define YYPREFIX "yy"
|
||||
#line 14 "parse.y"
|
||||
#include <stdlib.h>
|
||||
#include "do_sql.h"
|
||||
|
||||
|
||||
#define YYSTYPE int
|
||||
|
||||
|
||||
/* While we parse the SET and WHERE clause we need someplace
|
||||
* to temporarily store the type of relation */
|
||||
static int whrrelat;
|
||||
|
||||
/* We don't want to pass pointers to allocated memory on the */
|
||||
/* yacc stack, since the memory might not be freed when an */
|
||||
/* error is detected. Instead, we allocate the memory and */
|
||||
/* put the pointer into the following table where it is easy */
|
||||
/* free on error. */
|
||||
char *parsestr[MXPARSESTR];
|
||||
|
||||
static int n; /* temp/scratch integer */
|
||||
|
||||
extern struct Sql_Cmd cmd; /* encoded SQL command (a global) */
|
||||
extern char *yytext;
|
||||
extern int yyleng;
|
||||
extern void yyerror(char *);
|
||||
extern int yylex();
|
||||
#line 43 "parse.tab.c"
|
||||
#define YYERRCODE 256
|
||||
#define SQLBEGIN 257
|
||||
#define SQLCOMMIT 258
|
||||
#define SELECT 259
|
||||
#define UPDATE 260
|
||||
#define FROM 261
|
||||
#define WHERE 262
|
||||
#define NAME 263
|
||||
#define STRING 264
|
||||
#define INTEGER 265
|
||||
#define REALNUM 266
|
||||
#define LIMIT 267
|
||||
#define OFFSET 268
|
||||
#define SET 269
|
||||
#define EQ 270
|
||||
#define NE 271
|
||||
#define GT 272
|
||||
#define LT 273
|
||||
#define GE 274
|
||||
#define LE 275
|
||||
#define AND 276
|
||||
const short yylhs[] = { -1,
|
||||
0, 0, 0, 0, 0, 0, 1, 1, 2, 2,
|
||||
3, 3, 6, 6, 7, 7, 8, 8, 10, 10,
|
||||
10, 11, 11, 11, 11, 11, 11, 9, 9, 9,
|
||||
4, 4, 13, 13, 12, 12, 12, 12, 5, 5,
|
||||
};
|
||||
const short yylen[] = { 2,
|
||||
0, 1, 1, 1, 1, 1, 2, 1, 2, 1,
|
||||
7, 6, 1, 3, 1, 3, 0, 2, 3, 3,
|
||||
3, 1, 1, 1, 1, 1, 1, 0, 2, 4,
|
||||
7, 6, 3, 3, 1, 1, 1, 1, 5, 4,
|
||||
};
|
||||
const short yydefred[] = { 0,
|
||||
0, 0, 0, 0, 0, 2, 3, 4, 5, 6,
|
||||
7, 9, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 14, 0, 0, 39, 0, 0, 0, 0,
|
||||
0, 0, 16, 0, 0, 0, 0, 0, 35, 36,
|
||||
37, 38, 34, 33, 0, 22, 23, 24, 25, 26,
|
||||
27, 0, 0, 0, 0, 11, 31, 21, 19, 20,
|
||||
0, 30,
|
||||
};
|
||||
const short yydgoto[] = { 5,
|
||||
6, 7, 8, 9, 10, 14, 22, 29, 38, 36,
|
||||
52, 43, 25,
|
||||
};
|
||||
const short yysindex[] = { -240,
|
||||
-34, -33, -236, -235, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, -10, -37, -238, -9, -230, -229, -228, -23,
|
||||
-8, -225, 0, -231, -39, 0, -223, -36, -226, -242,
|
||||
-228, -226, 0, -259, -36, -234, -222, -15, 0, 0,
|
||||
0, 0, 0, 0, -14, 0, 0, 0, 0, 0,
|
||||
0, -242, -41, -36, -221, 0, 0, 0, 0, 0,
|
||||
-219, 0,
|
||||
};
|
||||
const short yyrindex[] = { 48,
|
||||
49, 50, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, -35, 0, 0, 0, 0, 0, 0, 51,
|
||||
1, 2, 0, 0, 2, 0, 0, 0, 6, 0,
|
||||
0, 6, 0, 0, 0, 3, 0, 52, 0, 0,
|
||||
0, 0, 0, 0, 53, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
};
|
||||
const short yygindex[] = { 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 29, 23, -25,
|
||||
0, 4, 26,
|
||||
};
|
||||
#define YYTABLESIZE 270
|
||||
const short yytable[] = { 59,
|
||||
15, 17, 18, 35, 31, 28, 18, 29, 13, 53,
|
||||
46, 47, 48, 49, 50, 51, 1, 2, 3, 4,
|
||||
39, 40, 41, 42, 11, 12, 13, 15, 60, 16,
|
||||
19, 20, 21, 23, 24, 26, 28, 27, 30, 33,
|
||||
37, 54, 55, 56, 57, 62, 61, 1, 8, 10,
|
||||
40, 12, 32, 32, 45, 58, 44, 0, 0, 15,
|
||||
17, 18, 0, 0, 28, 0, 29, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 28, 17, 0, 13, 34, 0, 0, 0,
|
||||
0, 0, 0, 0, 54, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 0, 0, 15, 17, 18,
|
||||
};
|
||||
const short yycheck[] = { 41,
|
||||
0, 0, 0, 40, 44, 0, 44, 0, 44, 35,
|
||||
270, 271, 272, 273, 274, 275, 257, 258, 259, 260,
|
||||
263, 264, 265, 266, 59, 59, 263, 263, 54, 40,
|
||||
269, 41, 263, 263, 263, 59, 262, 46, 270, 263,
|
||||
267, 276, 265, 59, 59, 265, 268, 0, 0, 0,
|
||||
0, 0, 0, 25, 32, 52, 31, -1, -1, 59,
|
||||
59, 59, -1, -1, 59, -1, 59, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, 262, 261, -1, 261, 263, -1, -1, -1,
|
||||
-1, -1, -1, -1, 276, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, 262, -1, -1, -1, -1, 267, 267, 267,
|
||||
};
|
||||
#define YYFINAL 5
|
||||
#ifndef YYDEBUG
|
||||
#define YYDEBUG 0
|
||||
#endif
|
||||
#define YYMAXTOKEN 276
|
||||
#if YYDEBUG
|
||||
const char * const yyname[] = {
|
||||
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,"'('","')'",0,0,"','",0,"'.'",0,0,0,0,0,0,0,0,0,0,0,0,"';'",0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"SQLBEGIN",
|
||||
"SQLCOMMIT","SELECT","UPDATE","FROM","WHERE","NAME","STRING","INTEGER",
|
||||
"REALNUM","LIMIT","OFFSET","SET","EQ","NE","GT","LT","GE","LE","AND",
|
||||
};
|
||||
const char * const yyrule[] = {
|
||||
"$accept : command",
|
||||
"command :",
|
||||
"command : begin_statement",
|
||||
"command : commit_statement",
|
||||
"command : select_statement",
|
||||
"command : update_statement",
|
||||
"command : function_call",
|
||||
"begin_statement : SQLBEGIN ';'",
|
||||
"begin_statement : SQLBEGIN",
|
||||
"commit_statement : SQLCOMMIT ';'",
|
||||
"commit_statement : SQLCOMMIT",
|
||||
"select_statement : SELECT column_list FROM table_name where_clause limit_clause ';'",
|
||||
"select_statement : SELECT column_list FROM table_name where_clause limit_clause",
|
||||
"column_list : NAME",
|
||||
"column_list : column_list ',' NAME",
|
||||
"table_name : NAME",
|
||||
"table_name : NAME '.' NAME",
|
||||
"where_clause :",
|
||||
"where_clause : WHERE test_condition",
|
||||
"test_condition : '(' test_condition ')'",
|
||||
"test_condition : test_condition AND test_condition",
|
||||
"test_condition : NAME relation literal",
|
||||
"relation : EQ",
|
||||
"relation : NE",
|
||||
"relation : GT",
|
||||
"relation : LT",
|
||||
"relation : GE",
|
||||
"relation : LE",
|
||||
"limit_clause :",
|
||||
"limit_clause : LIMIT INTEGER",
|
||||
"limit_clause : LIMIT INTEGER OFFSET INTEGER",
|
||||
"update_statement : UPDATE NAME SET set_list where_clause limit_clause ';'",
|
||||
"update_statement : UPDATE NAME SET set_list where_clause limit_clause",
|
||||
"set_list : set_list ',' set_list",
|
||||
"set_list : NAME EQ literal",
|
||||
"literal : NAME",
|
||||
"literal : STRING",
|
||||
"literal : INTEGER",
|
||||
"literal : REALNUM",
|
||||
"function_call : SELECT NAME '(' ')' ';'",
|
||||
"function_call : SELECT NAME '(' ')'",
|
||||
};
|
||||
#endif
|
||||
#ifndef YYSTYPE
|
||||
typedef int YYSTYPE;
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifdef YYSTACKSIZE
|
||||
#undef YYMAXDEPTH
|
||||
#define YYMAXDEPTH YYSTACKSIZE
|
||||
#else
|
||||
#ifdef YYMAXDEPTH
|
||||
#define YYSTACKSIZE YYMAXDEPTH
|
||||
#else
|
||||
#define YYSTACKSIZE 10000
|
||||
#define YYMAXDEPTH 10000
|
||||
#endif
|
||||
#endif
|
||||
#define YYINITSTACKSIZE 200
|
||||
int yydebug;
|
||||
int yynerrs;
|
||||
int yyerrflag;
|
||||
int yychar;
|
||||
short *yyssp;
|
||||
YYSTYPE *yyvsp;
|
||||
YYSTYPE yyval;
|
||||
YYSTYPE yylval;
|
||||
short *yyss;
|
||||
short *yysslim;
|
||||
YYSTYPE *yyvs;
|
||||
int yystacksize;
|
||||
#line 250 "parse.y"
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* freesql(): - Free allocated memory from previous command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: Frees memory from last command
|
||||
***************************************************************/
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* dosql_init(): - Set up data structures prior to parse of
|
||||
* an SQL command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: structure cmd is initialized
|
||||
***************************************************************/
|
||||
void dosql_init() {
|
||||
int i;
|
||||
|
||||
for (i=0; i<NCMDCOLS; i++) {
|
||||
if (cmd.cols[i])
|
||||
free(cmd.cols[i]);
|
||||
if (cmd.updvals[i])
|
||||
free(cmd.updvals[i]); /* values for column updates */
|
||||
if (cmd.whrcols[i])
|
||||
free(cmd.whrcols[i]); /* cols in where */
|
||||
if (cmd.whrvals[i])
|
||||
free(cmd.whrvals[i]); /* values in where clause */
|
||||
cmd.cols[i] = (char *) 0;
|
||||
cmd.updvals[i] = (char *) 0;
|
||||
cmd.whrcols[i] = (char *) 0;
|
||||
cmd.whrvals[i] = (char *) 0;
|
||||
}
|
||||
if (cmd.tbl);
|
||||
free(cmd.tbl);
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i]) {
|
||||
free(parsestr[i]);
|
||||
parsestr[i] = (char *) NULL;
|
||||
}
|
||||
}
|
||||
|
||||
cmd.tbl = (char *) 0;
|
||||
cmd.ptbl = (TBLDEF *) 0;
|
||||
cmd.ncols = 0;
|
||||
cmd.nwhrcols = 0;
|
||||
cmd.limit = 1<<30; /* no real limit */
|
||||
cmd.offset = 0;
|
||||
cmd.err = 0;
|
||||
}
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
send_error(LOC, E_BADPARSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#line 324 "parse.tab.c"
|
||||
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
|
||||
static int yygrowstack()
|
||||
{
|
||||
int newsize, i;
|
||||
short *newss;
|
||||
YYSTYPE *newvs;
|
||||
|
||||
if ((newsize = yystacksize) == 0)
|
||||
newsize = YYINITSTACKSIZE;
|
||||
else if (newsize >= YYMAXDEPTH)
|
||||
return -1;
|
||||
else if ((newsize *= 2) > YYMAXDEPTH)
|
||||
newsize = YYMAXDEPTH;
|
||||
i = yyssp - yyss;
|
||||
newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
|
||||
(short *)malloc(newsize * sizeof *newss);
|
||||
if (newss == NULL)
|
||||
return -1;
|
||||
yyss = newss;
|
||||
yyssp = newss + i;
|
||||
newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
|
||||
(YYSTYPE *)malloc(newsize * sizeof *newvs);
|
||||
if (newvs == NULL)
|
||||
return -1;
|
||||
yyvs = newvs;
|
||||
yyvsp = newvs + i;
|
||||
yystacksize = newsize;
|
||||
yysslim = yyss + newsize - 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define YYABORT goto yyabort
|
||||
#define YYREJECT goto yyabort
|
||||
#define YYACCEPT goto yyaccept
|
||||
#define YYERROR goto yyerrlab
|
||||
|
||||
#ifndef YYPARSE_PARAM
|
||||
#if defined(__cplusplus) || __STDC__
|
||||
#define YYPARSE_PARAM_ARG void
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#else /* ! ANSI-C/C++ */
|
||||
#define YYPARSE_PARAM_ARG
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#endif /* ANSI-C/C++ */
|
||||
#else /* YYPARSE_PARAM */
|
||||
#ifndef YYPARSE_PARAM_TYPE
|
||||
#define YYPARSE_PARAM_TYPE void *
|
||||
#endif
|
||||
#if defined(__cplusplus) || __STDC__
|
||||
#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#else /* ! ANSI-C/C++ */
|
||||
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;
|
||||
#endif /* ANSI-C/C++ */
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
int
|
||||
yyparse (YYPARSE_PARAM_ARG)
|
||||
YYPARSE_PARAM_DECL
|
||||
{
|
||||
register int yym, yyn, yystate;
|
||||
#if YYDEBUG
|
||||
register const char *yys;
|
||||
|
||||
if ((yys = getenv("YYDEBUG")))
|
||||
{
|
||||
yyn = *yys;
|
||||
if (yyn >= '0' && yyn <= '9')
|
||||
yydebug = yyn - '0';
|
||||
}
|
||||
#endif
|
||||
|
||||
yynerrs = 0;
|
||||
yyerrflag = 0;
|
||||
yychar = (-1);
|
||||
|
||||
if (yyss == NULL && yygrowstack()) goto yyoverflow;
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
*yyssp = yystate = 0;
|
||||
|
||||
yyloop:
|
||||
if ((yyn = yydefred[yystate])) goto yyreduce;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("%sdebug: state %d, reading %d (%s)\n",
|
||||
YYPREFIX, yystate, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: state %d, shifting to state %d\n",
|
||||
YYPREFIX, yystate, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yysslim && yygrowstack())
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
yychar = (-1);
|
||||
if (yyerrflag > 0) --yyerrflag;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
goto yyreduce;
|
||||
}
|
||||
if (yyerrflag) goto yyinrecovery;
|
||||
#if defined(lint) || defined(__GNUC__)
|
||||
goto yynewerror;
|
||||
#endif
|
||||
yynewerror:
|
||||
yyerror("syntax error");
|
||||
#if defined(lint) || defined(__GNUC__)
|
||||
goto yyerrlab;
|
||||
#endif
|
||||
yyerrlab:
|
||||
++yynerrs;
|
||||
yyinrecovery:
|
||||
if (yyerrflag < 3)
|
||||
{
|
||||
yyerrflag = 3;
|
||||
for (;;)
|
||||
{
|
||||
if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: state %d, error recovery shifting\
|
||||
to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
|
||||
#endif
|
||||
if (yyssp >= yysslim && yygrowstack())
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate = yytable[yyn];
|
||||
*++yyvsp = yylval;
|
||||
goto yyloop;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: error recovery discarding state %d\n",
|
||||
YYPREFIX, *yyssp);
|
||||
#endif
|
||||
if (yyssp <= yyss) goto yyabort;
|
||||
--yyssp;
|
||||
--yyvsp;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (yychar == 0) goto yyabort;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
|
||||
YYPREFIX, yystate, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
yychar = (-1);
|
||||
goto yyloop;
|
||||
}
|
||||
yyreduce:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: state %d, reducing by rule %d (%s)\n",
|
||||
YYPREFIX, yystate, yyn, yyrule[yyn]);
|
||||
#endif
|
||||
yym = yylen[yyn];
|
||||
yyval = yyvsp[1-yym];
|
||||
switch (yyn)
|
||||
{
|
||||
case 1:
|
||||
#line 70 "parse.y"
|
||||
{ YYABORT; }
|
||||
break;
|
||||
case 7:
|
||||
#line 81 "parse.y"
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
#line 85 "parse.y"
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
#line 92 "parse.y"
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
#line 96 "parse.y"
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
#line 103 "parse.y"
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
#line 107 "parse.y"
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
#line 114 "parse.y"
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
#line 119 "parse.y"
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
#line 131 "parse.y"
|
||||
{
|
||||
cmd.tbl = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
#line 136 "parse.y"
|
||||
{
|
||||
cmd.tbl = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
#line 153 "parse.y"
|
||||
{ n = cmd.nwhrcols;
|
||||
cmd.whrcols[n] = parsestr[(int) yyvsp[-2]];
|
||||
parsestr[(int) yyvsp[-2]] = (char *) NULL;
|
||||
cmd.whrrel[n] = whrrelat;
|
||||
cmd.whrvals[n] = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
cmd.nwhrcols++;
|
||||
if (cmd.nwhrcols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
#line 169 "parse.y"
|
||||
{ whrrelat = RTA_EQ; }
|
||||
break;
|
||||
case 23:
|
||||
#line 170 "parse.y"
|
||||
{ whrrelat = RTA_NE; }
|
||||
break;
|
||||
case 24:
|
||||
#line 171 "parse.y"
|
||||
{ whrrelat = RTA_GT; }
|
||||
break;
|
||||
case 25:
|
||||
#line 172 "parse.y"
|
||||
{ whrrelat = RTA_LT; }
|
||||
break;
|
||||
case 26:
|
||||
#line 173 "parse.y"
|
||||
{ whrrelat = RTA_GE; }
|
||||
break;
|
||||
case 27:
|
||||
#line 174 "parse.y"
|
||||
{ whrrelat = RTA_LE; }
|
||||
break;
|
||||
case 29:
|
||||
#line 181 "parse.y"
|
||||
{ cmd.limit = atoi(parsestr[(int) yyvsp[0]]);
|
||||
free(parsestr[(int) yyvsp[0]]);
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
#line 186 "parse.y"
|
||||
{ cmd.limit = atoi(parsestr[(int) yyvsp[-2]]);
|
||||
free(parsestr[(int) yyvsp[-2]]);
|
||||
parsestr[(int) yyvsp[-2]] = (char *) NULL;
|
||||
cmd.offset = atoi(parsestr[(int) yyvsp[0]]);
|
||||
free(parsestr[(int) yyvsp[0]]);
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
#line 198 "parse.y"
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) yyvsp[-5]];
|
||||
parsestr[(int) yyvsp[-5]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
#line 203 "parse.y"
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) yyvsp[-4]];
|
||||
parsestr[(int) yyvsp[-4]] = (char *) NULL;
|
||||
}
|
||||
break;
|
||||
case 34:
|
||||
#line 212 "parse.y"
|
||||
{ n = cmd.ncols;
|
||||
cmd.cols[n] = parsestr[(int) yyvsp[-2]];
|
||||
parsestr[(int) yyvsp[-2]] = (char *) NULL;
|
||||
cmd.updvals[n] = parsestr[(int) yyvsp[0]];
|
||||
parsestr[(int) yyvsp[0]] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 39:
|
||||
#line 235 "parse.y"
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) yyvsp[-3]];
|
||||
parsestr[(int) yyvsp[-3]] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
case 40:
|
||||
#line 241 "parse.y"
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) yyvsp[-2]];
|
||||
parsestr[(int) yyvsp[-2]] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
break;
|
||||
#line 691 "parse.tab.c"
|
||||
}
|
||||
yyssp -= yym;
|
||||
yystate = *yyssp;
|
||||
yyvsp -= yym;
|
||||
yym = yylhs[yyn];
|
||||
if (yystate == 0 && yym == 0)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: after reduction, shifting from state 0 to\
|
||||
state %d\n", YYPREFIX, YYFINAL);
|
||||
#endif
|
||||
yystate = YYFINAL;
|
||||
*++yyssp = YYFINAL;
|
||||
*++yyvsp = yyval;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = yylex()) < 0) yychar = 0;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = 0;
|
||||
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
|
||||
if (!yys) yys = "illegal-symbol";
|
||||
printf("%sdebug: state %d, reading %d (%s)\n",
|
||||
YYPREFIX, YYFINAL, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (yychar == 0) goto yyaccept;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
|
||||
yystate = yytable[yyn];
|
||||
else
|
||||
yystate = yydgoto[yym];
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: after reduction, shifting from state %d \
|
||||
to state %d\n", YYPREFIX, *yyssp, yystate);
|
||||
#endif
|
||||
if (yyssp >= yysslim && yygrowstack())
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
*++yyssp = yystate;
|
||||
*++yyvsp = yyval;
|
||||
goto yyloop;
|
||||
yyoverflow:
|
||||
yyerror("yacc stack overflow");
|
||||
yyabort:
|
||||
return (1);
|
||||
yyaccept:
|
||||
return (0);
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef YYERRCODE
|
||||
#define YYERRCODE 256
|
||||
#endif
|
||||
|
||||
#define SQLBEGIN 257
|
||||
#define SQLCOMMIT 258
|
||||
#define SELECT 259
|
||||
#define UPDATE 260
|
||||
#define FROM 261
|
||||
#define WHERE 262
|
||||
#define NAME 263
|
||||
#define STRING 264
|
||||
#define INTEGER 265
|
||||
#define REALNUM 266
|
||||
#define LIMIT 267
|
||||
#define OFFSET 268
|
||||
#define SET 269
|
||||
#define EQ 270
|
||||
#define NE 271
|
||||
#define GT 272
|
||||
#define LT 273
|
||||
#define GE 274
|
||||
#define LE 275
|
||||
#define AND 276
|
|
@ -1,310 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* parse.y -- Yacc parser for our subset of SQL.
|
||||
**************************************************************/
|
||||
|
||||
%{
|
||||
#include <stdlib.h>
|
||||
#include "do_sql.h"
|
||||
|
||||
|
||||
#define YYSTYPE int
|
||||
|
||||
|
||||
/* While we parse the SET and WHERE clause we need someplace
|
||||
* to temporarily store the type of relation */
|
||||
static int whrrelat;
|
||||
|
||||
/* We don't want to pass pointers to allocated memory on the */
|
||||
/* yacc stack, since the memory might not be freed when an */
|
||||
/* error is detected. Instead, we allocate the memory and */
|
||||
/* put the pointer into the following table where it is easy */
|
||||
/* free on error. */
|
||||
char *parsestr[MXPARSESTR];
|
||||
|
||||
static int n; /* temp/scratch integer */
|
||||
|
||||
extern struct Sql_Cmd cmd; /* encoded SQL command (a global) */
|
||||
extern char *yytext;
|
||||
extern int yyleng;
|
||||
extern void yyerror(char *);
|
||||
extern int yylex();
|
||||
%}
|
||||
|
||||
%token SQLBEGIN
|
||||
%token SQLCOMMIT
|
||||
%token SELECT
|
||||
%token UPDATE
|
||||
%token FROM
|
||||
%token WHERE
|
||||
%token NAME
|
||||
%token STRING
|
||||
%token INTEGER
|
||||
%token REALNUM
|
||||
%token LIMIT
|
||||
%token OFFSET
|
||||
%token SET
|
||||
/* relations for the where clause */
|
||||
%token EQ
|
||||
%token NE
|
||||
%token GT
|
||||
%token LT
|
||||
%token GE
|
||||
%token LE
|
||||
|
||||
|
||||
%left AND
|
||||
%left ','
|
||||
%left '.'
|
||||
%%
|
||||
|
||||
|
||||
command:
|
||||
{ YYABORT; }
|
||||
| begin_statement
|
||||
| commit_statement
|
||||
| select_statement
|
||||
| update_statement
|
||||
| function_call
|
||||
;
|
||||
|
||||
|
||||
begin_statement:
|
||||
SQLBEGIN ';'
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SQLBEGIN
|
||||
{ cmd.command = RTA_BEGIN;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
commit_statement:
|
||||
SQLCOMMIT ';'
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SQLCOMMIT
|
||||
{ cmd.command = RTA_COMMIT;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
select_statement:
|
||||
SELECT column_list FROM table_name where_clause limit_clause ';'
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SELECT column_list FROM table_name where_clause limit_clause
|
||||
{ cmd.command = RTA_SELECT;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
column_list:
|
||||
NAME
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
}
|
||||
| column_list "," NAME
|
||||
{ cmd.cols[cmd.ncols] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
table_name:
|
||||
NAME
|
||||
{
|
||||
cmd.tbl = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
}
|
||||
| NAME "." NAME
|
||||
{
|
||||
cmd.tbl = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
where_clause:
|
||||
/* empty, optional */
|
||||
| WHERE test_condition
|
||||
;
|
||||
|
||||
|
||||
test_condition:
|
||||
'(' test_condition ')'
|
||||
| test_condition AND test_condition
|
||||
| NAME relation literal
|
||||
{ n = cmd.nwhrcols;
|
||||
cmd.whrcols[n] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.whrrel[n] = whrrelat;
|
||||
cmd.whrvals[n] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.nwhrcols++;
|
||||
if (cmd.nwhrcols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
relation:
|
||||
EQ { whrrelat = RTA_EQ; }
|
||||
| NE { whrrelat = RTA_NE; }
|
||||
| GT { whrrelat = RTA_GT; }
|
||||
| LT { whrrelat = RTA_LT; }
|
||||
| GE { whrrelat = RTA_GE; }
|
||||
| LE { whrrelat = RTA_LE; }
|
||||
;
|
||||
|
||||
|
||||
limit_clause:
|
||||
/* empty, optional */
|
||||
| LIMIT INTEGER
|
||||
{ cmd.limit = atoi(parsestr[(int) $2]);
|
||||
free(parsestr[(int) $2]);
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
| LIMIT INTEGER OFFSET INTEGER
|
||||
{ cmd.limit = atoi(parsestr[(int) $2]);
|
||||
free(parsestr[(int) $2]);
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
cmd.offset = atoi(parsestr[(int) $4]);
|
||||
free(parsestr[(int) $4]);
|
||||
parsestr[(int) $4] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
update_statement:
|
||||
UPDATE NAME SET set_list where_clause limit_clause ';'
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
| UPDATE NAME SET set_list where_clause limit_clause
|
||||
{ cmd.command = RTA_UPDATE;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
}
|
||||
;
|
||||
|
||||
set_list:
|
||||
set_list ',' set_list
|
||||
| NAME EQ literal
|
||||
{ n = cmd.ncols;
|
||||
cmd.cols[n] = parsestr[(int) $1];
|
||||
parsestr[(int) $1] = (char *) NULL;
|
||||
cmd.updvals[n] = parsestr[(int) $3];
|
||||
parsestr[(int) $3] = (char *) NULL;
|
||||
cmd.ncols++;
|
||||
if (cmd.ncols > NCMDCOLS) {
|
||||
/* too many columns in list */
|
||||
send_error(LOC, E_BADPARSE);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
literal:
|
||||
NAME
|
||||
| STRING
|
||||
| INTEGER
|
||||
| REALNUM
|
||||
;
|
||||
|
||||
|
||||
function_call:
|
||||
SELECT NAME '(' ')' ';'
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
| SELECT NAME '(' ')'
|
||||
{ cmd.command = RTA_CALL;
|
||||
cmd.tbl = parsestr[(int) $2];
|
||||
parsestr[(int) $2] = (char *) NULL;
|
||||
YYACCEPT;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
%%
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* freesql(): - Free allocated memory from previous command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: Frees memory from last command
|
||||
***************************************************************/
|
||||
|
||||
|
||||
/***************************************************************
|
||||
* dosql_init(): - Set up data structures prior to parse of
|
||||
* an SQL command.
|
||||
*
|
||||
* Input: None.
|
||||
* Output: None.
|
||||
* Affects: structure cmd is initialized
|
||||
***************************************************************/
|
||||
void dosql_init() {
|
||||
int i;
|
||||
|
||||
for (i=0; i<NCMDCOLS; i++) {
|
||||
if (cmd.cols[i])
|
||||
free(cmd.cols[i]);
|
||||
if (cmd.updvals[i])
|
||||
free(cmd.updvals[i]); /* values for column updates */
|
||||
if (cmd.whrcols[i])
|
||||
free(cmd.whrcols[i]); /* cols in where */
|
||||
if (cmd.whrvals[i])
|
||||
free(cmd.whrvals[i]); /* values in where clause */
|
||||
cmd.cols[i] = (char *) 0;
|
||||
cmd.updvals[i] = (char *) 0;
|
||||
cmd.whrcols[i] = (char *) 0;
|
||||
cmd.whrvals[i] = (char *) 0;
|
||||
}
|
||||
if (cmd.tbl);
|
||||
free(cmd.tbl);
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i]) {
|
||||
free(parsestr[i]);
|
||||
parsestr[i] = (char *) NULL;
|
||||
}
|
||||
}
|
||||
|
||||
cmd.tbl = (char *) 0;
|
||||
cmd.ptbl = (TBLDEF *) 0;
|
||||
cmd.ncols = 0;
|
||||
cmd.nwhrcols = 0;
|
||||
cmd.limit = 1<<30; /* no real limit */
|
||||
cmd.offset = 0;
|
||||
cmd.err = 0;
|
||||
}
|
||||
|
||||
void yyerror(char *s)
|
||||
{
|
||||
send_error(LOC, E_BADPARSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1,878 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* rta.h -- DB API for your internal structures and tables
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Preamble:
|
||||
* "rta" is a specialized memory resident data base interface.
|
||||
* It is not a stand-alone server but a library which attaches
|
||||
* to a program and offers up the program's internal structures
|
||||
* and arrays as data base tables. It uses a subset of the
|
||||
* Postgres protocol and is compatible with the Postgres bindings
|
||||
* for "C", PHP, and the Postgres command line tool, psql.
|
||||
*
|
||||
* This file contains the defines, structures, and function
|
||||
* prototypes for the 'rta' package.
|
||||
*
|
||||
* INDEX:
|
||||
* - Preamble
|
||||
* - Introduction and Purpose
|
||||
* - Limits
|
||||
* - Data Structures
|
||||
* - Subroutines
|
||||
* - rta UPDATE and SELECT syntax
|
||||
* - Internal DB tables
|
||||
* - List of all error messages
|
||||
* - How to write callback routines
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Introduction and Purpose:
|
||||
* One of the problems facing Linux is the lack of real-time
|
||||
* access to status, statistics, and configuration of a service
|
||||
* once it has started. We assume that to configure an
|
||||
* application we will be able to ssh into the box, vi the /etc
|
||||
* configuration file, and do a 'kill -1' on the process. Real
|
||||
* time status and statistics are things Linux programmers don't
|
||||
* even think to ask for. The problem of run time access is
|
||||
* particularly pronounced for network appliances where ssh is
|
||||
* not available or might not be allowed.
|
||||
* Another problem for appliance designers is that more than
|
||||
* one type of user interface may be required. Sometimes
|
||||
* a customer requires that *no* configuration information be
|
||||
* sent over an Ethernet line which transports unsecured user
|
||||
* data. In such a case the customer may turn off the web
|
||||
* interface and require that configuration, status, and
|
||||
* statistics be sent over an RS-232 serial line. The VGA
|
||||
* console, SNMP MIBs, and LDAP are also popular management
|
||||
* interfaces.
|
||||
* The rta package helps solve these problems by giving
|
||||
* real-time access to the data structures and arrays inside a
|
||||
* running program. With minimal effort, we make a program's
|
||||
* data structures appear as Postgres tables in a Postgres data
|
||||
* base.
|
||||
* For example, say you have a structure for TCP connections
|
||||
* defined as:
|
||||
* struct tcpconn {
|
||||
* int fd; // conn's file descriptor
|
||||
* int lport; // local port number
|
||||
* int dport; // destination port number
|
||||
* long nsbytes; // number of sent bytes
|
||||
* long nrbytes; // number of received bytes
|
||||
* long nread; // number of reads on the socket
|
||||
* long nwrite; // number of writes on the socket
|
||||
* };
|
||||
*
|
||||
* You might then define an array of these structures as:
|
||||
* struct tcpconn Conns[MX_CONN];
|
||||
*
|
||||
* The rta package allows any programming language with a
|
||||
* Postgres binding to query your table of TCP connections....
|
||||
* SELECT lport, dport FROM Conns WHERE fd != -1;
|
||||
* UPDATE Conns SET dport = 0 WHERE fd = -1;
|
||||
*
|
||||
* A data base API for all of your program's configuration,
|
||||
* status, and statistics makes debugging easier since you can
|
||||
* view much more of your program's state with simple Postgres
|
||||
* tools. A data base API makes building user interface programs
|
||||
* easier since there are Postgres bindings for PHP, Tcl/Tk,
|
||||
* Perl, "C", as well as many more.
|
||||
* A data base API can help speed development. Carefully
|
||||
* defining the tables to be used by the UI programs lets the
|
||||
* core application team build the application while the UI
|
||||
* developers work on the web pages, wizards, and MIBs of the
|
||||
* various UI programs.
|
||||
*
|
||||
* Some effort is required. In order to make your arrays
|
||||
* and structures available to the data base API, you need to
|
||||
* tell rta about the tables and columns in the data base.
|
||||
* Table information includes things like the name, start
|
||||
* address, number of rows and the length of each row. Column
|
||||
* information includes things like the associate table name,
|
||||
* the column name, the column's data type, and whether we want
|
||||
* any special functions called when the column is read or
|
||||
* written (callbacks).
|
||||
*
|
||||
* This document describes the API offered by the rta package.
|
||||
**************************************************************/
|
||||
|
||||
#ifndef RTA_H
|
||||
#define RTA_H 1
|
||||
|
||||
/***************************************************************
|
||||
* - Limits:
|
||||
* Here are the defines which describe the internal limits
|
||||
* set in the rta package. You are welcome to change these
|
||||
* limits; just be sure to recompile the rta package using
|
||||
* your new settings.
|
||||
**************************************************************/
|
||||
|
||||
#include <limits.h> /* for PATH_MAX */
|
||||
#include "neostats.h"
|
||||
/** Maximum number of tables allowed in the system.
|
||||
* Your data base may not contain more than this number
|
||||
* of tables. */
|
||||
#define MX_TBL (500)
|
||||
|
||||
/** Maximum number of columns allowed in the system.
|
||||
* Your data base may not contain more than this number
|
||||
* of columns. */
|
||||
#define MX_COL (2500)
|
||||
|
||||
/** Maximum number of characters in a column name, table
|
||||
* name, and in help. See TBLDEF and COLDEF below. */
|
||||
#define MXCOLNAME (30)
|
||||
#define MXTBLNAME (30)
|
||||
#define MXHELPSTR (1000)
|
||||
#define MXFILENAME PATH_MAX
|
||||
|
||||
/** Maximum number of characters in the 'ident' field of
|
||||
* the openlog() call. See the rta_dbg table below. */
|
||||
#define MXDBGIDENT (20)
|
||||
|
||||
/** Maximum line size. SQL commands in save files may
|
||||
* contain no more than MX_LN_SZ characters. Lines with
|
||||
* more than MX_LN_SZ characters are silently truncated
|
||||
* to MX_LN_SZ characters. */
|
||||
#define MX_LN_SZ (1500)
|
||||
|
||||
/* Maximum number of columns allowed in a table */
|
||||
#define NCMDCOLS (40)
|
||||
|
||||
/** The column definition (COLDEF) structure describes
|
||||
* one column of a table. A table description has an
|
||||
* array of COLDEFs to describe the columns in the
|
||||
* table. */
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/** The name of the table that has this column. */
|
||||
char *table;
|
||||
|
||||
/** The name of the column. Must be at most MXCOLNAME
|
||||
* characters in length and must be unique within a
|
||||
* table. The same column name may be used in more
|
||||
* than one table. */
|
||||
char *name;
|
||||
|
||||
/** The data type of the column. Must be int, long,
|
||||
* string, pointer to void, pointer to int, pointer
|
||||
* to long, or pointer to string. The DB types are
|
||||
* defined immediately following this structure. */
|
||||
int type;
|
||||
|
||||
/** The number of bytes in the string if the above
|
||||
* type is RTA_STR or RTA_PSTR. */
|
||||
int length;
|
||||
|
||||
/** Number of bytes from the start of the structure to
|
||||
* this column. For example, a structure with an int,
|
||||
* a 20 character string, and a long, would have the
|
||||
* offset of the long set to 24. Use of the function
|
||||
* offsetof() is encouraged. If you have structure
|
||||
* members that do not start on word boundaries and
|
||||
* you do not want to use offsetof(), then consider
|
||||
* using -fpack-struct with gcc. */
|
||||
int offset;
|
||||
|
||||
/** Boolean flags which describe attributes of the
|
||||
* columns. The flags are defined after this
|
||||
* structure and include a "read-only" flag and a
|
||||
* flag to indicate that updates to this column
|
||||
* should cause a table save. (See table savefile
|
||||
* described below.) */
|
||||
int flags;
|
||||
|
||||
/** Read callback. This routine is called before the
|
||||
* column value is used. Input values include the
|
||||
* table name, the column name, the input SQL
|
||||
* command, and the (zero indexed) row number for the
|
||||
* row that is being read.
|
||||
* This routine is called *each* time the column is
|
||||
* read so the following would produce two calls:
|
||||
* SELECT intime FROM inns WHERE intime >= 100; */
|
||||
void *(*readcb) (void *tbl, char *column, char *SQL, void *data);
|
||||
|
||||
/** Write callback. This routine is called after an
|
||||
* UPDATE in which the column is written. Input values
|
||||
* include the table name, the column name, the SQL
|
||||
* command, and the (zero indexed) row number of the
|
||||
* modified row. See the callback section below.
|
||||
* This routine is called only once after all column
|
||||
* updates have occurred. For example, if there were
|
||||
* a write callback attached to the addr column, the
|
||||
* following SQL statement would cause the execution
|
||||
* of the write callback once after both mask and addr
|
||||
* have been written:
|
||||
* UPDATE ethers SET mask="255.255.255.0", addr = \
|
||||
* "192.168.1.10" WHERE name = "eth1";
|
||||
* The callback is called for each row modified. */
|
||||
void (*writecb) (char *tbl, char *column, char *SQL, int row_num);
|
||||
|
||||
/** A brief description of the column. This should
|
||||
* include the meaning of the data in the column, the
|
||||
* limits, if any, and the default values. Include
|
||||
* a brief description of the side effects of changes.
|
||||
* This field is particularly important for tables
|
||||
* which are part of the "boundary" between the UI
|
||||
* developers and the application programmers. */
|
||||
char *help;
|
||||
}
|
||||
COLDEF;
|
||||
|
||||
/***************************************************************
|
||||
* - Data Structures:
|
||||
* Each column and table in the data base must be described
|
||||
* in a data structure. Here are the data structures and
|
||||
* associated defines to describe tables and columns.
|
||||
**************************************************************/
|
||||
|
||||
/** The data types.
|
||||
* String refers to an array of char. The 'length' of
|
||||
* column must contain the number of bytes in the array.
|
||||
*/
|
||||
#define RTA_STR 0
|
||||
|
||||
/** Pointer to void. Use for generic pointers */
|
||||
#define RTA_PTR 1
|
||||
|
||||
/** Integer. This is the compiler/architecture native
|
||||
* integer. On Linux/gcc/Pentium an integer is 32 bits.
|
||||
*/
|
||||
#define RTA_INT 2
|
||||
|
||||
/** Long. This is the compiler/architecture native
|
||||
* long long. On Linux/gcc/Pentium a long long is 64
|
||||
* bits. */
|
||||
#define RTA_LONG 3
|
||||
|
||||
/** Pointer to string. Pointer to an array of char, or
|
||||
* a (**char). Note that the column length should be
|
||||
* the number of bytes in the string, not sizeof(char *).
|
||||
*/
|
||||
#define RTA_PSTR 4
|
||||
|
||||
/** Pointers to int and long. */
|
||||
#define RTA_PINT 5
|
||||
#define RTA_PLONG 6
|
||||
|
||||
/** Float and pointer to float */
|
||||
#define RTA_FLOAT 7
|
||||
#define RTA_PFLOAT 8
|
||||
#define MXCOLTYPE (RTA_PFLOAT)
|
||||
|
||||
/** The boolean flags.
|
||||
* If the disksave bit is set any writes to the column
|
||||
* causes the table to be saved to the "savefile". See
|
||||
* savefile described in the TBLDEF section below. */
|
||||
#define RTA_DISKSAVE (1<<0)
|
||||
|
||||
/** If the readonly flag is set, any writes to the
|
||||
* column will fail and a debug log message will be
|
||||
* sent. (For unit test you may find it very handy to
|
||||
* leave this bit clear to get better test coverage of
|
||||
* the corner cases.) */
|
||||
#define RTA_READONLY (1<<1)
|
||||
|
||||
/** The table definition (TBLDEF) structure describes
|
||||
* a table and is passed into the DB system by the
|
||||
* rta_add_table() subroutine. */
|
||||
typedef enum
|
||||
{
|
||||
TBL_ARRAY = 0,
|
||||
TBL_LIST = 1,
|
||||
TBL_HASH = 2,
|
||||
} RTA_TABLETYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/** The name of the table. Must be less than than
|
||||
* MXTLBNAME characters in length. Must be unique
|
||||
* within the DB. */
|
||||
char *name;
|
||||
|
||||
/** Address of the first element of the first row of
|
||||
* the array of structs that make up the table. */
|
||||
void *address;
|
||||
|
||||
/** The number of bytes in each row of the table.
|
||||
* This is usually a sizeof() of the structure
|
||||
* associated with the table. (The idea is that we
|
||||
* can get to data element E in row R with ...
|
||||
* data = *(address + (R * rowlen) + offset(E)) */
|
||||
int rowlen;
|
||||
|
||||
/** Number of rows in the table. */
|
||||
int nrows;
|
||||
|
||||
/** the type of struct this points to? Hash, List or array */
|
||||
RTA_TABLETYPE tabletype;
|
||||
|
||||
/** An array of COLDEF structures which describe each
|
||||
* column in the table. These must be in statically
|
||||
* allocated memory since the rta system references
|
||||
* them while running. */
|
||||
COLDEF *cols;
|
||||
|
||||
/** The number of columns in the table. That is, the
|
||||
* number of COLDEFs defined by 'cols'. */
|
||||
int ncol;
|
||||
|
||||
/** Save file. Path and name of a file which stores
|
||||
* the non-volatile part of the table. The file has
|
||||
* all of the UPDATE statements needed to rebuild the
|
||||
* table. The file is rewritten in its entirety each
|
||||
* time a 'savetodisk' column is updated. No file
|
||||
* save is attempted if the savefile is blank. */
|
||||
char *savefile;
|
||||
|
||||
/** Help text. A description of the table, how it is
|
||||
* used, and what its intent is. A brief note to
|
||||
* describe how it relate to other parts of the system
|
||||
* and description of important callbacks is nice
|
||||
* thing to include here. */
|
||||
char *help;
|
||||
}
|
||||
TBLDEF;
|
||||
|
||||
/***************************************************************
|
||||
* - Subroutines
|
||||
* Here is a summary of the few routines in the rta API:
|
||||
* rta_init() - initialize internal tables
|
||||
* dbcommand() - I/F to Postgres clients
|
||||
* egp_add_table() - add a table and its columns to the DB
|
||||
* SQL_string() - execute an SQL statement in the DB
|
||||
* rta_save() - save a table to a file
|
||||
* rta_load() - load a table from a file
|
||||
*
|
||||
* The FUSE based virtual filesystem adds the following:
|
||||
* rtafs_init() - mount FS and get file descriptor for it
|
||||
* do_rtafs() - handle all virtual file system IO
|
||||
* The above two routines are in the rtafs library. Their
|
||||
* inclusion in this include file cause no harm if you are
|
||||
* using only the rtadb library. Note that the rtafs library
|
||||
* requires the rtadb library.
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* dbcommand(): - Depacketize and execute Postgres commands.
|
||||
*
|
||||
* The main application accepts TCP connections from Postgres
|
||||
* clients and passes the stream of bytes (encoded SQL requests)
|
||||
* from the client into the rta system via this routine. If the
|
||||
* input buffer contains a complete command, it is executed, nin
|
||||
* is decrement by the number of bytes consumed, and RTA_SUCCESS
|
||||
* is returned. If there is not a complete command, RTA_NOCMD
|
||||
* is returned and no bytes are removed from the input buffer.
|
||||
* If a command is executed, the results are encoded into the
|
||||
* Postgres protocol and placed in the output buffer. When the
|
||||
* routine is called the input variable, nout, has the number of
|
||||
* free bytes available in the output buffer, out. When the
|
||||
* routine returns nout has been decremented by the size of the
|
||||
* response placed in the output buffer. An error message is
|
||||
* generated if the number of available bytes in the output
|
||||
* buffer is too small to hold the response from the SQL command.
|
||||
*
|
||||
* Input: cmd - the buffer with the Postgres packet
|
||||
* nin - on entry, the number of bytes in 'cmd',
|
||||
* on exit, the number of bytes remaining in cmd
|
||||
* out - the buffer to hold responses back to client
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return: RTA_SUCCESS - executed one command
|
||||
* RTA_NOCMD - input did not have a full cmd
|
||||
* RTA_CLOSE - client requests an orderly close
|
||||
**************************************************************/
|
||||
int dbcommand(char *, int *, char *, int *, int );
|
||||
void deldbconnection(int connid);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_add_table(): - Register a table for inclusion in the
|
||||
* DB interface. Adding a table allows external Postgres
|
||||
* clients access to the table's content.
|
||||
* Note that the TBLDEF structure must be statically
|
||||
* allocated. The DB system keeps just the pointer to the table
|
||||
* and does not copy the information. This means that you can
|
||||
* change the contents of the table definition by changing the
|
||||
* contents of the TBLDEF structure. This might be useful if
|
||||
* you need to allocate more memory for the table and change its
|
||||
* row count and address.
|
||||
* An error is returned if another table by the same name
|
||||
* already exists in the DB or if the table is defined without
|
||||
* any columns.
|
||||
* If a 'savefile' is specified, it is loaded. (See the
|
||||
* rta_load() command below for more details.)
|
||||
*
|
||||
* Input: ptbl - pointer to the TBLDEF to add
|
||||
* Return: RTA_SUCCESS - table added
|
||||
* RTA_ERROR - error
|
||||
**************************************************************/
|
||||
int rta_add_table(TBLDEF *);
|
||||
|
||||
/*
|
||||
* Logging function callback
|
||||
*/
|
||||
typedef void (*logcb) (char *logmsg);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_init(): - Initialize all internal variables and tables
|
||||
* This may be called more than once.
|
||||
*
|
||||
* Input: None
|
||||
* Return: None
|
||||
**************************************************************/
|
||||
void rta_init(logcb);
|
||||
void rta_exit(void);
|
||||
|
||||
/* change the uname/password for authentication */
|
||||
void rta_change_auth(char *uname, char *pass);
|
||||
|
||||
/** ************************************************************
|
||||
* SQL_string(): - Execute single SQL command
|
||||
*
|
||||
* Executes the SQL command placed in the null-terminated string,
|
||||
* cmd. The results are encoded into the Postgres protocol and
|
||||
* placed in the output buffer. When the routine is called the
|
||||
* input variable, nout, has the number of free bytes available
|
||||
* in the output buffer, out. When the routine returns nout has
|
||||
* been decremented by the size of the response placed in the
|
||||
* output buffer. An error message is generated if the number
|
||||
* of available bytes in the output buffer is too small to hold
|
||||
* the response from the SQL command.
|
||||
* This routine may be most useful when updating a table
|
||||
* value in order to invoke the write callbacks. (The output
|
||||
* buffer has the results encoded in the Postgres protocol and
|
||||
* might not be too useful directly.)
|
||||
*
|
||||
* Input: cmd - the buffer with the SQL command,
|
||||
* out - the buffer to hold responses back to client,
|
||||
* nout - on entry, the number of free bytes in 'out'
|
||||
* on exit, the number of remaining free bytes
|
||||
* Return:
|
||||
**************************************************************/
|
||||
void SQL_string(char *, char *, int *);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_save(): - Save table to file. Saves all "savetodisk"
|
||||
* columns to the path/file specified. Only savetodisk columns
|
||||
* are saved. The resultant file is a list of UPDATE commands
|
||||
* containing the desired data. There is one UPDATE command for
|
||||
* each row in the table.
|
||||
* This routine tries to minimize exposure to corrupted
|
||||
* save files by opening a temp file in the same directory as
|
||||
* the target file. The data is saved to the temp file and the
|
||||
* system call rename() is called to atomically move the temp
|
||||
* to the save file. Errors are generated if rta_save can not
|
||||
* open the temp file or is unable to rename() it.
|
||||
* As a general warning, note that any disk I/O can cause
|
||||
* a program to block briefly and so saving and loading tables
|
||||
* might cause your program to block.
|
||||
*
|
||||
* Input: ptbl - pointer to the TBLDEF structure for the
|
||||
* table to save
|
||||
* fname - null terminated string with the path and
|
||||
* file name for the stored data.
|
||||
* Return: RTA_SUCCESS - table saved
|
||||
* RTA_ERROR - some kind of error
|
||||
**************************************************************/
|
||||
int rta_save(TBLDEF *, char *);
|
||||
|
||||
/** ************************************************************
|
||||
* rta_load(): - Load a table from a file of UPDATE commands.
|
||||
* The file format is a series of UPDATE commands with one
|
||||
* command per line. Any write callbacks are executed as the
|
||||
* update occurs.
|
||||
*
|
||||
* Input: ptbl - pointer to the table to be loaded
|
||||
* fname - string with name of the load file
|
||||
*
|
||||
* Return: RTA_SUCCESS - table loaded
|
||||
* RTA_ERROR - could not open the file specified
|
||||
**************************************************************/
|
||||
int rta_load(TBLDEF *, char *);
|
||||
|
||||
/* successfully executed request or command */
|
||||
#define RTA_SUCCESS (0)
|
||||
|
||||
/* input did not have a full command */
|
||||
#define RTA_NOCMD (1)
|
||||
|
||||
/* encountered an internal error */
|
||||
#define RTA_ERROR (2)
|
||||
|
||||
/* DB client requests a session close */
|
||||
#define RTA_CLOSE (3)
|
||||
|
||||
/** ************************************************************
|
||||
* rtafs_init(): - Initialize the virtual file system interface
|
||||
* to RTA. The single input parameter is the mount point for
|
||||
* the VFS. On success, the return value is a file descriptor
|
||||
* to the VFS. On failure, a -1 is returned and errno is set.
|
||||
* This file descriptor should be used in subsequent select() or
|
||||
* poll() calls to notify your program of file system activity.
|
||||
* An important SIDE EFFECT is that the signal handlers for
|
||||
* SIGHUP, SIGINT, and SIGTERM are set. The signal handler
|
||||
* tries to unmount the virtual file system. This routine
|
||||
* is part of the librtafs library.
|
||||
* Note that FUSE requires that the owner and group of the
|
||||
* mount point be the same as the owner and group of the program
|
||||
* that does the mount. For example, if your mount point is
|
||||
* owned by Apache, then your the UID of your program must be
|
||||
* Apache as well.
|
||||
*
|
||||
* Input: char *mountpoint - desired mount point
|
||||
*
|
||||
* Return: int fd - file descriptor on success.
|
||||
**************************************************************/
|
||||
int rtafs_init(char *);
|
||||
|
||||
/** ************************************************************
|
||||
* do_rtafs(): - Handle all actual virtual file system IO.
|
||||
* This routine handles all file system IO for the virtual file
|
||||
* system mounted by the rtafs_init() call. This routine should
|
||||
* be called when there is activity on the file descriptor
|
||||
* returned from rtafs_init(). It has no input or output
|
||||
* parameters. This routine is part of the librtafs library.
|
||||
*
|
||||
* Input: (none)
|
||||
*
|
||||
* Return: (none)
|
||||
**************************************************************/
|
||||
void do_rtafs();
|
||||
|
||||
/** ************************************************************
|
||||
* - rta UPDATE and SELECT syntax
|
||||
* rta IS AN API, *NOT* A DATABASE!
|
||||
* Neither the rta UPDATE nor the rta SELECT adhere to the
|
||||
* Postgres equivalents. Joins are not allowed, and the WHERE
|
||||
* clause supports only the AND relation. There are no locks
|
||||
* or transactions.
|
||||
*
|
||||
* SELECT:
|
||||
* SELECT column_list FROM table [where_clause] [limit_clause]
|
||||
*
|
||||
* SELECT supports multiple columns, '*', LIMIT, and OFFSET.
|
||||
* At most MXCMDCOLS columns can be specified in the select list
|
||||
* or in the WHERE clause. LIMIT restricts the number of rows
|
||||
* returned to the number specified. OFFSET skips the number of
|
||||
* rows specified and begins output with the next row.
|
||||
* 'column_list' is a '*' or 'column_name [, column_name ...]'.
|
||||
* 'where_clause' is 'col_name = value [AND col_name = value ..]'
|
||||
* in which all col=val pairs must match for a row to match.
|
||||
* LIMIT and OFFSET are very useful to prevent a buffer
|
||||
* overflow on the output buffer of dbcommand(). They are also
|
||||
* very useful for web based user interfaces in which viewing
|
||||
* the data a page-at-a-time is desirable.
|
||||
* Column and table names are case sensitive. If a column
|
||||
* or table name is one of the reserved words it must be placed
|
||||
* in quotes when used. The reserved words are: AND, FROM,
|
||||
* LIMIT, OFFSET, SELECT, SET, UPDATE, and WHERE. Reserved
|
||||
* words are *not* case sensitive. You may use lower case
|
||||
* reserved words in your
|
||||
* Comparison operator in the WHERE clause include =, >=,
|
||||
* <=, >, and <.
|
||||
* You can use a reserved word, like OFFSET, as a column name
|
||||
* but you will need to quote it whenever you reference it in an
|
||||
* SQL command (SELECT "offset" FROM tunings ...). Strings
|
||||
* may contain any of the !@#$%^&*()_+-={}[]\|:;<>?,./~`
|
||||
* characters. If a string contains a double quote, use a
|
||||
* single quote to wrap it (eg 'The sign say "Hi mom!"'), and
|
||||
* use double quotes to wrap string with embedded single quotes.
|
||||
*
|
||||
* Examples:
|
||||
* SELECT * FROM rta_tables
|
||||
*
|
||||
* SELECT destIP FROM conns WHERE fd != 0
|
||||
*
|
||||
* SELECT destIP FROM conns WHERE fd != 0 AND lport = 80
|
||||
*
|
||||
* SELECT destIP, destPort FROM conns \
|
||||
* WHERE fd != 0 \
|
||||
* LIMIT 100 OFFSET 0
|
||||
*
|
||||
* SELECT destIP, destPort FROM conns \
|
||||
* WHERE fd != 0 \
|
||||
* LIMIT 100 OFFSET 0
|
||||
*
|
||||
*
|
||||
* UPDATE:
|
||||
* UPDATE table SET update_list [where_clause] [limit_clause]
|
||||
*
|
||||
* UPDATE writes values into a table. The update_list is of
|
||||
* the form 'col_name = val [, col_name = val ...]. The WHERE
|
||||
* and LIMIT clauses are as described above.
|
||||
* An update invokes write callbacks on the affected columns.
|
||||
* All data in the row is written before the callbacks are
|
||||
* called.
|
||||
* The LIMIT clause for updates is not standard Postgres SQL,
|
||||
* but can be really useful for stepping through a table one row
|
||||
* at a time. To change only the n'th row of a table, use a
|
||||
* limit clause like 'LIMIT 1 OFFSET n' (n is zero-indexed).
|
||||
*
|
||||
* Examples:
|
||||
* UPDATE conn SET lport = 0;
|
||||
*
|
||||
* UPDATE ethers SET mask = "255.255.255.0", \
|
||||
* addr = "192.168.1.10" \
|
||||
* WHERE name = "eth0"
|
||||
*
|
||||
* UPDATE conn SET usecount = 0 WHERE fd != 0 AND lport = 21
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - Internal DB tables
|
||||
* rta has five tables visible to the application:
|
||||
* rta_tables: - a table of all tables in the DB
|
||||
* rta_columns: - a table of all columns in the DB
|
||||
* pg_user: - spoof of Postgres table needed to log on
|
||||
* rta_logconfig: - controls what gets logged from rta
|
||||
* egp_stats: - simple usage and error statistics
|
||||
*
|
||||
* The rta_tables table gives SQL access to all internal and
|
||||
* registered tables. The data in the table is exactly that of
|
||||
* the TBLDEF structures registered with rta_add_table(). This
|
||||
* table is used for the generic table viewer and table editor
|
||||
* applications used mostly for application debugging. The
|
||||
* columns of rta_tables are:
|
||||
* name - the name of the table
|
||||
* address - the start address of the table in memory
|
||||
* rowlen - number of bytes in each row of the table
|
||||
* nrows - number of rows in the table
|
||||
* cols - pointer to array of column definitions
|
||||
* ncol - number of columns in the table
|
||||
* savefile - the file used to store non-volatile columns
|
||||
* help - a description of the table
|
||||
*
|
||||
* The rta_columns table has the column definitions of all
|
||||
* columns in the DB. The data in the table is exactly that of
|
||||
* the COLDEF structures registered with rta_add_table(). This
|
||||
* table is used for the generic table viewer and table editor
|
||||
* applications used mostly for application debugging. The
|
||||
* columns of rta_columns are:
|
||||
* table - the name of the column's table
|
||||
* name - name of the column
|
||||
* type - column's data type
|
||||
* length - number of bytes columns data type
|
||||
* offset - number of bytes from start of structure
|
||||
* flags - Bit field for 'read-only' and 'savetodisk'
|
||||
* readcb - pointer to subroutine called before reads
|
||||
* writecb - pointer to subroutine called after writes
|
||||
* help - a description of the column
|
||||
*
|
||||
* The pg_user table is provided to complete the connection
|
||||
* protocol between Postgres clients and the rta package. It
|
||||
* authenticates the connecting user. We spoof the protocol by
|
||||
* using a read callback to add the user into the table before
|
||||
* checking if the user is valid. In this way *any* user who
|
||||
* connects is in the table and so is authenticated. (One
|
||||
* future enhancement to rta might be to do real Postgres style
|
||||
* authentication.) The columns of pg_user are:
|
||||
* usename - spoofed to match any requested name
|
||||
* usesysid - 100
|
||||
* usecreatedb - 'f'
|
||||
* usetrace - 'f'
|
||||
* usesuper - 'f'
|
||||
* usecatupd - 'f'
|
||||
* passwd - "******"
|
||||
* valuntil - ""
|
||||
*
|
||||
* The rta_dbgconfig table controls which errors generate
|
||||
* debug log messages. See the logging section below for the
|
||||
* exact mapping. The rta package generates no user level log
|
||||
* messages, only debug messages. All of the fields in this
|
||||
* table are volatile. You will need to set the values in your
|
||||
* main program to make them seem persistent. (Try something
|
||||
* like "SQL_string("UPDATE rta_dbgconfig SET dbg ....").)
|
||||
* The columns of rta_dbgconfig are:
|
||||
* syserr - integer, 0 means no log, 1 means log.
|
||||
* This logs OS call errors like malloc()
|
||||
* failures. Default is 1.
|
||||
* rtaerr - integer, 0 means no log, 1 means log.
|
||||
* Enables logging of errors internal to the
|
||||
* rta package itself. Default is 1.
|
||||
* sqlerr - integer, 0 means no log, 1 means log.
|
||||
* Log any SQL request which generates an
|
||||
* error reply. Error replies occur if an SQL
|
||||
* request is malformed or if it requests a
|
||||
* non-existent table or column. Default is 1.
|
||||
* (SQL errors are usually client programming
|
||||
* errors.)
|
||||
* trace - integer, 0 means no log, 1 means log all
|
||||
* SQL requests. Default is 0.
|
||||
* target - 0: disable all debug logging
|
||||
* 1: log debug messages to syslog()
|
||||
* 2: log debug messages to stderr
|
||||
* 3: log to both syslog() and stderr
|
||||
* The default is 1. Setting the facility
|
||||
* causes a close and an open of syslog().
|
||||
* priority - integer. Syslog() requires a priority as
|
||||
* part of all log messages. This specifies
|
||||
* the priority to use when sending rta debug
|
||||
* messages. Changes to this do not take
|
||||
* effect until dbg_target is updated.
|
||||
* 0: LOG_EMERG
|
||||
* 1: LOG_ALERT
|
||||
* 2: LOG_CRIT
|
||||
* 3: LOG_ERR
|
||||
* 4: LOG_WARNING
|
||||
* 5: LOG_NOTICE
|
||||
* 6: LOG_INFO
|
||||
* 7: DEBUG
|
||||
* Default is 3.
|
||||
* facility - integer. Syslog() requires a facility as
|
||||
* part of all log messages. This specifies
|
||||
* the facility to use when sending rta debug
|
||||
* messages. It is best to use the defines in
|
||||
* .../sys/syslog.h to set this. The default
|
||||
* is LOG_USER. Changes to this do not take
|
||||
* effect until dbg_target is updated.
|
||||
* ident - string. Syslog() requires an 'ident' string as
|
||||
* part of all log messages. This specifies
|
||||
* the ident string to use when sending rta debug
|
||||
* messages. This is normally set to the process
|
||||
* or command name. The default is "rta". Changes
|
||||
* to this do not take effect until dbg_target
|
||||
* is updated. This can be at most MXDBGIDENT
|
||||
* characters in length.
|
||||
*
|
||||
* The rta_stat table contains usage and error statistics
|
||||
* which might be of interest to developers. All fields are
|
||||
* of type long, are read-only, and are set to zero by
|
||||
* rta_init(). The columns of rta_stats are:
|
||||
* nsyserr - count of failed OS calls.
|
||||
* nrtaerr - count of internal rta failures.
|
||||
* nsqlerr - count of SQL failures.
|
||||
* nauth - count of authorizations. (==#connections)
|
||||
* nupdate - count of UPDATE or file write requests
|
||||
* nselect - count of SELECT or file read requests
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - List of all messages
|
||||
* There are two types of error messages available in the
|
||||
* rta package. The first type is the error messages returned
|
||||
* as part of an SQL request. The messages of this type are:
|
||||
*
|
||||
* 1) "ERROR: Relation '%s' does not exist"
|
||||
* This reply indicates that a table requested in a SELECT
|
||||
* UPDATE, or where clause does not exist. The %s is
|
||||
* replaced by the name of the requested table.
|
||||
* 2) "ERROR: Attribute '%s' not found\n"
|
||||
* This reply indicates that a column requested in a SELECT
|
||||
* UPDATE, or where clause does not exist. The %s is
|
||||
* replaced by the name of the requested column.
|
||||
* 3) "ERROR: SQL parse error"
|
||||
* This reply indicates a mal-formed SQL request or a
|
||||
* mis-match in the types of data in a where clause or in
|
||||
* an update list.
|
||||
* 4) "ERROR: Output buffer full"
|
||||
* This reply indicates that the size of the response to
|
||||
* a request exceeds the size of the output buffer. See
|
||||
* dbcommand() and the 'out' and 'nout' parameters. This
|
||||
* error can be avoided with a large enough output buffer
|
||||
* or, preferably, with the use of LIMIT and OFFSET.
|
||||
* 5) "ERROR: String too long for '%s'
|
||||
* This reply indicates that an update to a column of type
|
||||
* string or pointer to string would have exceeded the
|
||||
* width of the column. The %s is replaced by the column
|
||||
* name.
|
||||
* 6) "ERROR: Can not update read-only column '%s'
|
||||
* This reply indicates that an attempt to update a column
|
||||
* marked as read-only. The %s is replaced by the column
|
||||
* name.
|
||||
*
|
||||
* The other type of error messages are internal debug
|
||||
* messages. Debug messages are logged using the standard
|
||||
* syslog() facility available on all Linux systems. The
|
||||
* default syslog "facility" used is LOG_USER but this can be
|
||||
* changed by setting 'facility' in the rta_dbg table.
|
||||
* You are welcome to modify syslogd in order to do post
|
||||
* processing such as generating SNMP traps off these debug
|
||||
* messages. All error messages of this type are send to
|
||||
* syslog() as: "egp[PID]: FILE LINE#: error_message",
|
||||
* where PID, FILE, and LINE# are replaced by the process ID,
|
||||
* the source file name, and the line number where the error
|
||||
* was detected.
|
||||
* Following are the defines used to generate these debug
|
||||
* and error messages. The "%s %d" at the start of each
|
||||
* error string is replaced by the file name and line number
|
||||
* where the error is detected. */
|
||||
|
||||
/** "System" errors */
|
||||
#define Er_No_Mem "%s %d: Can not allocate memory\n"
|
||||
#define Er_No_Save "%s %d: Table save failure. Can not open %s\n"
|
||||
#define Er_No_Load "%s %d: Table load failure. Can not open %s\n"
|
||||
|
||||
/** "RTA" errors */
|
||||
#define Er_Max_Tbls "%s %d: Too many tables in DB\n"
|
||||
#define Er_Max_Cols "%s %d: Too many columns in DB\n"
|
||||
#define Er_Tname_Big "%s %d: Too many characters in table name: %s\n"
|
||||
#define Er_Cname_Big "%s %d: Too many characters in column name: %s\n"
|
||||
#define Er_Hname_Big "%s %d: Too many characters in help text: %s\n"
|
||||
#define Er_Tbl_Dup "%s %d: DB already has table named: %s\n"
|
||||
#define Er_Col_Dup "%s %d: Table already has column named: %s\n"
|
||||
#define Er_Col_Type "%s %d: Column contains an unknown data type: %s\n"
|
||||
#define Er_Col_Flag "%s %d: Column contains unknown flag data: %s\n"
|
||||
#define Er_Cmd_Cols "%s %d: Too many columns in table: %s\n"
|
||||
#define Er_No_Space "%s %d: Not enough buffer space\n"
|
||||
|
||||
/** "SQL" errors */
|
||||
#define Er_Bad_SQL "%s %d: SQL parse error: %s\n"
|
||||
#define Er_Readonly "%s %d: Attempt to update readonly column: %s\n"
|
||||
#define Er_BadPass "%s %d: Bad Username/Password\n"
|
||||
/** "Trace" messages */
|
||||
#define Er_Trace_SQL "%s %d: SQL command: %s (%s)\n"
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/** ************************************************************
|
||||
* - How to write callback routines
|
||||
* As mentioned above, read callbacks are executed before a
|
||||
* column value is used and write callbacks are called after all
|
||||
* columns have been updated. Both read and write callbacks
|
||||
* return nothing (are of type void) and have the same calling
|
||||
* parameters:
|
||||
* - char *tblname: the name of the table referenced
|
||||
* - char *colname: the name of the column referenced
|
||||
* - char *sqlcmd: the text of the SQL command
|
||||
* - int rowid: the zero-indexed row number of the row
|
||||
* being read or written
|
||||
*
|
||||
* Read callbacks are particularly useful to compute things
|
||||
* like sums and averages; things that aren't worth the effort
|
||||
* compute continuously if it's possible to compute it just
|
||||
* when it is used.
|
||||
* Write callbacks can form the real engine driving the
|
||||
* application. These are most applicable when tied to
|
||||
* configuration changes. Write callbacks are also a useful
|
||||
* place to log configuration changes.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* - Future enhancements:
|
||||
* Several enhancements are possible for the rta package:
|
||||
* - printf format string in the column definition
|
||||
* - ability to register more than one trigger per column
|
||||
* - secure login maintaining Postgres compatibility
|
||||
* - IPC and support for shared tables in shared memory
|
||||
* - specify pre or post for the write callback
|
||||
* - table save callback (to save file to flash?)
|
||||
* - execution times for table access, update
|
||||
* - count(*) function
|
||||
* - model output buffer mgmt on zlib to allow output streams
|
||||
* - add a column data type of "table" to allow nested tables
|
||||
* - add internationalization support
|
||||
**************************************************************/
|
||||
|
||||
#endif
|
|
@ -1,141 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="rta"
|
||||
ProjectGUID="{C41CD6E3-30A4-4BB9-BA51-F97B2CD77D56}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../include;../pcre;../adnswin32;../curl;../keeper"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;NEOSTATSCORE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="../rtad.lib"
|
||||
IgnoreAllDefaultLibraries="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../include;../pcre;../adnswin32;../curl;../keeper"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;NEOSTATSCORE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="../rta.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\api.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\do_sql.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\parse.tab.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rtatables.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\token.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\do_sql.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\parse.tab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rta.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,881 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* Overview:
|
||||
* The "rta" package provides a Postgres-like API into our
|
||||
* system tables and variables. We need to describe each of our
|
||||
* tables as if it were a data base table. We describe each
|
||||
* table in general in an array of TBLDEF structures with one
|
||||
* structure per table, and each column of each table in an
|
||||
* array of COLDEF strustures with one COLDEF structure per
|
||||
* column.
|
||||
**************************************************************/
|
||||
|
||||
#include <stdio.h> /* for printf prototypes */
|
||||
#include <stddef.h> /* for 'offsetof' */
|
||||
#ifdef WIN32
|
||||
#define LOG_ERR 3
|
||||
#define LOG_USER 1 << 3
|
||||
#define PATH_MAX 4095
|
||||
#else
|
||||
#include <syslog.h> /* for LOG_ERR, LOG_USER */
|
||||
#endif
|
||||
#include <string.h> /* for strncmp prototypes */
|
||||
#include <time.h>
|
||||
#include "rta.h" /* for TBLDEF and COLDEF */
|
||||
#include "do_sql.h" /* for struct Sql_Cmd */
|
||||
|
||||
/* Forward reference for read callbacks */
|
||||
void *spoof_user(void *, char *, char *, void *);
|
||||
void *compute_time(void *, char *col, char *sql, void *);
|
||||
|
||||
/***************************************************************
|
||||
* One of the tables we need to maintain compatibility with the
|
||||
* various Postgres front-ends is 'pg_user'. So here we define
|
||||
* a pg_user data structure, allocate a 1 row table for users,
|
||||
* define the table using COLDEF and TBLDEF, and give a read
|
||||
* callback which makes the first table entry look like whoever
|
||||
* appears in the WHERE clause. So a query like ....
|
||||
* SELECT usesuper FROM pg_user WHERE usename = "Any Name"
|
||||
* will always return 'f' regardless of the usename requested.
|
||||
* This is also a resonable demonstration of a read callback.
|
||||
* (Clearly this defeats the security model of Postgres. If you
|
||||
* _want_ to use a real pg_user table you can remove the read
|
||||
* callback, allocate more rows, and save the data to disk.)
|
||||
**************************************************************/
|
||||
|
||||
#define MX_PGNAMELEN (32)
|
||||
#define FT_LEN (2)
|
||||
|
||||
/* Define the structure */
|
||||
struct Pg_User
|
||||
{
|
||||
char usename[MX_PGNAMELEN]; /* user name */
|
||||
int usesysid; /* user ID */
|
||||
char usecreatedb[FT_LEN]; /* creat DB */
|
||||
char usetrace[FT_LEN]; /* trace execution */
|
||||
char usesuper[FT_LEN]; /* super user */
|
||||
char usecatupd[FT_LEN];
|
||||
char passwd[MX_PGNAMELEN]; /* the password */
|
||||
char valuntil[MX_PGNAMELEN]; /* valid until .... */
|
||||
};
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct Pg_User pg_user[] = {
|
||||
{
|
||||
"master", /* user name */
|
||||
100, /* user ID */
|
||||
"f", /* creat DB */
|
||||
"f", /* trace execution */
|
||||
"f", /* super user */
|
||||
"f",
|
||||
"password", /* the password */
|
||||
"" /* valid until .... */
|
||||
}
|
||||
};
|
||||
|
||||
void rta_change_auth(char *uname, char *pass) {
|
||||
strncpy(pg_user[0].usename, uname, MX_PGNAMELEN);
|
||||
strncpy(pg_user[0].passwd, pass, MX_PGNAMELEN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF pg_userCols[] = {
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usename", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usename), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the Postgres user. We overwrite this column "
|
||||
"with whatever string is in the WHERE clause. In this way "
|
||||
"there is always a match when looking up a user name in the "
|
||||
"DB"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usesysid", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usesysid), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The user ID of the user. Currently fixed at 100."},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usecreatedb", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usecreatedb), /* offset from strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user can "
|
||||
"create new data bases. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usetrace", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usetrace), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user can "
|
||||
"use the trace capability. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usesuper", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usesuper), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f') to indicate whether the user has "
|
||||
"super-user capability. Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"usecatupd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
FT_LEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, usecatupd), /* offset from strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Bool flag ('t' or 'f'). Always 'f' in our system,"},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"passwd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, passwd), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The encrypted password of the user. Not implemented in "
|
||||
"the current system."},
|
||||
{
|
||||
"pg_user", /* table name */
|
||||
"valuntil", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MX_PGNAMELEN, /* #bytes in col data */
|
||||
offsetof(struct Pg_User, valuntil), /* offset from col strt */
|
||||
0, /* =1 to save on disk */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The expiration date of the password. Not implemented in "
|
||||
"the current system."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF pg_userTable = {
|
||||
"pg_user", /* table name */
|
||||
(void *) pg_user, /* address of table */
|
||||
sizeof(struct Pg_User), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
pg_userCols, /* Column definitions */
|
||||
sizeof(pg_userCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The table of Postgres users. We spoof this table so that "
|
||||
"any user name in a WHERE clause appears in the table as a "
|
||||
"legitimate user with no super, createDB, trace or catupd "
|
||||
"capability."
|
||||
};
|
||||
|
||||
/* spoof_user(): - Routine to copy user name from WHERE clause
|
||||
* to 'usename' in order to spoof the system into accepting
|
||||
* any user name as a valid user. We normally expect a command
|
||||
* of the form:
|
||||
* SELECT usesuper FROM gp_user WHERE usename = 'XXXXXXX'
|
||||
* What we want to do is to copy XXXXXX into the usename
|
||||
* field so there is always a match. We do some basic checks
|
||||
* to be sure the command is of the above form.
|
||||
*
|
||||
* Input: Name of the table
|
||||
* Name of the column
|
||||
* Text of the SQL command itself
|
||||
* Index of row used (zero indexed)
|
||||
* Output:
|
||||
* Effects: Copies user name to 'usename' field
|
||||
***************************************************************/
|
||||
void *
|
||||
spoof_user(void *tblname, char *colname, char *sqlcmd, void *rowid)
|
||||
{
|
||||
extern struct Sql_Cmd cmd;
|
||||
|
||||
/* Verify that the column of interest is 'usename'. Verify that there
|
||||
is one WHERE clause. Verify that the WHERE relation is equality. */
|
||||
if ((strcmp(colname, "usename")) ||
|
||||
(cmd.nwhrcols != 1) || (cmd.whrrel[0] != RTA_EQ))
|
||||
return NULL;
|
||||
|
||||
/* It seems OK. Copy the WHERE string */
|
||||
// strncpy(pg_user[0].usename, cmd.whrvals[0], MX_PGNAMELEN);
|
||||
strncpy(pg_user[0].usename, "harhar", MX_PGNAMELEN);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
* One of the tables we want to present to the UI is the table
|
||||
* of UI connections. It is defined in app.h as ....
|
||||
* typedef struct {
|
||||
int fd; // FD of TCP conn (=-1 if not in use)
|
||||
int cmdindx; // Index of next location in cmd buffer
|
||||
char cmd[MXCMD]; // SQL command from UI program
|
||||
int rspfree; // Number of free bytes in rsp buffer
|
||||
char rsp[MXRSP]; // SQL response to the UI program
|
||||
int o_port; // Other-end TCP port number
|
||||
int o_ip; // Other-end IP address
|
||||
long long nbytin; // number of bytes read in
|
||||
long long nbytout; // number of bytes sent out
|
||||
int ctm; // connect time (==time();)
|
||||
int cdur; // duration time (== now()-ctm;)
|
||||
* } UI;
|
||||
* The following array of COLDEF describes this structure with
|
||||
* one COLDEF for each element in the UI strucure.
|
||||
**************************************************************/
|
||||
COLDEF PG_ConnCols[] = {
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"id", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, id), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"int ID of the connection"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"username", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
33, /* #bytes in col data */
|
||||
offsetof(EpgConn, username), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"the Username"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"cmd", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
1000, /* #bytes in col data */
|
||||
offsetof(EpgConn, cmd), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Input command from the user interface program. This"
|
||||
" is an SQL command which is executed against the data"
|
||||
" in the application."},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"rspfree", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, rspfree), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Index of the next free byte in the response string, rsp"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"rsp", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
50, /* first 50 bytes of response field */
|
||||
offsetof(EpgConn, rsp), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Response back to the calling program. This is used to"
|
||||
" store the result so that the write() does not need to"
|
||||
" block"},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"ctm", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, ctm), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Connect TiMe. The unix style time() when the connection"
|
||||
" was established. This is used to decide which connection"
|
||||
" to drop when the connection table is full and a new UI"
|
||||
" connection request arrives."},
|
||||
{
|
||||
"pg_conn", /* table name */
|
||||
"cdur", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(EpgConn, cdur), /* offset from col start */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
compute_time, /* called before read */
|
||||
NULL, /* called after write */
|
||||
"Connect DURation. The number of seconds the connection"
|
||||
" has been open. A read callback computes this each time"
|
||||
" the value is used."},
|
||||
};
|
||||
|
||||
void *
|
||||
compute_time(void *tbl, char *col, char *sql, void *rowid)
|
||||
{
|
||||
EpgConn *data = rowid;
|
||||
|
||||
data->cdur = time(NULL) - data->ctm;
|
||||
return &data->cdur;
|
||||
}
|
||||
|
||||
TBLDEF pg_connTable = {
|
||||
"pg_conn", /* table name */
|
||||
0, /* address of table */
|
||||
0, /* length of each row */
|
||||
0, /* # rows in table */
|
||||
TBL_LIST,
|
||||
PG_ConnCols, /* Column definitions */
|
||||
sizeof(PG_ConnCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Data about connections from frontend programs"
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* We define a table which contains the column definitions of
|
||||
* all columns in the system. This is a pseudo table in that
|
||||
* there is not an array of structures like other tables.
|
||||
* Instead, pointers to each column definition is placed in a
|
||||
* table. This table requires special handling in do_sql.c.
|
||||
* The table definition for "rta_columns" must appear as the
|
||||
* second entry in the array of table definition pointers.
|
||||
**************************************************************/
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_columnsCols[] = {
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"table", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXTBLNAME, /* #bytes in col data */
|
||||
offsetof(COLDEF, table), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the table that this column belongs to."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"name", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXCOLNAME, /* #bytes in col data */
|
||||
offsetof(COLDEF, name), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the column. Must be unique within a table "
|
||||
"definition but may be replicated in other tables. The "
|
||||
"maximum string length of the column name is set by "
|
||||
"MXCOLNAME defined in the rta.h file."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"type", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, type), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The data type of the column. Types include string, "
|
||||
"integer, long, pointer, pointer to string, pointer to "
|
||||
"integer, and pointer to long. See rta.h for more details."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"length", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, length), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The length of the string in bytes if the column data "
|
||||
"type is a string or a pointer to a string."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"offset", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, offset), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of bytes from the start of the structure "
|
||||
"to the member element defined in this entry. Be careful "
|
||||
"in setting the offset with non word-aligned elements like "
|
||||
"single characters. If you do no use offsetof() consider "
|
||||
"using -fpack-struct"},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"flags", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(COLDEF, flags), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Flags associated with the column include flags to indicate "
|
||||
"read-only status and whether or not the data should be "
|
||||
"included in the save file. See rta.h for the associated "
|
||||
"defines and details."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"readcb", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, readcb), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to a function that returns an integer. If "
|
||||
"defined, the function is called before the column is "
|
||||
"read. This function is useful to compute values only "
|
||||
"when needed."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"writecb", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(COLDEF, writecb), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to a function that returns and integer. If "
|
||||
"defined, the function is called after an UPDATE command "
|
||||
"modifies the column. All columns in an UPDATE are "
|
||||
"modified before any write callbacks are executed. This "
|
||||
"function is useful to effect changes requested or implied "
|
||||
"by the column definition."},
|
||||
{
|
||||
"rta_columns", /* table name */
|
||||
"help", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXHELPSTR, /* #bytes in col data */
|
||||
offsetof(COLDEF, help), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A brief description of the column. Should include "
|
||||
"limits, default value, and a description of how to set "
|
||||
"it. Can contain at most MXHELPSTR characters."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_columnsTable = {
|
||||
"rta_columns", /* table name */
|
||||
(void *) 0, /* address of table */
|
||||
sizeof(COLDEF), /* length of each row */
|
||||
0, /* incremented as tables are added */
|
||||
TBL_ARRAY,
|
||||
rta_columnsCols, /* Column definitions */
|
||||
sizeof(rta_columnsCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The list of all columns in all tables along with their "
|
||||
"attributes."
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* We define a table which contains the table definition of all
|
||||
* tables in the system. This is a pseudo table in that there
|
||||
* is not an array of structures like other tables. Use of this
|
||||
* table requires special handling in do_sql.
|
||||
**************************************************************/
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_tablesCols[] = {
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"name", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXTBLNAME, /* #bytes in col data */
|
||||
offsetof(TBLDEF, name), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the table. This must be unique in the system. "
|
||||
" Table names can be at most MXTBLNAME characters in length."
|
||||
" See rta.h for details. Note that some table names are "
|
||||
"reserved for internal use."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"address", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(TBLDEF, address), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The start address of the array of structs that makes up "
|
||||
"the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"tabletype", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, tabletype), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The type of table this is"},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"rowlen", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, rowlen), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The length of each struct in the array of structs that "
|
||||
"makes up the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"nrows", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, nrows), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of rows in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"cols", /* column name */
|
||||
RTA_PTR, /* type of data */
|
||||
sizeof(void *), /* #bytes in col data */
|
||||
offsetof(TBLDEF, cols), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A pointer to an array of COLDEF structures. There is one "
|
||||
"COLDEF for each column in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"ncol", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(TBLDEF, ncol), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The number of columns in the table."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"savefile", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXFILENAME, /* #bytes in col data */
|
||||
offsetof(TBLDEF, savefile), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The name of the file with the non-volatile contents of "
|
||||
"the table. This file is read when the table is "
|
||||
"initialized and is written any time a column with the "
|
||||
"non-volatile flag set is modified."},
|
||||
{
|
||||
"rta_tables", /* table name */
|
||||
"help", /* column name */
|
||||
RTA_PSTR, /* type of data */
|
||||
MXHELPSTR, /* #bytes in col data */
|
||||
offsetof(TBLDEF, help), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A description of the table."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_tablesTable = {
|
||||
"rta_tables", /* table name */
|
||||
(void *) 0, /* address of table */
|
||||
sizeof(TBLDEF), /* length of each row */
|
||||
0, /* It's a pseudo table */
|
||||
TBL_ARRAY,
|
||||
rta_tablesCols, /* Column definitions */
|
||||
sizeof(rta_tablesCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"The table of all tables in the system. This is a pseudo "
|
||||
"table and not an array of structures like other tables."
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* The rta_dbg table controls which errors generate
|
||||
* debug log messages, the priority, and the facility of the
|
||||
* syslog() messages sent. The rta package generates no user
|
||||
* level log * messages, only debug messages. All of the fields
|
||||
* in this table are volatile. You will need to set the values
|
||||
* in your main program to make them seem persistent.
|
||||
* (Try something like
|
||||
* "SQL_string("UPDATE rta_dbgconfig SET dbg ....").)
|
||||
* A callback attached to dbg_facility causes a close/reopen of
|
||||
* syslog().
|
||||
**************************************************************/
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct EpgDbg rtadbg = {
|
||||
1, /* log system errors */
|
||||
1, /* log rta errors */
|
||||
1, /* log SQL errors */
|
||||
0, /* no log of SQL cmds */
|
||||
0, /* log to syslog() only */
|
||||
LOG_ERR, /* see sys/syslog.h */
|
||||
LOG_USER, /* see sys/syslog.h */
|
||||
"rta" /* see 'man openlog' */
|
||||
};
|
||||
#ifdef SHWDBGTBL
|
||||
/* Define the table columns */
|
||||
COLDEF rta_dbgCols[] = {
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"syserr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, syserr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all system "
|
||||
"errors such as failed malloc() or save file read failures."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"rtaerr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, rtaerr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all errors "
|
||||
"internal to the rta package."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"sqlerr", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, sqlerr), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes a call to syslog() for all SQL "
|
||||
"errors. Such errors usually indicate a programming error "
|
||||
"in one of the user interface programs."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"trace", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, trace), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"A non-zero value causes all SQL commands to be logged. "
|
||||
"If the command is UPDATE, the number of rows affected is "
|
||||
"also logged."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"target", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, target), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
restart_syslog, /* called after write */
|
||||
"Sets destination of log messages. Zero turns off all "
|
||||
"logging of errors. One sends log messages to syslog()."
|
||||
" Two sends log messages to stderr. Three sends error "
|
||||
"messages to both syslog() and to stderr. Default is one."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"priority", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, priority), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() priority. Please see .../sys/syslog.h for "
|
||||
"the possible values. Default is LOG_ERR."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"facility", /* column name */
|
||||
RTA_INT, /* type of data */
|
||||
sizeof(int), /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, facility), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() facility. Please see .../sys/syslog.h for "
|
||||
"the possible values. Default is LOG_USER."},
|
||||
{
|
||||
"rta_dbg", /* table name */
|
||||
"ident", /* column name */
|
||||
RTA_STR, /* type of data */
|
||||
MXDBGIDENT, /* #bytes in col data */
|
||||
offsetof(struct EpgDbg, ident), /* offset 2 col strt */
|
||||
0, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"The syslog() 'ident'. Please see 'man openlog' for "
|
||||
"details. Default is 'rta'. An update of the target "
|
||||
"field is required for this to take effect."},
|
||||
};
|
||||
|
||||
/***************************************************************
|
||||
* restart_syslog(): - Routine to restart or reconfigure the
|
||||
* logging facility. Syslog is always closed and (if enabled)
|
||||
* reopened with the priority and facility sepcified in the
|
||||
* rtadbg structure.
|
||||
*
|
||||
* Input: Name of the table
|
||||
* Name of the column
|
||||
* Text of the SQL command itself
|
||||
* Index of row used (zero indexed)
|
||||
* Output:
|
||||
* Effects: Copies user name to 'usename' field
|
||||
**************************************************************/
|
||||
void
|
||||
restart_syslog(char *tblname, char *colname, char *sqlcmd, int rowid)
|
||||
{
|
||||
extern struct EpgDbg rtadbg;
|
||||
|
||||
closelog();
|
||||
|
||||
if (rtadbg.target == 1 || rtadbg.target == 3)
|
||||
{
|
||||
openlog(rtadbg.ident, LOG_ODELAY | LOG_PID, rtadbg.facility);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_dbgTable = {
|
||||
"rta_dbg", /* table name */
|
||||
(void *) &rtadbg, /* address of table */
|
||||
sizeof(struct EpgDbg), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
rta_dbgCols, /* Column definitions */
|
||||
sizeof(rta_dbgCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Configure of debug logging. A callback on the 'target' "
|
||||
"field closes and reopens syslog(). None of the values "
|
||||
"in this table are saved to disk. If you want non-default "
|
||||
"values you need to change the rta source or do an "
|
||||
"SQL_string() to set the values when you initialize your "
|
||||
"program."
|
||||
};
|
||||
#endif
|
||||
/***************************************************************
|
||||
* The rta_stats table contains usage and error statistics
|
||||
* which might be of interest to developers. All fields are
|
||||
* of type long, are read-only, and are set to zero by
|
||||
* rta_init().
|
||||
**************************************************************/
|
||||
|
||||
/* Allocate and initialize the table */
|
||||
struct EpgStat rtastat = {
|
||||
(long long) 0, /* count of failed OS calls. */
|
||||
(long long) 0, /* count of internal rta failures. */
|
||||
(long long) 0, /* count of SQL failures. */
|
||||
(long long) 0, /* count of authorizations. */
|
||||
(long long) 0, /* count of UPDATE requests */
|
||||
(long long) 0, /* count of SELECT requests */
|
||||
};
|
||||
|
||||
/* Define the table columns */
|
||||
COLDEF rta_statCols[] = {
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nsyserr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nsyserr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of failed OS calls."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nrtaerr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nrtaerr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of internal rta failures."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nsqlerr", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nsqlerr), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of SQL failures."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nauth", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nauth), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of DB authorizations. This is a good estimate "
|
||||
"to the total number of connections."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nselect", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nselect), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of SELECT commands."},
|
||||
{
|
||||
"rta_stat", /* table name */
|
||||
"nupdate", /* column name */
|
||||
RTA_LONG, /* type of data */
|
||||
sizeof(long long), /* #bytes in col data */
|
||||
offsetof(struct EpgStat, nupdate), /* offset 2 col strt */
|
||||
RTA_READONLY, /* Flags for read-only/disksave */
|
||||
NULL, /* called before read */
|
||||
(void (*)()) 0, /* called after write */
|
||||
"Count of UPDATE commands."},
|
||||
};
|
||||
|
||||
/* Define the table */
|
||||
TBLDEF rta_statTable = {
|
||||
"rta_stat", /* table name */
|
||||
(void *) &rtastat, /* address of table */
|
||||
sizeof(struct EpgStat), /* length of each row */
|
||||
1, /* # rows in table */
|
||||
TBL_ARRAY,
|
||||
rta_statCols, /* Column definitions */
|
||||
sizeof(rta_statCols) / sizeof(COLDEF), /* # columns */
|
||||
"", /* save file name */
|
||||
"Usage and error counts for the rta package."
|
||||
};
|
||||
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,219 +0,0 @@
|
|||
/***************************************************************
|
||||
* Run Time Access
|
||||
* Copyright (C) 2003 Robert W Smith (bsmith@linuxtoys.org)
|
||||
*
|
||||
* This program is distributed under the terms of the GNU LGPL.
|
||||
* See the file COPYING file.
|
||||
**************************************************************/
|
||||
|
||||
/***************************************************************
|
||||
* token.l -- Lex tokenizer for SQL commands.
|
||||
**************************************************************/
|
||||
%option noyywrap
|
||||
%option never-interactive
|
||||
|
||||
%{
|
||||
#define __USE_GNU
|
||||
#include <string.h>
|
||||
#include "do_sql.h"
|
||||
#include "parse.tab.h"
|
||||
#include "config.h"
|
||||
#ifndef HAVE_STRNDUP
|
||||
#include "support.h"
|
||||
#endif
|
||||
|
||||
void dosql_init();
|
||||
extern int yylval;
|
||||
extern int yydebug;
|
||||
extern struct Sql_Cmd cmd;
|
||||
extern char *parsestr[];
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
[Aa][Nn][Dd] { return(AND); }
|
||||
[Ff][Rr][Oo][Mm] { return(FROM); }
|
||||
[Ll][Ii][Mm][Ii][Tt] { return(LIMIT); }
|
||||
[Oo][Ff][Ff][Ss][Ee][Tt] { return(OFFSET); }
|
||||
[Ss][Ee][Ll][Ee][Cc][Tt] { return(SELECT); }
|
||||
[Ss][Ee][Tt] { return(SET); }
|
||||
[Uu][Pp][Dd][Aa][Tt][Ee] { return(UPDATE); }
|
||||
[Ww][Hh][Ee][Rr][Ee] { return(WHERE); }
|
||||
[Bb][Ee][Gg][Ii][Nn] { return(SQLBEGIN); }
|
||||
[Cc][Oo][Mm][Mm][Ii][Tt] { return(SQLCOMMIT); }
|
||||
|
||||
\"[A-Za-z][_A-Za-z0-9 \t]*\" |
|
||||
\'[A-Za-z][_A-Za-z0-9 \t]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(NAME);
|
||||
}
|
||||
\* |
|
||||
[A-Za-z][_A-Za-z0-9]* {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(NAME);
|
||||
}
|
||||
|
||||
\"-?[0-9]+\" |
|
||||
\'-?[0-9]+\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(INTEGER);
|
||||
}
|
||||
-?[0-9]+ {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(INTEGER);
|
||||
}
|
||||
\"-?[0-9]+\.[0-9]*\" |
|
||||
\'-?[0-9]+\.[0-9]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(REALNUM);
|
||||
}
|
||||
-?[0-9]+\.[0-9]* {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strdup(yytext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(REALNUM);
|
||||
}
|
||||
|
||||
= { return(EQ); }
|
||||
\!= { return(NE); }
|
||||
\> { return(GT); }
|
||||
\< { return(LT); }
|
||||
\>= { return(GE); }
|
||||
\<= { return(LE); }
|
||||
|
||||
\, { return((int)','); }
|
||||
\( { return((int)'('); }
|
||||
\) { return((int)')'); }
|
||||
\; { return((int)';'); }
|
||||
\. { return((int)'.'); }
|
||||
|
||||
\"[A-Za-z0-9 \t!@#$%^&*()_+-={}|;:<>?~`\[\]'\\]*\" |
|
||||
\'[A-Za-z0-9 \t!@#$%^&*()_+-={}|;:<>?~`\[\]"\\]*\' {
|
||||
int i;
|
||||
for (i=0; i<MXPARSESTR; i++) {
|
||||
if (parsestr[i] == (char *) NULL) {
|
||||
parsestr[i] = strndup(&yytext[1], yyleng-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yylval = i;
|
||||
return(STRING);
|
||||
}
|
||||
[ \t\n]+ { }
|
||||
|
||||
%%
|
||||
|
||||
|
||||
void SQL_string(char *s, char *out, int *nout)
|
||||
{
|
||||
extern int yyparse();
|
||||
YY_BUFFER_STATE x;
|
||||
|
||||
dosql_init();
|
||||
cmd.out = out;
|
||||
cmd.nout = nout;
|
||||
cmd.sqlcmd = s;
|
||||
|
||||
/* We need to store the start addr of the buffer in case we
|
||||
* we need to send an error message after we've started
|
||||
* sending a reply. */
|
||||
cmd.errout = out;
|
||||
cmd.nerrout = *nout;
|
||||
cmd.nlineout = 0;
|
||||
|
||||
x = yy_scan_string(s);
|
||||
|
||||
while(yyparse() == 0) {
|
||||
/* At this point we have parsed the command. */
|
||||
/* If no errors were detected, we can continue processing */
|
||||
if (!cmd.err) {
|
||||
/* everything is set. do the command */
|
||||
do_sql(&out[cmd.nerrout - *nout], nout);
|
||||
}
|
||||
else {
|
||||
yy_delete_buffer(x);
|
||||
return;
|
||||
}
|
||||
dosql_init(); /* free memory and re-init the cmd structure */
|
||||
}
|
||||
/* We are done processing the command and have assembled response */
|
||||
/* Tell the other end that we are ready for a new command. */
|
||||
out[cmd.nerrout - *nout] = 'Z'; /* Ready */
|
||||
(*nout)--;
|
||||
yy_delete_buffer(x);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef xxxx
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("N-out = %d\n", *cmd.nout);
|
||||
printf("Scanning ---%s---\n", s);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Limit = %d\n", cmd.limit);
|
||||
printf("Offset = %d\n", cmd.offset);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Command = %d\n", cmd.command);
|
||||
for (i=0; i<cmd.ncols; i++)
|
||||
printf(" %s %s\n",cmd.cols[i],cmd.updvals[i]);
|
||||
printf("Table = %s\n", cmd.tbl);
|
||||
for (i=0; i<cmd.nwhrcols; i++)
|
||||
printf(" %s %d %s\n",cmd.whrcols[i],
|
||||
cmd.whrrel[i], cmd.whrvals[i]);
|
||||
printf("Limit = %d\n", cmd.limit);
|
||||
printf("Offset = %d\n", cmd.offset);
|
||||
printf("N-out = %d\n", *cmd.nout);
|
||||
printf("Error = %d\n", cmd.err);
|
||||
#endif
|
||||
#endif
|
1
graveyard/modules/loveserv/.indent.pro
vendored
1
graveyard/modules/loveserv/.indent.pro
vendored
|
@ -1 +0,0 @@
|
|||
-br -ce -ts8 -kr -i8 -ut -v
|
|
@ -1,5 +0,0 @@
|
|||
pkglib_LTLIBRARIES = loveserv.la
|
||||
loveserv_la_SOURCES = loveserv.c loveserv.h ls_help.c
|
||||
loveserv_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/adns/
|
||||
include $(top_srcdir)/autotools/rules.mk
|
|
@ -1,583 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SOURCES = $(loveserv_la_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/autotools/rules.mk TODO
|
||||
subdir = modules/loveserv
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/autotools/acinclude.m4 \
|
||||
$(top_srcdir)/autotools/ax_maintainer_mode_auto_silent.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_curl.m4 \
|
||||
$(top_srcdir)/autotools/ax_path_lib_pcre.m4 \
|
||||
$(top_srcdir)/autotools/ccdv.m4 \
|
||||
$(top_srcdir)/autotools/libevent.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/autotools/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h \
|
||||
$(top_builddir)/lib/gdbm/autoconf.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(pkglibdir)"
|
||||
pkglibLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(pkglib_LTLIBRARIES)
|
||||
loveserv_la_LIBADD =
|
||||
am_loveserv_la_OBJECTS = loveserv.lo ls_help.lo
|
||||
loveserv_la_OBJECTS = $(am_loveserv_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/lib/gdbm
|
||||
depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
SOURCES = $(loveserv_la_SOURCES)
|
||||
DIST_SOURCES = $(loveserv_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkglibdir = $(prefix)/modules
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_CURL_FALSE = @BUILD_CURL_FALSE@
|
||||
BUILD_CURL_TRUE = @BUILD_CURL_TRUE@
|
||||
BUILD_PCRE_FALSE = @BUILD_PCRE_FALSE@
|
||||
BUILD_PCRE_TRUE = @BUILD_PCRE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CCDV = @CCDV@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CFLAGS = @CURL_CFLAGS@
|
||||
CURL_LIBS = @CURL_LIBS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EVNTLIBOBJS = @EVNTLIBOBJS@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBDB = @LIBDB@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MODULES = @MODULES@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PCRE_CFLAGS = @PCRE_CFLAGS@
|
||||
PCRE_LIBS = @PCRE_LIBS@
|
||||
POW_LIB = @POW_LIB@
|
||||
PROTOCOL = @PROTOCOL@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USECCDV = @USECCDV@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = $(prefix)/data
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
wi_PWD = @wi_PWD@
|
||||
pkglib_LTLIBRARIES = loveserv.la
|
||||
loveserv_la_SOURCES = loveserv.c loveserv.h ls_help.c
|
||||
loveserv_la_LDFLAGS = -module -avoid-version -no-undefined
|
||||
AM_CFLAGS = @PCRE_CFLAGS@ @CURL_CFLAGS@ -I$(top_srcdir)/lib/keeper/ -I$(top_srcdir)/lib/adns/
|
||||
LINK = $(LIBTOOL) --tag=CXX --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/autotools/rules.mk $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/loveserv/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu modules/loveserv/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
uninstall-pkglibLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-pkglibLTLIBRARIES:
|
||||
-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
|
||||
@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
loveserv.la: $(loveserv_la_OBJECTS) $(loveserv_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(pkglibdir) $(loveserv_la_LDFLAGS) $(loveserv_la_OBJECTS) $(loveserv_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loveserv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls_help.Plo@am__quote@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(mkdir_p) $(distdir)/../../autotools
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkglibdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-pkglibLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-pkglibLTLIBRARIES install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-pkglibLTLIBRARIES
|
||||
|
||||
|
||||
.c.o:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
|
||||
.c.lo:
|
||||
@USECCDV@ @echo "Building $@"
|
||||
@am__fastdepCC_TRUE@ @if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ @source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
|
||||
@list='ls .libs/*.so'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
$(CCDV) $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-dist_dataDATA: $(dist_data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
|
||||
@list='$(dist_data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-dist_docDATA: $(dist_doc_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
|
||||
@list='$(dist_doc_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
done
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
$(CCDV) $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
$(CCDV) $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
if test "x#" != "x@USECCDV@"; then echo "Installing $$f"; fi; \
|
||||
else :; fi; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,3 +0,0 @@
|
|||
TODO:
|
||||
|
||||
- Secret new features coming :P
|
|
@ -1,412 +0,0 @@
|
|||
/* NeoStats - IRC Statistical Services
|
||||
** Copyright (c) 1999-2008 Adam Rutter, Justin Hammond, Mark Hetherington
|
||||
** http://www.neostats.net/
|
||||
**
|
||||
** Portions Copyright (c) 2000-2008 ^Enigma^
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation; either version 2 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id$
|
||||
*/
|
||||
|
||||
#include "neostats.h"
|
||||
#include "loveserv.h"
|
||||
|
||||
/** Bot command function prototypes */
|
||||
static int ls_rose( CmdParams* cmdparams );
|
||||
static int ls_kiss( CmdParams* cmdparams );
|
||||
static int ls_tonsil( CmdParams* cmdparams );
|
||||
static int ls_hug( CmdParams* cmdparams );
|
||||
static int ls_admirer( CmdParams* cmdparams );
|
||||
static int ls_chocolate( CmdParams* cmdparams );
|
||||
static int ls_candy( CmdParams* cmdparams );
|
||||
static int ls_lovenote( CmdParams* cmdparams );
|
||||
static int ls_apology( CmdParams* cmdparams );
|
||||
static int ls_thankyou( CmdParams* cmdparams );
|
||||
|
||||
/** Bot pointer */
|
||||
static Bot *ls_bot;
|
||||
|
||||
/** Copyright info */
|
||||
const char *ls_copyright[] = {
|
||||
"Copyright (c) 1999-2008, NeoStats",
|
||||
"http://www.neostats.net/",
|
||||
NULL
|
||||
};
|
||||
|
||||
/** Module info */
|
||||
ModuleInfo module_info = {
|
||||
"LoveServ",
|
||||
"Network love service",
|
||||
ls_copyright,
|
||||
ls_about,
|
||||
NEOSTATS_VERSION,
|
||||
CORE_MODULE_VERSION,
|
||||
__DATE__,
|
||||
__TIME__,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
/** Bot comand table */
|
||||
static bot_cmd ls_commands[]=
|
||||
{
|
||||
{"ROSE", ls_rose, 1, 0, ls_help_rose, ls_help_rose_oneline },
|
||||
{"KISS", ls_kiss, 1, 0, ls_help_kiss, ls_help_kiss_oneline },
|
||||
{"TONSIL", ls_tonsil, 1, 0, ls_help_tonsil, ls_help_tonsil_oneline },
|
||||
{"HUG", ls_hug, 1, 0, ls_help_hug, ls_help_hug_oneline },
|
||||
{"ADMIRER", ls_admirer, 1, 0, ls_help_admirer, ls_help_admirer_oneline },
|
||||
{"CHOCOLATE", ls_chocolate, 1, 0, ls_help_chocolate, ls_help_chocolate_oneline },
|
||||
{"CANDY", ls_candy, 1, 0, ls_help_candy, ls_help_candy_oneline },
|
||||
{"LOVENOTE", ls_lovenote, 2, 0, ls_help_lovenote, ls_help_lovenote_oneline },
|
||||
{"APOLOGY", ls_apology, 2, 0, ls_help_apology, ls_help_apology_oneline },
|
||||
{"THANKYOU", ls_thankyou, 2, 0, ls_help_thankyou, ls_help_thankyou_oneline },
|
||||
{NULL, NULL, 0, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
/** BotInfo */
|
||||
static BotInfo ls_botinfo =
|
||||
{
|
||||
"LoveServ",
|
||||
"LoveServ1",
|
||||
"LS",
|
||||
BOT_COMMON_HOST,
|
||||
"Network love service",
|
||||
BOT_FLAG_SERVICEBOT|BOT_FLAG_DEAF,
|
||||
ls_commands,
|
||||
NULL,
|
||||
};
|
||||
|
||||
/** @brief ModInit
|
||||
*
|
||||
* Init handler
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModInit( void )
|
||||
{
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ModSynch
|
||||
*
|
||||
* Startup handler
|
||||
* Introduce bot onto network
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModSynch( void )
|
||||
{
|
||||
ls_bot = AddBot( &ls_botinfo );
|
||||
if( !ls_bot )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ModFini
|
||||
*
|
||||
* Fini handler
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
int ModFini (void)
|
||||
{
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_rose
|
||||
*
|
||||
* ls_rose
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_rose( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Rose has been sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s has sent you this beautiful rose! 3--<--<--<{4@",
|
||||
cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_kiss
|
||||
*
|
||||
* kiss command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_kiss( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"You have virtually kissed %s", target->name );
|
||||
irc_prefmsg( ls_bot, target, "%s has virtually kissed you!", cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_tonsil
|
||||
*
|
||||
* tonsil command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_tonsil( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"You have virtually tonsil kissed %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s would like to send a SLoW..LoNG..DeeP..PeNeTRaTiNG..ToNSiL-TiCKLiNG.. HaiR STRaiGHTeNiNG..Toe-CuRLiNG..NeRVe-JaNGLiNG..LiFe-aLTeRiNG.. FaNTaSY-CauSiNG..i JuST SaW GoD!..GoSH, DiD MY CLoTHeS FaLL oFF?.. YeS, i'M GLaD i CaMe oN iRC..KiSS oN Da LiPS!!!",
|
||||
cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_hug
|
||||
*
|
||||
* hug command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_hug( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"You have hugged %s", target->name );
|
||||
irc_prefmsg( ls_bot, target, "%s has sent you a *BIG WARM HUG*!", cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_admirer
|
||||
*
|
||||
* admirer command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_admirer( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Secret admirer sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target, "You have a secret admirer! ; )" );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_chocolate
|
||||
*
|
||||
* chocolate command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_chocolate( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Cholocates sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s would like you to have this YUMMY box of chocolates!",
|
||||
cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_candy
|
||||
*
|
||||
* candy command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_candy( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Candy sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s would like you to have this big YUMMY bag of heart shaped candies!",
|
||||
cmdparams->source->name );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_lovenote
|
||||
*
|
||||
* lovenote command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_lovenote( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
char *message;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
message = joinbuf( cmdparams->av, cmdparams->ac, 1 );
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Love note sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s has sent you a love note which reads: \2%s\2",
|
||||
cmdparams->source->name, message );
|
||||
ns_free( message );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_apology
|
||||
*
|
||||
* apology command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_apology( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
char *message;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
message = joinbuf( cmdparams->av, cmdparams->ac, 1 );
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Apology sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target,
|
||||
"%s is sorry, and would like to apologise for \2%s\2",
|
||||
cmdparams->source->name, message );
|
||||
ns_free( message );
|
||||
return NS_SUCCESS;
|
||||
}
|
||||
|
||||
/** @brief ls_thankyou
|
||||
*
|
||||
* thankyou command handler
|
||||
*
|
||||
* @cmdparams pointer to commands param struct
|
||||
*
|
||||
* @return NS_SUCCESS if suceeds else NS_FAILURE
|
||||
*/
|
||||
|
||||
static int ls_thankyou( CmdParams* cmdparams )
|
||||
{
|
||||
Client *target;
|
||||
char *message;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
target = FindValidUser( ls_bot, cmdparams->source, cmdparams->av[0] );
|
||||
if( !target )
|
||||
{
|
||||
return NS_FAILURE;
|
||||
}
|
||||
message = joinbuf( cmdparams->av, cmdparams->ac, 1 );
|
||||
irc_prefmsg( ls_bot, cmdparams->source,
|
||||
"Thank you sent to %s", target->name );
|
||||
irc_prefmsg( ls_bot, target, "%s wishes to thank you for \2%s\2",
|
||||
cmdparams->source->name, message );
|
||||
ns_free( message );
|
||||
return NS_SUCCESS;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/* NeoStats - IRC Statistical Services
|
||||
** Copyright (c) 1999-2008 Adam Rutter, Justin Hammond, Mark Hetherington
|
||||
** http://www.neostats.net/
|
||||
**
|
||||
** Portions Copyright (c) 2000-2008 ^Enigma^
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation; either version 2 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
** USA
|
||||
**
|
||||
** NeoStats CVS Identification
|
||||
** $Id$
|
||||
*/
|
||||
|
||||
extern const char ls_help_rose_oneline[];
|
||||
extern const char ls_help_kiss_oneline[];
|
||||
extern const char ls_help_tonsil_oneline[];
|
||||
extern const char ls_help_hug_oneline[];
|
||||
extern const char ls_help_admirer_oneline[];
|
||||
extern const char ls_help_chocolate_oneline[];
|
||||
extern const char ls_help_candy_oneline[];
|
||||
extern const char ls_help_lovenote_oneline[];
|
||||
extern const char ls_help_apology_oneline[];
|
||||
extern const char ls_help_thankyou_oneline[];
|
||||
|
||||
extern const char *ls_about[];
|
||||
extern const char *ls_help_rose[];
|
||||
extern const char *ls_help_kiss[];
|
||||
extern const char *ls_help_tonsil[];
|
||||
extern const char *ls_help_hug[];
|
||||
extern const char *ls_help_admirer[];
|
||||
extern const char *ls_help_chocolate[];
|
||||
extern const char *ls_help_candy[];
|
||||
extern const char *ls_help_lovenote[];
|
||||
extern const char *ls_help_apology[];
|
||||
extern const char *ls_help_thankyou[];
|
|
@ -1,146 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="loveserv"
|
||||
ProjectGUID="{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\lib\adnswin32;..\..\lib\keeper;..\..\lib\curl;..\..\lib\pcre"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOVESERV_EXPORTS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="neostats.lib"
|
||||
OutputFile="../loveservd.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\src\Debug"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/loveserv.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/loveserv.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\lib\adnswin32;..\..\lib\keeper;..\..\lib\curl;..\..\lib\pcre"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LOVESERV_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="neostats.lib"
|
||||
OutputFile="../loveserv.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\src\Release"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/loveserv.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\loveserv.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ls_help.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\loveserv.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue